Blob Blame History Raw
From db226bbecedc7873a71f202fd01c24ba086235f1 Mon Sep 17 00:00:00 2001
Message-Id: <db226bbecedc7873a71f202fd01c24ba086235f1@dist-git>
From: Jiri Denemark <jdenemar@redhat.com>
Date: Wed, 2 Nov 2016 14:20:42 +0100
Subject: [PATCH] qemu: Reset post-copy capability after migration

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@redhat.com>
(cherry picked from commit fe1dd39087ae9a49888bc72dee38ff0e6f639693)

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 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 7426bfd..496a3f1 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -6401,6 +6401,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