FS#44397 - [qemu] -snapshot option does'nt work with usb_add host:bus.dev

Attached to Project: Arch Linux
Opened by Lacsap (lacsap) - Monday, 30 March 2015, 08:36 GMT
Last edited by Tobias Powalowski (tpowa) - Saturday, 03 September 2016, 06:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

with the "-snapshot" option, qemu "write to temporary files instead of disk image files", tht's right for drives passed on command line, but when adding a usb drive on the VM, the VM will really write on it...


Additional info:
* package version(s)
qemu-2.2.1-2
* config and/or log files etc.


Steps to reproduce:

insert usb drive in PM and in a xterm :
$ lsusb
Bus 00b Device 00d: ID xxxx:yyyy usb drive
# chmod 666 /dev/bus/usb/00b/00d
# mount /dev/sdb1 /mnt
$ ls /mnt
(nothing)
# umount /mnt
$ qemu -enable-kvm -m 1024 -usb -cdrom livelinux.iso -boot d -snapshot

(ctrl-alt-2) in qemu console on PM :
(qemu) usb_add host:b.d

(ctrl-alt-1) in a xtrem on VM :
# mount /dev/sda1 /mnt
# touch /mnt/touched
# umount /mnt
# poweroff

in a xterm on PM :
# mount /dev/sdb1 /mnt
$ ls /mnt
touched
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Saturday, 03 September 2016, 06:44 GMT
Reason for closing:  Upstream
Comment by Jan de Groot (JGC) - Monday, 30 March 2015, 10:14 GMT
USB devices are raw host devices passed to the VM. How do you expect qemu to monitor snapshots to those devices?
Comment by Lacsap (lacsap) - Monday, 30 March 2015, 10:27 GMT
May be it's not a "bug" but, if not, it may be specified in documentation.
I was really surprised to find my key modified.
Comment by Lacsap (lacsap) - Monday, 30 March 2015, 10:32 GMT
(raw) drives passed on command line are "snapshot-ed" but, it seems that (raw) drives added after, not...
Comment by Jan de Groot (JGC) - Tuesday, 31 March 2015, 05:52 GMT
Qemu will not snapshot host devices passed through, not on startup, not at runtime. Using host:* syntax does raw device passthrough. With raw device passthrough qemu makes no difference between a mouse or a disk device so it's not snapshotted.
Comment by Tobias Powalowski (tpowa) - Saturday, 03 September 2016, 06:44 GMT
Ìf still an issue please report upstream.

Loading...