Bug 1736842
| Summary: | starting with v2 image with internal snapshot, qemu-img amend -o compat=1.1 creates invalid image | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Tingting Mao <timao> |
| Component: | qemu-kvm | Assignee: | Hanna Czenczek <hreitz> |
| qemu-kvm sub component: | qcow2 | QA Contact: | CongLi <coli> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | medium | CC: | coli, ddepaula, eblake, hreitz, jferlan, jinzhao, juzhang, rbalakri, virt-maint |
| Version: | 8.1 | Flags: | pm-rhel:
mirror+
|
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-4.2.0-1.module+el8.2.0+4793+b09dd2fb | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1727347 | Environment: | |
| Last Closed: | 2020-05-05 09:46: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: | |||
| Bug Depends On: | 1727347 | ||
| Bug Blocks: | |||
|
Description
Tingting Mao
2019-08-02 07:34:19 UTC
Verified this bug as below. Tested with: qemu-kvm-4.2.0-1.module+el8.2.0+4793+b09dd2fb kernel-4.18.0-153.el8.x86_64 Steps: 1. Create a v2 file with internal snapshot. On RHEL6: # rpm -qa | grep qemu-img qemu-img-rhev-0.12.1.2-2.491.el6_8.3.x86_64 # qemu-img create -f qcow2 test_v2.qcow2 1m # qemu-img snapshot -c s1 test_v2.qcow2 # qemu-img info test_v2.qcow2 image: test_v2.qcow2 file format: qcow2 virtual size: 1.0M (1048576 bytes) disk size: 204K cluster_size: 65536 Snapshot list: ID TAG VM SIZE DATE VM CLOCK 1 s1 0 2019-11-29 01:42:23 00:00:00.000 2. Check that the internal snapshot header uses the smaller size: # od -Ax -j64 -N8 -tx1 test_v2.qcow2 000040 00 00 00 00 00 05 00 00 000048 # offset=$((0x50000+36)) # od -Ax -j$offset -N 4 -tx1 test_v2.qcow2 050024 00 00 00 00 ------------------------------------ The extra size is 0. 050028 3. Scp the image to RHEL8 host, and upgrade it to v3. # qemu-img --version qemu-img version 4.2.0 (qemu-kvm-4.2.0-1.module+el8.2.0+4793+b09dd2fb) # qemu-img amend -o compat=1.1 test_v2.qcow2 4. Check the internal snapshot header size: # od -Ax -j64 -N8 -tx1 test_v2.qcow2 000040 00 00 00 00 00 06 00 00 000048 # offset=$((0x60000+36)) # od -Ax -j$offset -N 4 -tx1 test_v2.qcow2 060024 00 00 00 10 -------------------------------------- The size is changed to 16. 060028 QEMU has been recently split into sub-components and as a one-time operation to avoid breakage of tools, we are setting the QEMU sub-component of this BZ to "General". Please review and change the sub-component if necessary the next time you review this BZ. Thanks Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2017 |