Bug 1191402
| Summary: | The error info is not accurate when create image with specify wrong backing_fmt | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Shanzhi Yu <shyu> |
| Component: | qemu-kvm | Assignee: | Virtualization Maintenance <virt-maint> |
| qemu-kvm sub component: | Storage | QA Contact: | Xueqiang Wei <xuwei> |
| Status: | CLOSED WONTFIX | Docs Contact: | |
| Severity: | low | ||
| Priority: | low | CC: | aliang, areis, chayang, coli, juzhang, kanderso, knoel, mtessun, mzhan, rbalakri, virt-maint, xfu, xuwei |
| Version: | --- | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-12-15 06:29:56 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
Shanzhi Yu
2015-02-11 09:24:58 UTC
Hi Cong, Please update the QE contact. same issue with lvm:
# qemu-img info /dev/mapper/vg--lolyu-img0
image: /dev/mapper/vg--lolyu-img0
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 0
cluster_size: 512
Format specific information:
compat: 1.1
lazy refcounts: false
refcount bits: 16
corrupt: false
# qemu-img create -f qcow2 -o backing_file=/dev/mapper/vg--lolyu-img0,backing_fmt=raw /dev/mapper/vg--lolyu-img1
Formatting '/dev/mapper/vg--lolyu-img1', fmt=qcow2 size=21474836480 backing_file=/dev/mapper/vg--lolyu-img0 backing_fmt=raw cluster_size=65536 lazy_refcounts=off refcount_bits=16
(In reply to Longxiang Lyu from comment #4) > same issue with lvm: > # qemu-img info /dev/mapper/vg--lolyu-img0 > image: /dev/mapper/vg--lolyu-img0 > file format: qcow2 > virtual size: 20G (21474836480 bytes) > disk size: 0 > cluster_size: 512 > Format specific information: > compat: 1.1 > lazy refcounts: false > refcount bits: 16 > corrupt: false > > # qemu-img create -f qcow2 -o > backing_file=/dev/mapper/vg--lolyu-img0,backing_fmt=raw > /dev/mapper/vg--lolyu-img1 > Formatting '/dev/mapper/vg--lolyu-img1', fmt=qcow2 size=21474836480 > backing_file=/dev/mapper/vg--lolyu-img0 backing_fmt=raw cluster_size=65536 > lazy_refcounts=off refcount_bits=16 Any file could be used as a valid raw image. QEMU doesn't check whether it is true. When the user tells QEMU that a qcow2 image is in raw format, what QEMU does is assuming that the user is right. So there is no issue in comment 4. 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 Tested with qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a, also hit this issue. Versions: kernel-4.18.0-260.el8.x86_64 qemu-kvm-5.2.0-1.module+el8.4.0+9091+650b220a 1. Prepare a raw format images # qemu-img create -f raw base.img 1G Formatting 'base.img', fmt=raw size=1073741824 2. Create a qcow2 format images and take base.img as backing file and specify wrong backing_fmt # qemu-img create -f qcow2 sn1.qcow2 -b base.img -o backing_fmt=qcow2 qemu-img: sn1.qcow2: Image is not in qcow2 format Could not open backing image. # ll sn1.qcow2 ls: cannot access 'sn1.qcow2': No such file or directory after step 2, qemu should post error that base.img is not in qcow2 format but not sn1.qcow2 After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. |