Bug 997977
| Summary: | Always specify the compat level for qcow2 if qemu-img allows it | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Ján Tomko <jtomko> |
| Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | acathrow, cwei, dyuan, hliu, juzhang, shyu |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.1.1-4.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 10:57:27 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
Ján Tomko
2013-08-16 16:25:53 UTC
Upstream discussion: https://www.redhat.com/archives/libvir-list/2013-August/msg00921.html Upstream patch always specifying the compat level (default is hard-coded to 0.10): https://www.redhat.com/archives/libvir-list/2013-August/msg01253.html Now pushed upstream:
commit bab2eda6ada1bf832decdc64cc5062e54eb105df
Author: Ján Tomko <jtomko>
AuthorDate: 2013-08-20 17:37:08 +0200
Commit: Ján Tomko <jtomko>
CommitDate: 2013-08-27 12:45:58 +0200
Always specify qcow2 compat level on qemu-img command line
qemu-img is going to switch the default for QCOW2
to QCOW2v3 (compat=1.1)
Extend the probing for qemu-img command line options to check
if -o compat is supported. If the volume definition specifies
the qcow2 format but no compat level and -o compat is supported,
specify -o compat=0.10 to create a QCOW2v2 image.
https://bugzilla.redhat.com/show_bug.cgi?id=997977
git describe: v1.1.1-233-gbab2eda
Now posted downstream: http://post-office.corp.redhat.com/archives/rhvirt-patches/2013-September/msg00079.html Using packages:
libvirt-1.1.1-3.el7.x86_64
libvirt-1.1.1-4.el7.x86_64
qemu-img-1.5.3-2.el7.x86_64
qemu-img-1.6.50-1.el7.x86_64 (self builf from git repo)
Since the patch on qemu to triger this bug has not been release.
I used a self built qemu package to test. so pls ignore the version
which I made up.
1. Confirm change on qemu.
# qemu-img create test.img 0 -f qcow2
# hexdump test.img | head -n1
**Output**
0000000 4651 fb49 0000 0200 0000 0000 0000 0000
^ <= for qemu-img-1.5.3-2.el7.x86_64
0000000 4651 fb49 0000 0300 0000 0000 0000 0000
^ <= for qemu-img-1.6.50-1.el7.x86_64
2. Create a storage XML file.
# cat > vol.xml << EOF
<volume>
<name>test.qcow2</name>
<key>/var/lib/libvirt/images/test.qcow2</key>
<source>
</source>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>1000</allocation>
<target>
<path>/var/lib/libvirt/images/test.qcow2</path>
<format type='qcow2'/>
<permissions>
<mode>0644</mode>
<owner>107</owner>
<group>107</group>
</permissions>
</target>
</volume>
EOF
3. Create a volume using virsh and check its compatibility.
# virsh vol-create default vol.xml
Vol test.qcow2 created from vol.xml
# hexdump /var/lib/libvirt/images/test.qcow2 | head -n1
**Output**
for libvirt-1.1.1-3:
0000000 4651 fb49 0000 0200 0000 0000 0000 0000
^ <= with qemu-img-1.5.3-2.el7.x86_64
0000000 4651 fb49 0000 0300 0000 0000 0000 0000
^ <= with qemu-img-1.6.50-1.el7.x86_64
for libvirt-1.1.1-4 with either version of qemu-img.
0000000 4651 fb49 0000 0200 0000 0000 0000 0000
^
This patch prevent the difference when using with future
qemu-img creates new image without specifying compatibility.
It is considered VERIFIED.
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |