aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2012-10-29 00:55:53 -0500
committerDoug Goldstein <cardoe@cardoe.com>2013-01-18 21:02:09 -0600
commit9489a8c013cb96f6dc8b4fd3f8fe63d0afe9f8dd (patch)
treede268419d4f7da33efb09deb6103897a2e40d660
parentCall MADV_HUGEPAGE for guest RAM allocations (diff)
downloadqemu-kvm-1.2.0-gentoo.tar.gz
qemu-kvm-1.2.0-gentoo.tar.bz2
qemu-kvm-1.2.0-gentoo.zip
migrate: error message for ram_load sizeqemu-kvm-1.2.2-gentoo-r1qemu-kvm-1.2.0-gentoo
Report an error when ramblock's sizes mismatch with a suggestion to the user as to what went wrong. If a user has a managedsave state by libvirt, which is the default now, and upgrades their distro, which in turn upgrades QEMU, they will be surprised by the fact that their VMs fail to start. The reason for this is that the default ROM sizes changed recently which makes it not possible to migrate from that saved state. However the error message really does not provide details as to what went wrong. This patch attempts to provide more details see: http://lists.nongnu.org/archive/html/qemu-devel/2012-10/msg03746.html http://lists.nongnu.org/archive/html/qemu-devel/2012-10/msg04108.html Signed-off-by: Doug Goldstein <cardoe@cardoe.com> (cherry picked from commit 4a9f00c12caa9e28992d76c18aeec468295bb157)
-rw-r--r--arch_init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch_init.c b/arch_init.c
index 5c912942b..9befdb767 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -732,6 +732,11 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (!strncmp(id, block->idstr, sizeof(id))) {
if (block->length != length) {
+ fprintf(stderr, "qemu: warning: error ramblock "
+ "'%s' length %ld != %ld. Did you "
+ "change the ROM/BIOS or RAM size "
+ "between restarts?\n", id,
+ block->length, length);
ret = -EINVAL;
goto done;
}