aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2011-01-11 14:39:43 -0700
committerMichael S. Tsirkin <mst@redhat.com>2011-01-17 18:22:17 +0200
commitdc9121210eaf34e768901ffc6992dd13062c743a (patch)
treeb301ef9f52367cc37aa29d739e78b00be005865f /migration.c
parent668643b025dcff72b9b18adb5df794be9e9be5dc (diff)
downloadqemu-dc9121210eaf34e768901ffc6992dd13062c743a.zip
qemu-dc9121210eaf34e768901ffc6992dd13062c743a.tar.gz
qemu-dc9121210eaf34e768901ffc6992dd13062c743a.tar.bz2
savevm: Fix no_migrate
The no_migrate save state flag is currently only checked in the last phase of migration. This means that we potentially waste a lot of time and bandwidth with the live state handlers before we ever check the no_migrate flags. The error message printed when we catch a non-migratable device doesn't get printed for a detached migration. And, no_migrate does nothing to prevent an incoming migration to a target that includes a non-migratable device. This attempts to fix all of these. One notable difference in behavior is that an outgoing migration now checks for non-migratable devices before ever connecting to the target system. This means the target will remain listening rather than exit from failure. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/migration.c b/migration.c
index e5ba51c..d593b1d 100644
--- a/migration.c
+++ b/migration.c
@@ -88,6 +88,10 @@ int do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data)
return -1;
}
+ if (qemu_savevm_state_blocked(mon)) {
+ return -1;
+ }
+
if (strstart(uri, "tcp:", &p)) {
s = tcp_start_outgoing_migration(mon, p, max_throttle, detach,
blk, inc);