Description of problem: From https://qemu.weilnetz.de/doc/qemu-doc.html#qemu_005fimg_005finvocation, we get info "If a relative path name is given, the backing file is looked up relative to the directory containing output_filename.". However, while practising this over RBD, it does not work now. Version-Release number of selected component (if applicable): qemu-kvm-4.1.0-4.module+el8.1.0+4020+16089f93 kernel-4.18.0-135.el8 How reproducible: 100% Steps to Reproduce: 1. Create a base image locally # qemu-img create -f qcow2 base.qcow2 2G 2. Create overlay over RBD based on base.qcow2 # qemu-img create -f qcow2 -b base.qcow2 rbd:kvmtest-pool/sn.qcow2 # qemu-img info rbd:kvmtest-pool/sn.qcow2 image: json:{"driver": "qcow2", "file": {"pool": "kvmtest-pool", "image": "sn.qcow2", "driver": "rbd"}} file format: qcow2 virtual size: 20 GiB (21474836480 bytes) disk size: unavailable cluster_size: 65536 backing file: base.qcow2 (cannot determine actual path) Format specific information: compat: 1.1 lazy refcounts: false refcount bits: 16 corrupt: false Actual results: As above, created with no error. Expected results: Create image fails, and give info like below: qemu-img: rbd:kvmtest-pool/sn.qcow2: Could not open 'rbd:kvmtest-pool/base.qcow2': No such file or directory Additional info: Doing more tests(Check/rebase) will failed. # qemu-img check rbd:kvmtest-pool/sn.qcow2 qemu-img: Could not open 'rbd:kvmtest-pool/sn.qcow2': Cannot generate a base directory for rbd nodes # qemu-img rebase -b /home/test/ceph_qcow2/new_base.qcow2 rbd:kvmtest-pool/sn.qcow2 -p qemu-img: Could not open 'rbd:kvmtest-pool/sn.qcow2': Cannot generate a base directory for rbd nodes
For 'qemu-img rebase', will hit below error. Steps: 1. Create a qcow2 image over rbd # qemu-img create -f qcow2 rbd:kvmtest-pool/tttt.qcow2 2G 2. Create a base.qcow2 locally # qemu-img create -f qcow2 new_base.qcow2 2G 3. Rebase # qemu-img rebase -b new_base.qcow2 -f qcow2 rbd:kvmtest-pool/tttt.qcow2 -p qemu-img: Could not resolve backing filename: Cannot use relative backing file names for 'json:{"driver": "qcow2", "file": {"pool": "kvmtest-pool", "image": "tttt.qcow2", "driver": "rbd"}}'
QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks
As discussed upstream [1], QCOW2 on RBD is not really well supported and it is expected to be removed. This is also because there doesn't seem to be much advantage to using QCOW2 on RBD. If there is a specific use case where it is useful to use QCOW2 on RBD, please open a new BZ where the requirements are explained. AFAIK layered products, such as OpenStack, do not use QCOW2 with in-QEMU RBD. [1] https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg01045.html
As qcow2 on rbd is not really well supported and it is expected to be removed. QA agrees to close this bug.