summaryrefslogtreecommitdiffstats
path: root/migration
diff options
context:
space:
mode:
authorJose Ricardo Ziviani2018-09-03 18:26:13 +0200
committerDr. David Alan Gilbert2018-09-26 13:26:38 +0200
commit827beacb474c60b1801399c40ec717c65f9c4e34 (patch)
tree505993c84c8a5acad13ee6892258338027383682 /migration
parentmigration: handle the error condition properly (diff)
downloadqemu-827beacb474c60b1801399c40ec717c65f9c4e34.tar.gz
qemu-827beacb474c60b1801399c40ec717c65f9c4e34.tar.xz
qemu-827beacb474c60b1801399c40ec717c65f9c4e34.zip
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 'migration')
-rw-r--r--migration/savevm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/migration/savevm.c b/migration/savevm.c
index 13e51f0e34..9692577318 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2078,7 +2078,9 @@ qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
/* Find savevm section */
se = find_se(idstr, instance_id);
if (se == NULL) {
- error_report("Unknown savevm section or instance '%s' %d",
+ error_report("Unknown savevm section or instance '%s' %d. "
+ "Make sure that your current VM setup matches your "
+ "saved VM setup, including any hotplugged devices",
idstr, instance_id);
return -EINVAL;
}