Description of problem: When explicitly specifying a <backingStore type='volume'> libvirt reports: "An error occurred, but the cause is unknown" and How reproducible: 100% Steps to Reproduce: 1. <disk type='volume' device='disk'> <driver name='qemu' type='qcow2'/> <source pool='test' volume='overlay'/> <backingStore type='volume'> <format type='qcow2'/> <source pool='test' volume='base'/> <backingStore/> </backingStore> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> </disk> 2. virsh start VM 3. Actual results: $ virsh start VM error: Failed to start domain VM error: An error occurred, but the cause is unknown Expected results: VM starts and uses the proper volume (in -blockdev mode) Additional info:
Fixed upstream by: 37f01262ee virDomainDiskTranslateSourcePool: Translate 'volume' disks in whole backing chain 63469116cc virDomainDiskTranslateSourcePool: split code to setup one storage source bc42d88ffd virDomainDiskTranslateISCSIDirect: Take virStorageSourcePtr instead of virDomainDiskDefPtr 4fca8299c5 virDomainDiskTranslateSourcePoolAuth: Take virStorageSourcePtr instead of virDomainDiskDefPtr 47cad72553 virDomainDiskAddISCSIPoolSourceHost: Take virStorageSourcePtr instead of virDomainDiskDefPtr e20c5b1703 virDomainDiskAddISCSIPoolSourceHost: Remove ternary operator 4d5093ef75 virDomainDiskAddISCSIPoolSourceHost: Remove 'cleanup' label 5eda34f2e1 virDomainDiskAddISCSIPoolSourceHost: use g_new0 instead of VIR_ALLOC_N c5b1c14379 virDomainDiskAddISCSIPoolSourceHost: Sanitize handling of string list 4e3e69fed4 qemuBlockStorageSourceGetBackendProps: Report errors on all switch cases
Verified on : libvirt-6.0.0-7.virtcov.el8.x86_64 Step: 1.Edit the vm2 with the following xml: ... <disk type='volume' device='disk'> <driver name='qemu' type='qcow2'/> <source pool='default' volume='test.img'/> <backingStore type='volume'> <format type='qcow2'/> <source pool='default' volume='a.iso'/> <backingStore/> </backingStore> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> </disk> ... 2.Try to start the vm # virsh start vm2 Domain vm2 started Guest start without any error qemu cmd line: ... -blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"qcow2","file":"libvirt-3-storage","backing":null}' -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x6,drive=libvirt-3-format,id=virtio-disk0,bootindex=1 -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/a.iso","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' -blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"qcow2","file":"libvirt-2-storage","backing":null}' -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/test.img","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":"libvirt-2-format"}' ... Work as expected.
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, 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-2020:2017