[libvirt] how can dst know that migration is over?

Daniel P. Berrange berrange at redhat.com
Thu Oct 22 11:07:49 UTC 2009


On Thu, Oct 22, 2009 at 12:26:41PM +0200, Dan Kenigsberg wrote:
> When migrating a domain from src to dst, it first appears 'suspended' at
> the dst. When it's 'running', higher-level management can tell that
> migration is done.
> 
> However, when bugzilla.redhat.com/519204 is fixed, I can no longer count
> on that - migrated domain may still be suspended at the destination.
> 
> So how can I tell, at the destination, that migration is over? I could
> add higher-level communication from src to dst, but I am reluctant to
> add another failure mode. I'd rather have libvirt tell me, "hey
> migration is done".

You'll get a series of events emitted

 1. On destination:

      VIR_DOMAIN_EVENT_STARTED + VIR_DOMAIN_EVENT_STARTED_MIGRATED

 2. On source, if non-live migration:

     VIR_DOMAIN_EVENT_SUSPENDED + VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED

 3. On source, if completed

     VIR_DOMAIN_EVENT_STOPPED + VIR_DOMAIN_EVENT_STOPPED_MIGRATED

 4. On source, if aborted & non-live 

     VIR_DOMAIN_EVENT_RESUMED + VIR_DOMAIN_EVENT_RESUMED_MIGRATED

 5. On destination, if successful

     VIR_DOMAIN_EVENT_RESUMED + VIR_DOMAIN_EVENT_RESUMED_MIGRATED

 6. On destination if failed

     VIR_DOMAIN_EVENT_STOPPED + VIR_DOMAIN_EVENT_STOPPED_FAILED



Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list