qemu deletes the backing file in snapshot mode

Bug #1351271 reported by Giancarlo Formicuccia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

The file removal occurs during the "change" operation. It happens only in snapshot mode.

Minimal steps to reproduce the problem:

$ dd if=/dev/zero of=file.img bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 0.00288727 s, 363 MB/s
$ ls file.img
file.img
$ qemu-system-x86_64 -monitor stdio -snapshot
QEMU 2.0.0 monitor - type 'help' for more information
(qemu) change ide1-cd0 file.img
(qemu) change ide1-cd0 file.img
(qemu) change ide1-cd0 file.img
Could not open 'file.img': No such file or directory
(qemu) q
$ ls file.img
ls: cannot access file.img: No such file or directory

qemu version is 2.0.0 from arch linux, which is the vanilla version plus one patch unrelated to this problem.

info block in snapshot mode reports:
ide1-cd0: /var/tmp/vl.G5WENk (qcow2)
    Removable device: not locked, tray closed
    Backing file: file.img (chain depth: 1)

whereas info block NOT in snapshot mode correctly reports:
ide1-cd0: file.img (raw, read-only)
    Removable device: not locked, tray closed

Revision history for this message
Giancarlo Formicuccia (giancarlo-formicuccia) wrote :

Just tested qemu 2.1.0 and the bug is fixed in this version.

Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.