aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorJose Ricardo Ziviani <joserz@linux.ibm.com>2018-09-03 13:26:13 -0300
committerDr. David Alan Gilbert <dgilbert@redhat.com>2018-09-26 12:26:38 +0100
commit827beacb474c60b1801399c40ec717c65f9c4e34 (patch)
tree505993c84c8a5acad13ee6892258338027383682 /vl.c
parente8f3735fa3aa457303534121794b0452d22d440f (diff)
Add a hint message to loadvm and exits on failure
This patch adds a small hint for the failure case of the load snapshot process. It may be useful for users to remember that the VM configuration has changed between the save and load processes. (qemu) loadvm vm-20180903083641 Unknown savevm section or instance 'cpu_common' 4. Make sure that your current VM setup matches your saved VM setup, including any hotplugged devices Error -22 while loading VM state (qemu) device_add host-spapr-cpu-core,core-id=4 (qemu) loadvm vm-20180903083641 (qemu) c (qemu) info status VM status: running It also exits Qemu if the snapshot cannot be loaded before reaching the main loop (-loadvm in the command line). $ qemu-system-ppc64 ... -loadvm vm-20180903083641 qemu-system-ppc64: Unknown savevm section or instance 'cpu_common' 4. Make sure that your current VM setup matches your saved VM setup, including any hotplugged devices qemu-system-ppc64: Error -22 while loading VM state $ Signed-off-by: Jose Ricardo Ziviani <joserz@linux.ibm.com> Message-Id: <20180903162613.15877-1-joserz@linux.ibm.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vl.c b/vl.c
index 694bb67890..afbbec2383 100644
--- a/vl.c
+++ b/vl.c
@@ -4530,6 +4530,7 @@ int main(int argc, char **argv, char **envp)
if (load_snapshot(loadvm, &local_err) < 0) {
error_report_err(local_err);
autostart = 0;
+ exit(1);
}
}