Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 539250 - Cannot eject cd-rom when configured to host cd-rom
Cannot eject cd-rom when configured to host cd-rom
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.4.z
All Linux
low Severity low
: rc
: ---
Assigned To: Eduardo Habkost
Virtualization Bugs
:
Depends On:
Blocks: 581789
  Show dependency treegraph
 
Reported: 2009-11-19 13:17 EST by James Ko
Modified: 2013-01-09 17:02 EST (History)
8 users (show)

See Also:
Fixed In Version: kvm-83-143.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 581789 (view as bug list)
Environment:
Last Closed: 2010-03-30 03:55:55 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0271 normal SHIPPED_LIVE Important: kvm security, bug fix and enhancement update 2010-03-29 09:19:48 EDT

  None (edit)
Description James Ko 2009-11-19 13:17:40 EST
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.
Comment 1 Eduardo Habkost 2009-11-19 14:47:01 EST
(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.
Comment 3 Eduardo Habkost 2009-11-30 16:13:44 EST
Fix submitted upstream: http://marc.info/?l=qemu-devel&m=125961532916885
Comment 4 Andrius Benokraitis 2009-11-30 21:32:33 EST
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.
Comment 10 Qunfang Zhang 2010-01-20 00:20:39 EST
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.
Comment 13 errata-xmlrpc 2010-03-30 03:55:55 EDT
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

Note You need to log in before you can comment on or make changes to this bug.