render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
7a3408
From a5d2762f9a375c79703e446e9f8e428ffcd4a9d1 Mon Sep 17 00:00:00 2001
7a3408
Message-Id: <a5d2762f9a375c79703e446e9f8e428ffcd4a9d1@dist-git>
7a3408
From: Peter Krempa <pkrempa@redhat.com>
7a3408
Date: Tue, 22 Sep 2015 16:59:36 +0200
7a3408
Subject: [PATCH] qemu: migration: Relax enforcement of memory hotplug support
7a3408
7a3408
https://bugzilla.redhat.com/show_bug.cgi?id=1252685
7a3408
7a3408
If the current live definition does not have memory hotplug enabled, but
7a3408
the persistent one does libvirt would reject migration if the
7a3408
destination does not support memory hotplug even if the user didn't want
7a3408
to persist the VM at the destination and thus the XML containing the
7a3408
memory hotplug definition would not be used. To fix this corner case the
7a3408
code will check for memory hotplug in the newDef only if
7a3408
VIR_MIGRATE_PERSIST_DEST was used.
7a3408
7a3408
(cherry picked from commit a98e5a78153644e0f13b34c69d60b7a866c4401a)
7a3408
7a3408
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7a3408
---
7a3408
 src/qemu/qemu_migration.c | 3 ++-
7a3408
 1 file changed, 2 insertions(+), 1 deletion(-)
7a3408
7a3408
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
7a3408
index cee82fa..58fcb94 100644
7a3408
--- a/src/qemu/qemu_migration.c
7a3408
+++ b/src/qemu/qemu_migration.c
7a3408
@@ -2989,7 +2989,8 @@ qemuMigrationBeginPhase(virQEMUDriverPtr driver,
7a3408
     }
7a3408
 
7a3408
     if (vm->def->mem.max_memory ||
7a3408
-        (vm->newDef &&
7a3408
+        ((flags & VIR_MIGRATE_PERSIST_DEST) &&
7a3408
+         vm->newDef &&
7a3408
          vm->newDef->mem.max_memory))
7a3408
         cookieFlags |= QEMU_MIGRATION_COOKIE_MEMORY_HOTPLUG;
7a3408
 
7a3408
-- 
7a3408
2.5.3
7a3408