[libvirt] [PATCH v9] support offline migration
Daniel P. Berrange
berrange at redhat.com
Wed Oct 10 13:38:42 UTC 2012
On Tue, Sep 25, 2012 at 03:45:24PM +0800, liguang wrote:
> original migration did not aware of offline case,
> so, try to support offline migration quietly
> (did not disturb original migration) by pass
> VIR_MIGRATE_OFFLINE flag to migration APIs if only
> the domain is really inactive, and
> migration process will not puzzled by domain
> offline and exit unexpectedly.
> these changes did not take care of disk images the
> domain required, for them could be transferred by
> other APIs as suggested, then VIR_MIGRATE_OFFLINE
> should not combined with VIR_MIGRATE_NON_SHARED_*.
> so, this migration result is just make domain
> definition alive at target side.
>
> Signed-off-by: liguang <lig.fnst at cn.fujitsu.com>
> ---
> include/libvirt/libvirt.h.in | 1 +
> src/qemu/qemu_driver.c | 15 ++++++++++++
> src/qemu/qemu_migration.c | 53 ++++++++++++++++++++++++++++++++++++-----
> src/qemu/qemu_migration.h | 3 +-
> tools/virsh-domain.c | 6 ++++
> 5 files changed, 70 insertions(+), 8 deletions(-)
In my testing this patch is still badly broken, apparently no different
than the previous version I tested
I have 2 hosts, avocado & mustard and stopped guest vm1. I try to
migrate the VM from avocado to mustard thus:
# ./tools/virsh -c qemu+ssh://root@avocado/system migrate --undefinesource --offline vm1 qemu+ssh://root@mustard/system
This should *not* even run because I did not pass the --persistent flag,
but it does in fact complete. I creates a guest 'vm1' on the target host,
but does not write out any config. This is a completely bogus scenario.
If a guest has no config, it is transient and thus must not exist if it
is shutoff, but your patch is resulting in a transient, shutoff guest.
If I set the '--persistent' flag, there is no diffrence in behaviour. We
still get a transient shutoff guest on the target.
Also the '--undefinesource' flag appeared to have no effect at all. The
guest still exists on the source, both in libvirtd & on disk.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list