[libvirt] kvm migration

Łukasz Mierzwa l.mierzwa at gmail.com
Wed May 20 08:06:58 UTC 2009


2009/5/20 Chris Lalancette <clalance at redhat.com>

> Łukasz Mierzwa wrote:
> > Dnia wtorek 19 maj 2009 o 22:20:06 Daniel P. Berrange napisał(a):
> >> On Tue, May 19, 2009 at 09:29:15PM +0200, ??ukasz Mierzwa wrote:
> >>> Hi,
> >>>
> >>> can someone explain me how migration works in libvirt? I got 2 machines
> >>> with ubuntu 9.04 (libvirt 0.6.1 and kvm 84), disk images are stored on
> >>> nfs share so both machines can access them. When I run live migration
> >>> (virsh migrate --live domain uri) my domain is migrated to second host
> >>> but:
> >>> 1. domain is defined on both hosts after migration, it does not
> disappear
> >>> from original host
> >>> 2. when I shutdown this domain on second host it gets undefined
> >>> so I guess that migration is only temporary but this is not what I
> want.
> >>> When I migrate domain to other host I want it to stay there, how can I
> do
> >>> that? I can't find anything about it in documentation on libvirt
> website,
> >>> google does not seem to know anything either.
> >> You need to distinguish between a persistent and transient guest.
> >> A persistent guest has a config file, a transient guest does not.
> >>
> >> If the guest on the source host is persistent, then after migration
> >> you should still see it on the source host as inactive. If it is
> >> transient, then all trace should have gone after migration.
> >>
> >> If the destination does not already have  a config file for the incoming
> >> guest, then it will become a transient guest. Once you shut it down on
> >> the destination, all trace will go away., If the destination has a
> config
> >> for the guest it will become persistent, and the guest should still
> >> exist.
> >>
> >> Based on your description I'd say your source host had a persistent
> guest,
> >> and the destination host did not have a config, so after migration the
> >> guest was transient.
> >>
> >>
> >> Daniel
> >
> > So if I want my guest to be undefined from the source host and stay on
> target
> > host I need to define him on target host before migration? Some info in
> 'virsh
> > help migrate' would be nice, and maybe '--persistent' option to
> auto-define it
> > on target before migration.
> > Thanks for help.
>
> Yeah, the persistent flag idea is a good one.  I think people would find
> that
> useful, and it's fairly easy to implement.  I'll give it a shot.
>

When I try to migrate do destination host with domain defined on both,
source and target, virsh just hangs on destination, migration does not
finish and I can't connect anymore to libvirt on destination, I needed to
SIGKILL it, SIGTERM did not stop it. It's 0.6.1 on ubuntu 9.04. Tried
several times and it always hang.

Łukasz Mierzwa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090520/f304d07e/attachment-0001.htm>


More information about the libvir-list mailing list