Hide Forgot
Description of problem: virt-manager doesn't automatically recognize qcow2 when importing image Version-Release number of selected component (if applicable): virt-manager-0.10.0-7.el7.noarch How reproducible: always Steps to Reproduce: 1. Create new VM 2. Select: Import existing disk image 3. Provide path to image. 4. Complete setup and boot VM. Actual results: VM won't boot from image. Storage format is in advanced options set to: raw Expected results: VM should boot from image. Storage format in advanced options should be set to: qcow2 Additional info: tested image: http://alt.fedoraproject.org/pub/fedora/linux/releases/19/Images/x86_64/Fedora-x86_64-19-20130627-sda.qcow2
I can not reproduce this issue version: virt-manager-0.10.0-8.el7.noarch Steps: 1.Create qcow2 img. # qemu-img create qcow2.img 1G -f qcow2 Formatting 'qcow2.img', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off 2.Use virt-manager to create a new vm,importing the image create by step1. 3.Storage format in advanced options is set as:qcow2. 4.Check the xml of the guest,the format of disk also show as qcow2. <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/libvirt/images/qcow2.img'/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk>
the directory /var/lib/libvirt/images is a libvirt storage pool. The problem happens when you import an existing image that is not under a storage pool.
(In reply to Giuseppe Scrivano from comment #2) > the directory /var/lib/libvirt/images is a libvirt storage pool. The > problem happens when you import an existing image that is not under a > storage pool. Yes,you are right,the image with qcow2 format in other directory instead of libvirt storage pool will show as raw from virt-manager GUI.
I can reproduce this bug on # rpm -qa libvirt virt-manager libvirt-1.1.1-17.el7.x86_64 virt-manager-0.10.0-9.el7.noarch Steps: 1. Import a qcow2 image to create a guest. # qemu-img info /tmp/kvm-rhel6.5-x86_64-qcow2.img.1 image: /tmp/kvm-rhel6.5-x86_64-qcow2.img.1 file format: qcow2 virtual size: 3.9G (4194304000 bytes) disk size: 2.7G cluster_size: 65536 Format specific information: compat: 0.10 2. Check the xml of the guest: <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/tmp/kvm-rhel6.5-x86_64-qcow2.img.1'/> <target dev='hda' bus='ide'/> <alias name='ide0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> Actual Result: The disk format qcow2 is recognized as raw.
*** This bug has been marked as a duplicate of bug 949226 ***