Milan Zamazal
2020-Jan-21 14:28 UTC
How to detect completion of a paused VM migration on the destination?
Hi, when a normally running VM is migrated, libvirt sends VIR_DOMAIN_EVENT_RESUMED_MIGRATED event on the destination once the migration completes. I can see that when a paused VM is migrated, libvirt sends VIR_DOMAIN_EVENT_SUSPENDED_PAUSED instead. Since there seems to be nothing migration specific about VIR_DOMAIN_EVENT_SUSPENDED_PAUSED event, my question is: Is it safe to assume on the destination that this event signals completion of the incoming migration (unless VIR_DOMAIN_EVENT_RESUMED_MIGRATED is received before)? Thanks, Milan
Michal Privoznik
2020-Jan-22 08:09 UTC
Re: How to detect completion of a paused VM migration on the destination?
On 1/21/20 3:28 PM, Milan Zamazal wrote:> Hi, > > when a normally running VM is migrated, libvirt sends > VIR_DOMAIN_EVENT_RESUMED_MIGRATED event on the destination once the > migration completes. I can see that when a paused VM is migrated, > libvirt sends VIR_DOMAIN_EVENT_SUSPENDED_PAUSED instead. > > Since there seems to be nothing migration specific about > VIR_DOMAIN_EVENT_SUSPENDED_PAUSED event, my question is: Is it safe to > assume on the destination that this event signals completion of the > incoming migration (unless VIR_DOMAIN_EVENT_RESUMED_MIGRATED is received > before)?Yes. This is the code that handles the finish phase of migration: https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/qemu/qemu_migration.c;h=29d228a8d9345ec8e2853571444614008a95e914;hb=HEAD#l5105 which can be read as the following pseudo code: if (postCopy) sendEvent(VIR_DOMAIN_EVENT_RESUMED_MIGRATED); if (domain.paused) sendEvent(VIR_DOMAIN_EVENT_SUSPENDED_PAUSED); Michal
Milan Zamazal
2020-Jan-22 10:15 UTC
Re: How to detect completion of a paused VM migration on the destination?
Michal Privoznik <mprivozn@redhat.com> writes:> On 1/21/20 3:28 PM, Milan Zamazal wrote: >> Hi, >> > >> when a normally running VM is migrated, libvirt sends >> VIR_DOMAIN_EVENT_RESUMED_MIGRATED event on the destination once the >> migration completes. I can see that when a paused VM is migrated, >> libvirt sends VIR_DOMAIN_EVENT_SUSPENDED_PAUSED instead. >> >> Since there seems to be nothing migration specific about >> VIR_DOMAIN_EVENT_SUSPENDED_PAUSED event, my question is: Is it safe to >> assume on the destination that this event signals completion of the >> incoming migration (unless VIR_DOMAIN_EVENT_RESUMED_MIGRATED is received >> before)? > > Yes. This is the code that handles the finish phase of migration: > > https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/qemu/qemu_migration.c;h=29d228a8d9345ec8e2853571444614008a95e914;hb=HEAD#l5105 > > which can be read as the following pseudo code: > > if (postCopy) > sendEvent(VIR_DOMAIN_EVENT_RESUMED_MIGRATED); > > if (domain.paused) > sendEvent(VIR_DOMAIN_EVENT_SUSPENDED_PAUSED);OK, thank you for clarification. Regards, Milan
Seemingly Similar Threads
- How to detect completion of a paused VM migration on the destination?
- Re: unable to migrate: virPortAllocatorSetUsed:299 : internal error: Failed to reserve port 49153
- using StatEt IDE for Eclipse
- [PATCH v7 08/11] x86, kvm/x86.c: support vcpu preempted check
- Need Help with StatET Error/Bug? on Ubuntu 8.10 amd64