Hide Forgot
Description of problem: Fedora 16 always locks media, and relies on eject request events to invoke the unlock/eject sequence from udev. Version-Release number of selected component (if applicable): qemu-kvm-0.12.1-191.el6 How reproducible: 100% Steps to Reproduce: 1. Boot a Fedora 16 netinst image with an additional, empty CD-ROM 2. Try to change the CD-ROM from the monitor. Actual results: The "change" command does not work. Expected results: ??? No idea, can we get the "change" command to work at all since it relies on a non-forced "eject" to work, and "eject" cannot be done with guest help??? Additional info:
Forgot to mention that eject requests are in fact completely unimplemented by QEMU. Should be doable with Markus's revamp of locked state upstream, but still the doubt on how to make atomic "change" work remains.
More info at http://lwn.net/Articles/423619/ Kay, how does this behavior of udev-172 work exactly, when there are no async events and polling is disabled? $ cat /sys/block/sr0/events_async $ cat /sys/block/sr0/events media_change eject_request $ cat /sys/block/sr0/events_poll_msecs -1 $ cat /sys/module/block/parameters/events_dfl_poll_msecs 0
It relies on a recent kernel, polling will be enabled by default by udev rules: # grep . /sys/module/block/parameters/* 2000
> polling will be enabled by default by udev rules: Apparently this doesn't work when booting the rescue image. Cloning the bug.
It probably coalesced with other cdrom bugs Markus have on his queue
Paolo fixed it upstream, reassigning.
1.reproduce this bug with qemu-kvm-0.12.1.2-2.192.el6.x86_64 reproduce steps: 1.1) install fedora16 guest 1.2) boot guest /usr/libexec/qemu-kvm -M rhel6.2.0 -enable-kvm -m 2048 -smp 2,sockets=1,cores=2,threads=1 -name rhel6.2 -uuid 9a2fcf21-04e9-3737-6c3c-85011ce1a90c -nodefconfig -nodefaults -mon chardev=monitor,mode=readline -rtc base=utc -boot order=n,menu=off -drive file=/home/fedora16.qcow2,if=none,id=drive-virtio-disk0,boot=on,format=qcow2 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:c7:c4:6d,bus=pci.0,addr=0x9 -net tap,script=/etc/qemu-ifup,vlan=0,name=hostnet0 -spice disable-ticketing,port=5914 -vga qxl -monitor stdio -cdrom /home/test-cdrom.raw 1.3) info block (qemu) info block drive-virtio-disk0: type=hd removable=0 file=/home/fedora16.qcow2 ro=0 drv=qcow2 encrypted=0 ide1-cd0: type=cdrom removable=1 locked=0 file=/home/test-cdrom.raw ro=1 drv=raw encrypted=0 1.4) (qemu) change ide1-cd0 /home/rhev-hypervisor.iso actual result: Device 'ide1-cd0' is locked 2.verify bug with qemu-kvm-0.12.1.2-2.221.el6.x86_64 verify steps: 2.1 repeat step 1.2 2.2 repeat step 1.3 2.3 repeat step 1.4 actual result: change work well base on above result, this bug is fixed.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No Documentation Needed
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0746.html