Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 653582 - Changing media with -snapshot deletes image file
Changing media with -snapshot deletes image file
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.1
Unspecified Unspecified
low Severity high
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
:
Depends On:
Blocks: 580954
  Show dependency treegraph
 
Reported: 2010-11-15 13:08 EST by Kevin Wolf
Modified: 2013-01-09 18:20 EST (History)
5 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.120.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-19 07:34:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:0534 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2011-05-19 07:20:36 EDT

  None (edit)
Description Kevin Wolf 2010-11-15 13:08:03 EST
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-23 22:20:15 EST
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 07:34:06 EDT
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 08:49:56 EDT
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.