From dc9121210eaf34e768901ffc6992dd13062c743a Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Tue, 11 Jan 2011 14:39:43 -0700 Subject: 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 Signed-off-by: Michael S. Tsirkin --- migration.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'migration.c') diff --git a/migration.c b/migration.c index e5ba51c314..d593b1df5d 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); -- cgit v1.2.3-55-g7522