Received: from eggs.gnu.org ([208.118.235.92]:59345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUgUu-0007TQ-H5 for qemu-devel@nongnu.org; Sat, 03 Nov 2012 12:23:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TUgUt-0004QV-3J for qemu-devel@nongnu.org; Sat, 03 Nov 2012 12:23:00 -0400 Received: from mail-ye0-f173.google.com ([209.85.213.173]:62649) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TUgUs-0004QQ-VP for qemu-devel@nongnu.org; Sat, 03 Nov 2012 12:22:59 -0400 Received: by mail-ye0-f173.google.com with SMTP id l3so824167yen.4 for ; Sat, 03 Nov 2012 09:22:58 -0700 (PDT) From: Doug Goldstein Date: Sat, 3 Nov 2012 11:22:52 -0500 Message-Id: <1351959772-21473-1-git-send-email-cardoe@cardoe.com> Subject: [Qemu-devel] [PATCH] migrate: error message for ram_load size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Doug Goldstein 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 --- arch_init.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index 8c3bb0d..33f783b 100644 --- a/arch_init.c +++ b/arch_init.c @@ -810,6 +810,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; } -- 1.7.8.6