diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2014-04-14 17:03:59 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2014-05-05 22:15:03 +0200 |
commit | ca99993adc9205c905dba5dc1bb819959ada7200 (patch) | |
tree | 415006aba72b825cd3432bd32fc44a727f33569b /migration.c | |
parent | a890a2f9137ac3cf5b607649e66a6f3a5512d8dc (diff) | |
download | qemu-ca99993adc9205c905dba5dc1bb819959ada7200.zip qemu-ca99993adc9205c905dba5dc1bb819959ada7200.tar.gz qemu-ca99993adc9205c905dba5dc1bb819959ada7200.tar.bz2 |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |