From: Peter Krempa Date: Tue, 24 Sep 2019 12:59:04 +0000 (+0200) Subject: qemu: migration: Forbid only remote migration if autodestroy is active for VM X-Git-Tag: v5.8.0-rc1~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fe02fd2565ceb9b3024d9859e367c9c3d7d27d3;p=thirdparty%2Flibvirt.git qemu: migration: Forbid only remote migration if autodestroy is active for VM Semantically we can't guarantee that we'll be able to destroy the VM on the remote host, thus we can't allow remote migration. All other forms of migration (e.g. saving to file) are okay though as they don't clash with semantics of the flag. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake --- diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 3c45ba35e6..a98ec2d55a 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1155,7 +1155,8 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver, /* following checks don't make sense for offline migration */ if (!(flags & VIR_MIGRATE_OFFLINE)) { - if (qemuProcessAutoDestroyActive(driver, vm)) { + if (remote && + qemuProcessAutoDestroyActive(driver, vm)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("domain is marked for auto destroy")); return false;