Bug 1119929

Summary: virt-manager creates qcow3 image instead of qcow2
Product: [Fedora] Fedora Reporter: Hayley Hudgeons <hhudgeon>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: berrange, crobinso, shyu, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-16 21:39:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hayley Hudgeons 2014-07-15 21:24:03 UTC
Description of problem:
An image was created in virt-manager with the default format set to qcow2 for new images. After trying to use that image in openstack I found that the image is actually a qcow3 image. I am unable to convert from qcow3 to qcow2 because qemu-img doesn't recognize qcow3.

Version-Release number of selected component (if applicable):
virt-manager-1.0.1-3.fc20.noarch
qemu-img-1.6.2-6.fc20.x86_64

How reproducible:
Everytime a new image is created when qcow2 is set as default, it creates a qcow2 image. 

Steps to Reproduce:
1. Set virt-manager prefs so new images are qcow2
2. Create and install a new VM from ISO
3. Run file against the .qcow2 image that is created, and it will show that it is qcow3

Actual results:
A qcow3 image is created:

# file rhel6_sat6.qcow2 
rhel6_sat6.qcow2: QEMU QCOW Image (v3), 8589934592 bytes


Expected results:
I except that this would create a qcow2 image, or at the very least that I could convert it with the latest version of qemu-img

Additional info:

Comment 1 Shanzhi Yu 2014-07-16 01:45:38 UTC
I can convert qcow2v3 to qcow2v2 with latest qemu-img

# rpm -q qemu-img
qemu-img-2.1.0-0.2.rc1.fc20.x86_64

# qemu-img convert -f qcow2 /var/lib/libvirt/images/qcow2v3.img -O qcow2 -o compat=0.10 /var/lib/libvirt/images/qcow2v2.img 

# file /var/lib/libvirt/images/qcow2v2.img
/var/lib/libvirt/images/qcow2v2.img: QEMU QCOW Image (v2), 1073741824 bytes

Should qemu-img-1.6.2-6.fc20.x86_64 can also do that.

Comment 2 Cole Robinson 2014-07-16 21:39:33 UTC
Yes, virt-manager/virt-install on Fedora 20 by default create images that won't run on RHEL6. It's a pain, but we need to extra features to get acceptable snapshot performance.

See Shanzhi's suggestion for conversion:

> 
> # qemu-img convert -f qcow2 /var/lib/libvirt/images/qcow2v3.img -O qcow2 -o
> compat=0.10 /var/lib/libvirt/images/qcow2v2.img 

Indeed that should work on F20 qemu 1.6 as well. However it will discard any internal qcow2 snapshots, so beware.

(qemu-img etc. don't have an explicit qcow3 version, it's just qcow2 + compat options. The 'QCOW Image (v3)' comes from the qcow2 header, I wish it didn't say that though since it's misleading).

Comment 3 Cole Robinson 2014-07-16 21:40:00 UTC
Also see this mail for more details:

https://lists.fedoraproject.org/pipermail/virt/2014-April/004041.html