aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2009-07-27 23:17:51 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-27 21:22:28 -0500
commit3e0d1ad50c00cf5e9d6b23225725d785f6937229 (patch)
treeccff57120a4eafb1c81d53b77061871fcfe6db03 /vl.c
parent96bc323100b6132e3b39b664d0687225486fbcbe (diff)
fix migration to obey -S
Since migration returns right away, starting the VM right after calling qemu_start_incoming_migration is wrong even if -S is not passed. We have to do this after migration has completed. Cc: Glauber Costa <glommer@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 0d03fd6f7a..ba8814a27b 100644
--- a/vl.c
+++ b/vl.c
@@ -196,7 +196,7 @@ ram_addr_t ram_size;
int nb_nics;
NICInfo nd_table[MAX_NICS];
int vm_running;
-static int autostart;
+int autostart;
static int rtc_utc = 1;
static int rtc_date_offset = -1; /* -1 means no change */
int cirrus_vga_enabled = 1;
@@ -6085,7 +6085,7 @@ int main(int argc, char **argv, char **envp)
qemu_start_incoming_migration(incoming);
}
- if (autostart)
+ else if (autostart)
vm_start();
#ifndef _WIN32