[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/12] Add a hint message to loadvm and exits on fail
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PULL 04/12] Add a hint message to loadvm and exits on failure |
Date: |
Thu, 13 Sep 2018 14:53:35 +0200 |
From: Jose Ricardo Ziviani <address@hidden>
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 <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Juan Quintela <address@hidden>
---
migration/savevm.c | 4 +++-
vl.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
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;
}
diff --git a/vl.c b/vl.c
index 5ba06adf78..c63270a76a 100644
--- a/vl.c
+++ b/vl.c
@@ -4620,6 +4620,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);
}
}
--
2.17.1
- [Qemu-devel] [PULL 00/12] Migration queue, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 02/12] migration: fix calculating xbzrle_counters.cache_miss_rate, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 01/12] migration/rdma: Fix uninitialised rdma_return_path, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 03/12] migration: handle the error condition properly, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 07/12] migration: use save_page_use_compression in flush_compressed_data, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 04/12] Add a hint message to loadvm and exits on failure,
Juan Quintela <=
- [Qemu-devel] [PULL 06/12] migration: show the statistics of compression, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 05/12] migration: do not flush_compressed_data at the end of iteration, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 08/12] tests/migration: Convert x86 boot block compilation script into Makefile, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 10/12] tests/migration: Add migration-test header file, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 09/12] tests/migration: Support cross compilation in generating boot header file, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 11/12] tests: Add migration test for aarch64, Juan Quintela, 2018/09/13
- [Qemu-devel] [PULL 12/12] tests/migration: Enable the migration test on s390x, too, Juan Quintela, 2018/09/13
- Re: [Qemu-devel] [PULL 00/12] Migration queue, Peter Maydell, 2018/09/25