Bug 1119929 - virt-manager creates qcow3 image instead of qcow2
Summary: virt-manager creates qcow3 image instead of qcow2
Alias: None
Product: Fedora
Classification: Fedora
Component: virt-manager
Version: 20
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Cole Robinson
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-15 21:24 UTC by Hayley Hudgeons
Modified: 2014-07-16 21:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-07-16 21:39:33 UTC
Type: Bug

Attachments (Terms of Use)

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):

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 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:


Note You need to log in before you can comment on or make changes to this bug.