]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: migration: Relax enforcement of memory hotplug support
authorPeter Krempa <pkrempa@redhat.com>
Tue, 8 Sep 2015 13:06:26 +0000 (15:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 9 Sep 2015 07:39:55 +0000 (09:39 +0200)
If the current live definition does not have memory hotplug enabled, but
the persistent one does libvirt would reject migration if the
destination does not support memory hotplug even if the user didn't want
to persist the VM at the destination and thus the XML containing the
memory hotplug definition would not be used. To fix this corner case the
code will check for memory hotplug in the newDef only if
VIR_MIGRATE_PERSIST_DEST was used.

src/qemu/qemu_migration.c

index d50d3675d7afb41e75fadab9655bec3484079b01..1846239b5aecdf7c3df29d7e49ad5f5fcf3ae0cf 100644 (file)
@@ -2989,7 +2989,8 @@ qemuMigrationBeginPhase(virQEMUDriverPtr driver,
     }
 
     if (vm->def->mem.max_memory ||
-        (vm->newDef &&
+        ((flags & VIR_MIGRATE_PERSIST_DEST) &&
+         vm->newDef &&
          vm->newDef->mem.max_memory))
         cookieFlags |= QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG;