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 653582 - Changing media with -snapshot deletes image file
Summary: Changing media with -snapshot deletes image file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580954
TreeView+ depends on / blocked
 
Reported: 2010-11-15 18:08 UTC by Kevin Wolf
Modified: 2013-01-09 23:20 UTC (History)
5 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.120.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 11:34:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 0 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 11:20:36 UTC

Description Kevin Wolf 2010-11-15 18:08:03 UTC
Description of problem:
When using -snapshot, a new qcow2 image is created and marked as temporary so that it gets deleted. When changing media, no new overlay file is created for the new image, however it's still treated as temporary and is therefore deleted.

Steps to Reproduce:
1. Create two images, say test1.img and test2.img
2. Start qemu -cdrom test1.img -snapshot
3. In the qemu monitor enter 'change ide1-cd0 test2.img'
  
Actual results:
The image representing the CD-ROM is changed. At the same time it's deleted from the file system.

Expected results:
The image representing the CD-ROM is changed. The file stays unchanged.

Comment 6 Shirley Zhou 2010-12-24 03:20:15 UTC
Reproduce this bug with qemu-kvm-0.12.1.2-2.113.el6.x86_64.

Verify this bug with  qemu-kvm-0.12.1.2-2.128.el6.x86_64,
#CLI: /usr/libexec/qemu-kvm -cdrom qcow2.2G -snapshot -monitor stdio
(qemu) info block
ide1-cd0: type=cdrom removable=1 locked=0 file=/tmp/vl.4x0387 backing_file=/root/resize/qcow2.2G ro=0 drv=qcow2 encrypted=0
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]
(qemu) change ide1-cd0 /root/resize/raw.2G 
(qemu) info block
ide1-cd0: type=cdrom removable=1 locked=0 file=/tmp/vl.MA7wH3 backing_file=/root/resize/raw.2G ro=0 drv=qcow2 encrypted=0
floppy0: type=floppy removable=1 locked=0 [not inserted]
sd0: type=floppy removable=1 locked=0 [not inserted]
# ll /root/resize/
total 144
-rw-r--r-- 1 root root     328192 Dec 23 21:03 qcow2.2G
-rw-r--r-- 1 root root 2147483648 Dec 23 22:21 raw.2G

So this bug has been resolved.

Comment 8 errata-xmlrpc 2011-05-19 11:34:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html

Comment 9 errata-xmlrpc 2011-05-19 12:49:56 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-0534.html


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