aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 95ed511061..9b2bf00a72 100644
--- a/vl.c
+++ b/vl.c
@@ -6030,8 +6030,11 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
- if (loadvm)
- load_vmstate(cur_mon, loadvm);
+ if (loadvm) {
+ if (load_vmstate(cur_mon, loadvm) < 0) {
+ autostart = 0;
+ }
+ }
if (incoming) {
qemu_start_incoming_migration(incoming);