]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: migration: Forbid only remote migration if autodestroy is active for VM
authorPeter Krempa <pkrempa@redhat.com>
Tue, 24 Sep 2019 12:59:04 +0000 (14:59 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 25 Sep 2019 06:38:51 +0000 (08:38 +0200)
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 <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_migration.c

index 3c45ba35e6a536246dbb8176f163c0f488688c3a..a98ec2d55a151666ecb1498ca6607e6ae4d690b8 100644 (file)
@@ -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;