[libvirt] [PATCH v13] support offline migration
li guang
lig.fnst at cn.fujitsu.com
Fri Nov 9 04:31:06 UTC 2012
在 2012-11-08四的 21:06 -0700,Eric Blake写道:
> 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.
reasonable? maybe.
>
> >>>
> >>> 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.
>
please check qemuMigrationPrepareDirect called in
qemuDomainMigratePrepare3
--
li guang lig.fnst at cn.fujitsu.com
linux kernel team at FNST, china
More information about the libvir-list
mailing list