[libvirt] [PATCH] qemu: Reset post-copy capability after migration

Jiri Denemark jdenemar at redhat.com
Wed Nov 2 14:01:41 UTC 2016


Unlike other migration capabilities, post-copy is also set on the
destination host which means it doesn't disappear once domain is
migrated. As a result of that other functionality which internally uses
migration to a file (virDomainManagedSave, virDomainSave,
virDomainCoreDump) may fail after migration because the post-copy
capability is still set.

https://bugzilla.redhat.com/show_bug.cgi?id=1374718

Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
---

Notes:
    We need a more generic way to store and reset migration
    capabilities and parameters on both sides of migration since we
    need to reset them in case migration fails. But it will need a
    little bit more work, so let's start with this simple patch
    fixing the most visible issue. I'll work on the generic solution
    later.

 src/qemu/qemu_migration.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 1c4a80c..d4a55d8 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -6418,6 +6418,9 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
          */
         if (inPostCopy)
             VIR_FREE(priv->job.completed);
+
+        qemuMigrationSetPostCopy(driver, vm, false,
+                                 QEMU_ASYNC_JOB_MIGRATION_IN);
     }
 
     qemuMigrationJobFinish(driver, vm);
-- 
2.10.2




More information about the libvir-list mailing list