[systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation

Martin Pitt martin.pitt at ubuntu.com
Wed Jan 28 01:46:58 PST 2015


Martin Pitt [2015-01-28 10:35 +0100]:
> Turns out that there's no proper way to simulate that under QEMU --
> that has no "eject" button, and the "eject" monitor command blocks
> as long as the OS is still accessing it (i. e. it's mounted).

Lies! In fact "eject ide1-cd0" works rather well, it causes the
DISK_EJECT_REQUEST=1 uevent, and then the cdrom_id --eject magic takes
place.

So in case anyone wonders how to reproduce this:

$ qemu-system-x86_64 -enable-kvm -m 2048 -snapshot -drive file=my_os.img,if=virtio -drive if=ide,index=1,media=cdrom -monitor stdio
QEMU 2.1.2 monitor - type 'help' for more information
# take any ISO you like
(qemu) change ide1-cd0 /home/martin/Downloads/ubuntu/vivid-desktop-amd64.iso
(qemu) eject ide1-cd0
Device 'ide1-cd0' is locked

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


More information about the systemd-devel mailing list