Description of problem: type='qcow2' is not added automatically when adding a disk of type volume, when the volume is qcow2 and is residing on pool of type 'dir'. Version-Release number of selected component (if applicable): libvirt.x86_64 4.10.0-2.fc29 @group_virtmaint-sig-virt-preview qemu-kvm.x86_64 2:3.1.0-2.fc29 @group_virtmaint-sig-virt-preview How reproducible: Always Steps to Reproduce: 1. Create volume of type file and qcow2 format with the following XML. $ cat volume.xml <volume type='file'> <name>test01</name> <target> <path>/var/lib/libvirt/images/test01</path> <format type='qcow2'/> </volume> 2. Create disk of type volume without driver type information with the following XML. $ cat disk.xml <disk type='volume' device='disk'> <driver name='qemu'/> <source pool='boot' volume='test01'/> <target dev='vdb' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </disk> 3. Attach disk device to a domain virsh # attach-device fedora29 disk.xml --config Device attached successfully Actual results: Dumping the domain XML shows that the disk was given raw format, although the volume is of type qcow2. $ virsh -c qemu:///system dumpxml fedora29 | xmllint --xpath /domain/devices/disk - function="0x0"/> <disk type="volume" device="disk"> <driver name="qemu" type="raw"/> <source pool="boot" volume="test01"/> <backingStore/> <target dev="vdb" bus="virtio"/> <alias name="virtio-disk1"/> <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/> </disk> Expected results: The disk should inherit the format type from the volume automatically.
Note that due to the fact that the PoolRefresh method of a storage pool discards all volume metadata and reprobes the image formats from the disk, it would not be safe to switch the format according to the format of the volume. If a raw disk is given to the VM the OS may write a QCOW2 header which would be detected and used as qcow2 next time the pool is refreshed.
This message is a reminder that Fedora 29 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '29'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 29 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
We didn't do anythign to address this yet so I'll bump it to newer release.
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.