Description of problem: Should hit error when blockcopy disk with invalid --format value Version-Release number of selected component (if applicable): libvirt-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64 qemu-kvm-6.0.0-16.module+el8.5.0+10848+2dccc46d.x86_64 How reproducible: 100% Steps to Reproduce: 1. Prepare a running guest. # virsh domstate avocado-vt-vm1 running 2. Blockcopy the disk to a file with invalid format # virsh blockcopy avocado-vt-vm1 vda /tmp/test.img --format fda --transient-job Block Copy started Actual results: Can blockcopy successfully with invalid format for the destination Expected results: Should hit error: error: unsupported configuration: unknown driver format value 'fda' Additional info:
Broken by upstream commit: commit 0202467c4ba8663db2304b140af609f93a9b3091 Author: Peter Krempa <pkrempa> Date: Wed Apr 14 16:43:22 2021 +0200 qemu: driver: Use virDomainDiskDefParseSource in qemuDomainBlockCopy
Upstream commits: 9d225ea284 virDomainDiskDefParseSource: parse source bits from driver element fe6ed00ef7 domain_conf: extract disk driver source bits to its own function Will be fixed by the next rebase to libvirt-7.5.0.
Verified:tested is passed on: libvirt-7.0.0-4.fc34.x86_64 qemu-kvm-5.2.0-8.fc34.x86_64 Expected result: # virsh blockcopy lmn vda /tmp/test.img --format fda --transient-job error: unsupported configuration: unknown driver format value 'fda'
Verified Version: libvirt-7.5.0-1.module+el8.5.0+11664+59f87560.x86_64 qemu-kvm-6.0.0-23.module+el8.5.0+11740+35571f13.x86_64 Verified Steps: 1. Start a guest with the following disk: # virsh dumpxml lmn | grep /disk -B5 <disk type='file' device='disk' snapshot='no'> <driver name='qemu' type='qcow2' cache='none' detect_zeroes='on' queues='1024'/> <source file='/var/lib/libvirt/images/lmn.qcow2'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </disk> 2. Blockcopy the disk to a file with invalid format # virsh blockcopy lmn vda /tmp/test.img --format fda --transient-job error: unsupported configuration: unknown driver format value 'fda' 3. Blockcopy the disk to a file with valid format. # virsh blockcopy lmn vda /tmp/test.img --format raw --transient-job --pivot --wait --verbose Block Copy: [100 %] Successfully pivoted
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4684