-S is not honored by qemu on incoming migration. If a domain is migrated
while paused, thus, it will start running on the remote machine; this
is wrong.
Given the trivial patch to fix this, it looks more like a thinko
than anything else, probably dating back to the qemu-kvm merge.
The interesting part is that the -S mechanism was in fact *used* when
migrating (setting autostart = 0) and the incoming migration code was
starting the VM at the end of the migration.
Since I was removing the vm_start from there, I also corrected a related
imprecision. The code was doing a vm_stop "just in case", but we can
be sure that the VM is not running---the vm_start call in vl.c has not
been reached yet, and we rely on this now that the vm_start is removed
in migrate-*.c. So it's better to assert (!vm_running) instead.
---
migration-exec.c | 3 +--
migration-tcp.c | 4 +---
vl.c | 4 +---
3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/migration-exec.c b/migration-exec.c
index 0dd5aff..5a111a0 100644
--- a/migration-exec.c
+++ b/migration-exec.c
@@ -109,7 +109,7 @@ static void exec_accept_incoming_migration(void *opaque)
QEMUFile *f = opaque;
int ret;
- vm_stop(0); /* just in case */
+ assert(!vm_running); /* just in case */