From: Jiri Denemark Date: Tue, 10 May 2022 13:20:25 +0000 (+0200) Subject: qemu: Don't set VIR_MIGRATE_PAUSED for post-copy resume X-Git-Tag: v8.5.0-rc1~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5e603c8088fff58790b2ec28429b9fc4da7dec6;p=thirdparty%2Flibvirt.git qemu: Don't set VIR_MIGRATE_PAUSED for post-copy resume For historical reasons we automatically enabled VIR_MIGRATE_PAUSED flag when a migration was started for a paused domain. However, when resuming failed post-copy migration the domain on the source host will always be paused (as it is already running on the destination host). We must avoid enabling VIR_MIGRATE_PAUSED in this case. Signed-off-by: Jiri Denemark Reviewed-by: Peter Krempa Reviewed-by: Pavel Hrdina --- diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index a5f18f953e..45ada5feeb 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -3290,7 +3290,9 @@ virDomainMigrateVersion3Full(virDomainPtr domain, ret = virDomainGetInfo(domain, &info); state = info.state; } - if (ret == 0 && state == VIR_DOMAIN_PAUSED) + if (ret == 0 && + state == VIR_DOMAIN_PAUSED && + !(flags & VIR_MIGRATE_POSTCOPY_RESUME)) flags |= VIR_MIGRATE_PAUSED; destflags = flags & ~(VIR_MIGRATE_ABORT_ON_ERROR |