On Mon, Aug 08, 2011 at 11:53:26AM -0600, Eric Blake wrote:
On 08/08/2011 09:22 AM, Dave Allan wrote:
>>If the medium is ejected inside guest, and the source of the medium
>>is removed or renamed. libvirt will still tries to do cgroup setting
>>before starting the guest on dest side, that's the real problem. As
>>one will think it's reasonable to remove the source if it's
>>ejected. And we can't prevent one remove the source during the
>>migration (supposing the removing is before libvirt tries to do
>>cgroup setting on dest host.)
>
>Agreed, but that's a problem that I don't think we can solve except by
>documenting the behavior. The libvirt documentation has always
>clearly stated that the storage configuration must be the same on the
>src and dst hosts. We are discussing altering that constraint here in
>the case of medium that has been ejected, but I think we can be clear
>that the constraint is not being removed and that a guest's storage
>configuration must not be changed while a migration is in progress.
I thought the qemu folks were working on a series of patches to make
cd tray state part of the migration information. That is, if you
start a migration, then a guest ejects the cd, then the destination
will correctly see the ejected cd, even though the destination was
started with the tray closed. That is, libvirt should not have to
poll on cd tray state in order to correctly migrate, but should be
able to poll on cd tray state in order to report tray state to the
curious user.
The migration aspect of cd tray state generally has to be solved by
qemu - there's nothing libvirt can do if the guest changes cd tray
state after migration has started but before it has completed,
unless libvirt can poll the source after it has paused but before
the destination has been unpaused and issue appropriate monitor
commands on the destination to resync state; but that should only be
necessary if qemu doesn't migrate cd tray state in the first place,
and requires that qemu support tray state monitor commands for
libvirt to use.
Yeah, that was my concern about having the media appear back in the
drive following migration that I mentioned in my first response. I
think we're in agreement--I only think we need to poll for the tray
state for on migration so that we can correctly decide whether to
allow the migration if the media backing storage isn't present. I.e.,
if the guest has ejected the media from the drive we can permit
migration if the media isn't present on the dst.
Dave