[libvirt] [PATCH v13] support offline migration

Eric Blake eblake at redhat.com
Fri Nov 9 04:06:53 UTC 2012


On 11/08/2012 08:54 PM, li guang wrote:
> 在 2012-11-08四的 20:28 -0700,Eric Blake写道:
>> On 11/08/2012 07:57 PM, li guang wrote:
>>>> What if you want to offline migrate a domain that is currently running?
>>>> I think it's better to first move qemuDomainCheckEjectableMedia down to
>>>> qemuMigrationBegin in a separate patch and then just use the code from
>>>> v12 (without using the offline label).
>>>
>>> sorry, I don't like to do offline migrate for a domain that's running.
>>
>> Why not, when we've already argued it can be useful?  You don't have to
>> support it in the same patch, but you should at least take the advice on
>> how to refactor things so that someone else that does like the idea can
>> extend things to provide it.  There's nothing wrong with having
>> persistent definitions of the same domain on more than one machine, as
>> long as only one machine at a time is running it; and after all, with
>> live migration, if you _don't_ pass the --undefinesource flag, you will
>> be left in the same situation where a persistent domain on the source is
>> left behind even when the running domain has migrated.
> 
> I mean we should do this explicitly, e.g. an flag to notify us we are 
> doing job for active domain by walking through offline path.
> I said this before, at comment on virsh change.

You ARE being explicit when you say 'virsh migrate --offline'.  If the
domain is transient, it must fail, but if the domain is persistent, then
whether or not it is running, you are requesting that ONLY the offline
state be migrated.

>>>
>>> without this how do you know you a offline migration at target side?
>>
>> By the presence or absence of the flag.  If the flag is present, you are
> 
> seem flags was forgotten at qemuDomainMigratePrepare3, so any
> preparation for offline migration will be impossible, isn't it?
> do you mean I should change MigratePrepare functions to add
> flags as a parameter?

Huh?  qemuDomainMigratePrepare3 already has a flags argument (arg 8),
and it is directly related to the flags argument that was originally
passed to virDomainMigrate() in libvirt.c.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121108/06dc4a40/attachment-0001.sig>


More information about the libvir-list mailing list