qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] migrate: error message for ram_load size
@ 2012-11-03 16:22 Doug Goldstein
  2012-11-05 15:28 ` Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Doug Goldstein @ 2012-11-03 16:22 UTC (permalink / raw)
  To: qemu-devel; +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

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH] migrate: error message for ram_load size
@ 2012-10-29  6:16 Doug Goldstein
  0 siblings, 0 replies; 3+ messages in thread
From: Doug Goldstein @ 2012-10-29  6:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Doug Goldstein, kvm

Report an error when ramblock's sizes mismatch with a suggestion to the
user as to what went wrong.
---

libvirt uses migration to save the state, however when performing a
distro upgrade you might get an error starting your VMs up again without
much detail. This patch attempts to remedy that with extra error
messages.

Without patch:
$ virsh start expo
error: Failed to start domain expo
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/16
qemu: warning: error while loading state for instance 0x0 of device 'ram'
load of migration failed

With patch:
$ virsh start expo
error: Failed to start domain expo
error: internal error Process exited while reading console log output: char device redirected to /dev/pts/16
qemu: warning: error ramblock '0000:00:02.0/qxl.vrom' length 16384 != 8192. Did you change the ROM/BIOS or RAM size between restarts?
qemu: warning: error while loading state for instance 0x0 of device 'ram'
load of migration failed


---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-05 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-03 16:22 [Qemu-devel] [PATCH] migrate: error message for ram_load size Doug Goldstein
2012-11-05 15:28 ` Eric Blake
  -- strict thread matches above, loose matches on Subject: below --
2012-10-29  6:16 Doug Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).