Bug 484369

Summary: issuing eject on cdrom device does not update image status in machine details
Product: Red Hat Enterprise Linux 5 Reporter: Karel Volný <kvolny>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-13 16:01:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Karel Volný 2009-02-06 14:41:01 UTC
Description of problem:
When the virtual guest tries to eject the cdrom, the image simulating the disc is no longer available for the guest. When looking into virtual machine details -> Hardware, the "Source path" still points to the image and there is a button to disconnect the image. Trying to close the tray does not make it available again, I have to click the Disconnect button and then Connect the image again. (I wonder if the error isn't somewhere deeper than just the virt-manager interface?)

Version-Release number of selected component (if applicable):
virt-manager-0.5.3-10.el5

How reproducible:
always

Steps to Reproduce:
1. run some xen guest with cdrom set to a file (iso image)
2. within the guest, run "eject /dev/scd0" (or what is the actual device name)
3. try to acces the cdrom
4. on the host, take a look at the machine details => hardware => hdc (or the actual device name)
5. within the guest, run "eject -t /dev/scd0"
6. try to access the cdrom
  
Actual results:
3. /dev/scd0: No medium found
4. there is Disconnect button next to the image path
6. /dev/scd0: No medium found

Expected results:
3. /dev/scd0: No medium found
4. there is Connect button next to the image path
6. the cdrom device is readable

Additional info:
I have found this trying to install RHEL 5 as virtual guest. After the disc integrity checking phase, the tray is ejected. Then, as you continue with the installation, the tray is closed. This does not happen within the virtual machine, I had to Disconnect and then Connect the image again, otherwise I got an error that the disc cannot be found after the integrity checking.

Comment 1 Cole Robinson 2009-02-13 16:01:35 UTC
The problem with this, is that the hypervisor would need to be told by the VM that the media was ejected from within the VM. As far as I know there is no mechanism for this to be done, and would likely be non trivial, maybe even impossible with an unmodified FV OS.

Communication is largely one-way: virt-manager/libvirt/xen tells the VM what it's hardware did (disk added/removed, media ejected/inserted), not the other way around. As far as I know, this type of stuff isn't even implemented in upstream xen, so it's out of scope for RHEL5. Closing as WONTFIX.