RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1811877 - 'qemu-img create' snapshot files should restrict the options for backing files
Summary: 'qemu-img create' snapshot files should restrict the options for backing files
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-10 02:44 UTC by Tingting Mao
Modified: 2021-12-07 22:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-10 07:27:15 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tingting Mao 2020-03-10 02:44:36 UTC
Description of problem:
As subject.


Version-Release number of selected component (if applicable):
qemu-kvm-4.2.0-13.module+el8.2.0+5898+fb4bceae
kernel-4.18.0-176.el8


How reproducible:
100%


Steps to Reproduce:
Steps:
1. Create a base image.
# qemu-img create -f raw base.img 2G

2. Create snapshot file based on the image with both '-F' and '-o backing_fmt'.
# qemu-img create -f qcow2 -b base.img -F raw -o backing_fmt=raw sn.qcow2
Formatting 'sn.qcow2', fmt=qcow2 size=2147483648 backing_file=base.img backing_fmt=raw cluster_size=65536 lazy_refcounts=off refcount_bits=16

# echo $?
0

# qemu-img info sn.qcow2 
image: sn.qcow2
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 196 KiB
cluster_size: 65536
backing file: base.img
backing file format: raw
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

3. Create snapshot file based on the image with both '-b' and '-o backing_file'.
# qemu-img create -f qcow2 -b base.img -F raw -o backing_file=base.img sn.qcow2
Formatting 'sn.qcow2', fmt=qcow2 size=2147483648 backing_file=base.img backing_fmt=raw cluster_size=65536 lazy_refcounts=off refcount_bits=16

# echo $?
0

# qemu-img info sn.qcow2 
image: sn.qcow2
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 196 KiB
cluster_size: 65536
backing file: base.img
backing file format: raw
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

4. Create snapshot file based on the image with both '-b', '-F' and '-o backing_file,backing_fmt'.
# qemu-img create -f qcow2 -b base.img -F raw -o backing_file=base.img,backing_fmt=raw sn.qcow2
Formatting 'sn.qcow2', fmt=qcow2 size=2147483648 backing_file=base.img backing_fmt=raw cluster_size=65536 lazy_refcounts=off refcount_bits=16

# echo $?
0

# qemu-img info sn.qcow2 
image: sn.qcow2
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 196 KiB
cluster_size: 65536
backing file: base.img
backing file format: raw
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false


Actual results:
As above. when '-F xx -b xx' and '-o' appear together, there is no error hint info.


Expected results:
Maybe creating failed with prompt "Can not input '-F xx -b xx' and '-o backing_fmt=xx,backing_file=xx' simultaneously"?


Additional info:
"-b xxx -F" part makes work when '-F xx -b xx' and '-o' appear together. 
# qemu-img create -f qcow2 -b base.img -F raw -o backing_file=xxxxx,backing_fmt=xxx sn.qcow2
Formatting 'sn.qcow2', fmt=qcow2 size=2147483648 backing_file=base.img backing_fmt=raw cluster_size=65536 lazy_refcounts=off refcount_bits=16

# echo $?
0

# qemu-img info sn.qcow2 
image: sn.qcow2
file format: qcow2
virtual size: 2 GiB (2147483648 bytes)
disk size: 196 KiB
cluster_size: 65536
backing file: base.img
backing file format: raw
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

# qemu-img create -f qcow2 -b xxx -F xxx -o backing_file=base.img,backing_fmt=raw sn.qcow2
qemu-img: sn.qcow2: Unknown driver 'xxx'
Could not open backing image to determine size.
# echo $?
1

Comment 4 John Ferlan 2021-09-08 21:38:57 UTC
Move RHEL-AV bugs to RHEL9. If necessary to resolve in RHEL8, then clone to the current RHEL8 release.

Comment 5 RHEL Program Management 2021-09-10 07:27:15 UTC
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.


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