On Thu, Oct 22, 2009 at 12:07:49PM +0100, Daniel P. Berrange wrote:
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