[libvirt] kvm migration

Łukasz Mierzwa l.mierzwa at gmail.com
Tue May 19 20:47:07 UTC 2009


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.

Łukasz Mierzwa




More information about the libvir-list mailing list