On 03/12/2012 04:26 PM, Paolo Bonzini wrote:
Il 12/03/2012 05:55, Osier Yang ha scritto:
> What will be the problem in such case if the tray is "open" and we
> don't start with the physical CD-ROM in QEMU command line?
Closing the drive tray will not automatically close the guest tray.
(It
doesn't now because of QEMU limitations---but if you open with
no
physical CD-ROM, there's no hope of fixing it :)).
lol, okay
>> Or you can just drop this patch, and only print the tray state in the
>> virsh dumpxml output. There are other attributes that already handled
>> this way.
>
> No, Print the tray status as internal XML is opposite with the
> purpose of these patches, we don't want the domain migrated
> or (saved + restored) see the medium still exists in guest
> while it's ejected before.
Ah, understood. Was it stated in commit messages?
Yes,
<snip>
[2/9] ~ [5/9]:
New attribute "tray" is added to disk target, it indicates
the tray status of removable disk, i.e. CDROM and Floppy disks,
its value could be either of "open" or "closed", defaults to
"closed", and a removable disk with tray == "open" won't have
the source when domain is started. The value of "tray" will
be updated while tray moved event is emitted from guest.
Prior to these patches, if the user ejected the medium of
removable disk from guest side, and then do migration or
save/restoring, the guest will still starts the medium source
,and thus the medium will still exists in guest, which is
strange. These patches fix it.
</snip>
A bit long though, :-)
VMs with physical CD-ROMs in general should not be migrated, so I think
migration is not a problem in this case.
QEMU will prohibit that, right? if so, we have no problem here.
Either migrate or (save + restore).
Osier