Description of problem: QEMU does not release cd-rom on 'eject ide1-cd0' when connected to the host's cd-rom drive /dev/scd0 Version-Release number of selected component (if applicable): kvm-83-105.el5_4.9 How reproducible: Everytime Steps to Reproduce: 1. Connect the physical cd-rom drive to virtual cd-drive using 'change' commmand 2. Verify drive is connected with 'info block' 3. Attempt to release association the drive using 'eject' command Actual results: info block is still showing physical drive association Expected results: info block should show cd-rom device ide1-cd0 as [not inserted] Additional info: Unknown if it makes a difference but there is no physical disc present in the drive. Will update once I can get test results with disc present. Changing the cd-rom to another file without first ejecting successfully changes the drive in the guest.
(In reply to comment #0) > Additional info: > Unknown if it makes a difference but there is no physical disc present in the > drive. Will update once I can get test results with disc present. It does. For some reason, the eject code is conditional on bdrv_is_inserted(), that will return false if there is no physical disk inserted. I am investigating why it does that.
Fix submitted upstream: http://marc.info/?l=qemu-devel&m=125961532916885
Removing Cisco from 'partner' field since this isn't a bugzilla being requested/sponsored by the Cisco Engineering team via Red Hat Engineering Partner Management.
Can reproduce in kvm-83-142.el5. Re-test in kvm-83-147.el5,this issue does not exist. Steps: 1.boot a guest.(I tested win2k3 guest and rhel3.9 guest.) /usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -m 2G -smp 2 -drive file=/root/win2k3-32-bak.raw,media=disk,if=ide -net nic,vlan=0,macaddr=10:1a:4a:10:20:4d,model=rtl8139 -net tap,vlan=0,script=/etc/qemu-ifup -cpu qemu64,+sse2 -boot c -monitor stdio -vnc :10 2.(qemu)info block ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] 3.(qemu)change ide1-cd0 /dev/cdrom 4.(qemu)info block ide1-cd0: type=cdrom removable=1 locked=0 file=/dev/cdrom ro=0 drv=host_device 5.(qemu)eject ide1-cd0 (qemu)info block ide1-cd0: type=cdrom removable=1 locked=0 file=/dev/cdrom ro=0 drv=host_device Re-test with the same steps in kvm-83-147.el5.This issue does not exist. 4.(qemu)info block ide1-cd0: type=cdrom removable=1 locked=0 file=/dev/cdrom ro=0 drv=host_device 5.(qemu)eject ide1-cd0 (qemu)info block ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] This issue only happened when there is no physical disc present in the drive. I tested with the same steps when physical disc present.It works well. And also I tested changing the cd-rom to an file(for example:rhle5.4-32.qcow2),it works well too.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0271.html