aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2014-04-14 17:03:59 +0100
committerJuan Quintela <quintela@redhat.com>2014-05-05 22:15:03 +0200
commitca99993adc9205c905dba5dc1bb819959ada7200 (patch)
tree415006aba72b825cd3432bd32fc44a727f33569b /migration.c
parenta890a2f9137ac3cf5b607649e66a6f3a5512d8dc (diff)
Disallow outward migration while awaiting incoming migration
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 <dgilbert@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/migration.c b/migration.c
index bd1fb912ae..ac232758b9 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;
}