Hide Forgot
Description of problem: Boot guest with a virtio-scsi CD-ROM,then eject CD-ROM in guest system.Check tray status in qemu monitor,tray-open's value still be 0.When tray is open,tray-open's value should be 1. Version-Release number of selected component (if applicable): # uname -r;rpm -q qemu-kvm 2.6.32-250.el6.x86_64 qemu-kvm-0.12.1.2-2.241.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1.Boot guest with emulated virtio-scsi CD-ROM /usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -name RHEL-Server-6.3-64 -smp 2 -m 4G -uuid 4bbfae8f-0d08-41ad-926a-c7a7568d50f7 -boot menu=on -drive file=/home/rhel6.3-64.raw,if=none,id=drive-virtio-disk0,format=raw,cache=none,media=disk,werror=stop,rerror=stop -device virtio-scsi-pci,id=virtio-blk-pci0,bus=pci.0,addr=0x5 -device scsi-hd,drive=drive-virtio-disk0,logical_block_size=512,physical_block_size=512,scsi-id=0,lun=0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=44:37:E6:5E:A3:F2,bus=pci.0,addr=0x4,id=net0 -vnc :1 -vga std -balloon none -monitor stdio -usb -usbdevice tablet -drive file=/home/RHEL6.3-20120304.n.0-Server-x86_64-DVD1.iso,if=none,id=cdrom1 -device virtio-scsi-pci,id=cdrom -device scsi-cd,drive=cdrom1,scsi-id=0,lun=0 -nodefconfig -nodefaults 2.Check CD-ROM status in qemu monitor 3.eject CD-ROM in guest system #eject /dev/sr0 4.Check CD-ROM status in qemu monitor again Actual results: After step 4, tray-open's value still be 0 Expected results: tray-open's value should change to 1. Additional info: Passthrough virtio-scsi CD-ROM also has this issue.
Passthrough virtio-scsi CD-ROM is not able to sense the tray state. Looking into it for scsi-cd CD-ROM.
This is due to autoclose. It works if you do "echo 0 > /proc/sys/dev/cdrom/autoclose". Leaving it open to investigate how it works on real CDs, but since "change" works I'm lowering the priority.
verify this issue with two senario senaro 1) version: # uname -r 2.6.32-257.el6.x86_64 # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.262.el6.x86_64 senario 2) version: # uname -r 2.6.32-257.el6.x86_64 # rpm -q qemu-kvm qemu-kvm-0.12.1.2-2.265.el6.x86_64 steps: 1.boot a guest /usr/libexec/qemu-kvm -m 2G -smp 1 -cpu Penryn,+x2apic, -usbdevice tablet -drive file=/mnt/RHEL-Server-6.3-64-virtio.qcow2-newinstall5,format=qcow2,if=none,id=drive-ide0-0-0,werror=stop,rerror=stop,cache=none -device virtio-blk-pci,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=2 -netdev tap,id=hostnet0,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,mac=00:10:20:2d:31:21,bus=pci.0,addr=0x4,id=net0 -boot order=cdn,once=n,menu=on -uuid 3290efd3-7c9e-44f9-b5f7-af0f3a1b3066 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -monitor stdio -name rhel6.1 -spice port=1000,disable-ticketing -vga qxl -device virtio-balloon-pci,bus=pci.0,id=balloon0 -device usb-ehci,id=ehci -drive file=/mnt/RHEL6.3-20120313.2-Server-x86_64-DVD1.iso,if=none,id=cdrom1 -device virtio-scsi-pci,id=cdrom -device scsi-cd,drive=cdrom1,scsi-id=0,lun=0 -nodefconfig -nodefaults 2.Check CD-ROM status in qemu monitor (qemu) info block drive-ide0-0-0: removable=0 io-status=ok file=/mnt/RHEL-Server-6.3-64-virtio.qcow2-newinstall5 ro=0 drv=qcow2 encrypted=0 cdrom1: removable=1 locked=0 tray-open=0 io-status=ok file=/mnt/RHEL6.3-20120313.2-Server-x86_64-DVD1.iso ro=0 drv=raw encrypted=0 3.echo 0 > /proc/sys/dev/cdrom/autoclose in guest 4.eject CD-ROM in guest system #eject /dev/sr0 5.Check CD-ROM status in qemu monitor again (qemu)info block drive-ide0-0-0: removable=0 io-status=ok file=/mnt/RHEL-Server-6.3-64-virtio.qcow2-newinstall5 ro=0 drv=qcow2 encrypted=0 cdrom1: removable=1 locked=0 tray-open=1 io-status=ok file=/mnt/RHEL6.3-20120313.2-Server-x86_64-DVD1.iso ro=0 drv=raw encrypted=0 so,the stray-open value can be change when eject cdrom.
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: NEEDINFO
New feature in 6.3, no documentation needed.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -NEEDINFO+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