qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] CDROM Eject behaviour


From: Max Reitz
Subject: Re: [Qemu-block] CDROM Eject behaviour
Date: Mon, 16 Mar 2015 10:08:52 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 2015-03-13 at 07:09, Kevin Wolf wrote:
Am 13.03.2015 um 11:46 hat Peter Lieven geschrieben:
Hi,

I just stumbled across an old ticket where a user complains that an ejected CD 
is visible again after a reset.
It seems that the behaviour of qemu changed somewhen in the past (maybe years 
ago). I wonder
which behaviour would be correct or better.

If we eject a CD with the eject command via qmp or hmp we open the tray *AND* 
remove the media.

If the OS ejects a CD we just open the tray. So if the ATAPI or SCSI CDROM is 
resetted the tray is closed
and the CD is there again.

Its like we should behave like a tray CDROM or a slot-in CDROM.

A CD installer usually ejects the media after it has finished. Some ask to 
remove the media and press a key
some not.

Whats your opinion?
Are you aware of Max's series to fix and clean up media change? It also
decomposes 'eject' into separate monitor commands that only open the
tray, or only remove a medium from an already open tray.

Anyway, I don't think it actually changes anything about the difference
you mention above, because this is how it needs to work: The 'eject'
monitor command is supposed to close the image file, this necessarily
implies that the medium is removed. On the other hand, the guest can
open the tray, close it again and expect that the medium is still there
if the user hasn't changed it. I seem to remember that the Fedora
installer does something like this. So in this case we can't just remove
the medium.

By the way, things are getting even more interesting when the tray is
locked. In this case, we can only send a request to eject the medium to
the guest OS, but we don't know whether it will actually do that.

I'll defer to Max for the details of all of that if they are relevant
for you.

I hope my series doesn't change anything; if it did, I'm unaware of it.

But for the matter of this ticket: Well, if you eject a CD on a real machine and reboot, the BIOS is very likely to close the drive, and the medium will still be there unless the user removed it; I think it should be the same for qemu (with the "user removes it" being a QMP command).

Adding a way of creating a slot drive sounds like a good way out of it, but I don't think that I'll be the one implementing this (or at least I hope I won't be the one).

Max



reply via email to

[Prev in Thread] Current Thread [Next in Thread]