On Fri, May 27, 2011 at 04:35:24PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" <berra...@redhat.com> writes: > > > On Fri, May 27, 2011 at 10:39:35AM -0300, Luiz Capitulino wrote: > >> On Fri, 27 May 2011 18:10:08 +0530 > >> Amit Shah <amit.s...@redhat.com> wrote: > [...] > >> > What's weird though is 'eject' in the monitor makes the cdrom go away > >> > -- a subsequent mount in the guest results in a no medium error. I > >> > thought we had solved that, Markus? > >> > > >> > By not doing a bdrv_close() in the do_eject()->eject_device() call > >> > path this starts working as expected. > >> > >> Yes, also note that with the -f option eject is capable of purging > >> any block device. I wonder if libvirt (or any client) relies on this. > > > > libvirt will only issue 'eject' on devices which are CDROMs, or Floppy, > > never hard disks, etc. > > Any use of -f? Recommend to stay away from it. > > https://bugzilla.redhat.com/show_bug.cgi?id=676528
When ejecting CDROM media, there's an option to supply a 'FORCE' flag to the libvirt API, so media is ejected even if the guest OS has locked the tray, or is crashed Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|