qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 1/1] Disallow outward migration while awaiting in


From: Dr. David Alan Gilbert (git)
Subject: [Qemu-devel] [PATCH v2 1/1] Disallow outward migration while awaiting incoming migration
Date: Mon, 14 Apr 2014 17:03:59 +0100

From: "Dr. David Alan Gilbert" <address@hidden>

QEMU will assert if you attempt to start an outgoing migration on
a QEMU that's sitting waiting for an incoming migration (started
with -incoming), so disallow it with a proper error.

(This is a fix for https://bugzilla.redhat.com/show_bug.cgi?id=1086987 )

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
v2
   Just use error_setg rather than adding a new QERR_

 migration.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/migration.c b/migration.c
index bd1fb91..ac23275 100644
--- a/migration.c
+++ b/migration.c
@@ -419,6 +419,11 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
         return;
     }
 
+    if (runstate_check(RUN_STATE_INMIGRATE)) {
+        error_setg(errp, "Guest is waiting for an incoming migration");
+        return;
+    }
+
     if (qemu_savevm_state_blocked(errp)) {
         return;
     }
-- 
1.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]