qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] save/restore broken?
@ 2009-08-11 16:39 Paolo Bonzini
  2009-08-13 18:48 ` Luiz Capitulino
  0 siblings, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2009-08-11 16:39 UTC (permalink / raw)
  To: qemu-devel

Hi all,

if I try to save and restore an image using current qemu and current 
libvirt, the load fails.  Comparing a preexisting save file and the new 
save file generated by QEMU master, I get differences in an ide block 
like this (cmp output):

67500802   0  20
67500803  20   0
67500808   0   1
67500809   1   0
67500812   0  10
67500813  10  47
67500814  47 374
67500815 374 232
67500816 232   0
67500821   0 360
67500822 360 120
67500823 120   0
67500828   0  20
67500830  20   0
67500832   0   1
67500833   0 300
67500834   1 205
67500835 300   0
67500836 205   0

The IDE section starts at 67499922 (this is where the 0x00000004 
signature is, so the error is 880 bytes inside the IDE block including 
the section headers).

I could not pinpoint any obvious culprit in the log.  Hope this helps.

Paolo

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

* Re: [Qemu-devel] save/restore broken?
  2009-08-11 16:39 [Qemu-devel] save/restore broken? Paolo Bonzini
@ 2009-08-13 18:48 ` Luiz Capitulino
  2009-08-13 18:59   ` Anthony Liguori
  2009-08-13 19:23   ` [Qemu-devel] " Juan Quintela
  0 siblings, 2 replies; 6+ messages in thread
From: Luiz Capitulino @ 2009-08-13 18:48 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel, gleb

On Tue, 11 Aug 2009 18:39:47 +0200
Paolo Bonzini <bonzini@gnu.org> wrote:

> Hi all,
> 
> if I try to save and restore an image using current qemu and current 
> libvirt, the load fails.

 Yes, it's broken. I'm unable to loadvm and to migrate.

 According to git bisect the problem was introduced by:

"""
commit 93c8cfd9e67a62711b86f4c93747566885eb7928
Author: Gleb Natapov <gleb@redhat.com>
Date:   Sun Aug 2 11:36:47 2009 +0300

    make windows notice media change
"""

 Indeed, reverting this fixes it for me.

 When I try to loadvm I get this error:

"""
Unknown savevm section type 255
Error -22 while loading VM state
"""

 The migration symptoms are different. Sometimes it
prints the same message, sometimes it kind of works
but gets strange behaviors.

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

* Re: [Qemu-devel] save/restore broken?
  2009-08-13 18:48 ` Luiz Capitulino
@ 2009-08-13 18:59   ` Anthony Liguori
  2009-08-13 19:55     ` Gleb Natapov
  2009-08-13 20:08     ` Luiz Capitulino
  2009-08-13 19:23   ` [Qemu-devel] " Juan Quintela
  1 sibling, 2 replies; 6+ messages in thread
From: Anthony Liguori @ 2009-08-13 18:59 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: Paolo Bonzini, qemu-devel, gleb

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

Luiz Capitulino wrote:
> On Tue, 11 Aug 2009 18:39:47 +0200
> Paolo Bonzini <bonzini@gnu.org> wrote:
>
>   
>> Hi all,
>>
>> if I try to save and restore an image using current qemu and current 
>> libvirt, the load fails.
>>     
>
>  Yes, it's broken. I'm unable to loadvm and to migrate.
>
>  According to git bisect the problem was introduced by:
This should fix it.

Regards,

Anthony Liguori

[-- Attachment #2: ide-migration.patch --]
[-- Type: text/x-patch, Size: 828 bytes --]

commit a536948b3805a311f274b119c5202fdc86504cf3
Author: Anthony Liguori <aliguori@us.ibm.com>
Date:   Thu Aug 13 13:58:21 2009 -0500

    Fix migration for ide devices
    
    commit 93c8cfd9e67a62711b86f4c93747566885eb7928
    Author: Gleb Natapov <gleb@redhat.com>
    Date:   Sun Aug 2 11:36:47 2009 +0300
    
        make windows notice media change
    
    Broke save/restore by loading a new field but not saving it.
    
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

diff --git a/hw/ide.c b/hw/ide.c
index bebda7c..1e38ae3 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -2888,6 +2888,7 @@ static void ide_save(QEMUFile* f, IDEState *s)
 
     qemu_put_8s(f, &s->sense_key);
     qemu_put_8s(f, &s->asc);
+    qemu_put_8s(f, &s->cdrom_changed);
     /* XXX: if a transfer is pending, we do not save it yet */
 }
 

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

* [Qemu-devel] Re: save/restore broken?
  2009-08-13 18:48 ` Luiz Capitulino
  2009-08-13 18:59   ` Anthony Liguori
@ 2009-08-13 19:23   ` Juan Quintela
  1 sibling, 0 replies; 6+ messages in thread
From: Juan Quintela @ 2009-08-13 19:23 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: Paolo Bonzini, qemu-devel, gleb

Luiz Capitulino <lcapitulino@redhat.com> wrote:
> On Tue, 11 Aug 2009 18:39:47 +0200
> Paolo Bonzini <bonzini@gnu.org> wrote:
>
>> Hi all,
>> 
>> if I try to save and restore an image using current qemu and current 
>> libvirt, the load fails.
>
>  Yes, it's broken. I'm unable to loadvm and to migrate.
>
>  According to git bisect the problem was introduced by:
>
> """
> commit 93c8cfd9e67a62711b86f4c93747566885eb7928
> Author: Gleb Natapov <gleb@redhat.com>
> Date:   Sun Aug 2 11:36:47 2009 +0300
>
>     make windows notice media change
> """
>
>  Indeed, reverting this fixes it for me.
>
>  When I try to loadvm I get this error:
>
> """
> Unknown savevm section type 255
> Error -22 while loading VM state
> """
>
>  The migration symptoms are different. Sometimes it
> prints the same message, sometimes it kind of works
> but gets strange behaviors.

This patch fixes it for me, could you take a look if it also fixes things for you?

Thanks.

>From 1322dfad92766a402c341071b0d55be6e510ebb1 Mon Sep 17 00:00:00 2001
From: Juan Quintela <quintela@redhat.com>
Date: Thu, 13 Aug 2009 21:07:05 +0200
Subject: [PATCH] Fix migration, if we read a field, it is better if we wrote it first


Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/ide.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/ide.c b/hw/ide.c
index bebda7c..1e38ae3 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -2888,6 +2888,7 @@ static void ide_save(QEMUFile* f, IDEState *s)

     qemu_put_8s(f, &s->sense_key);
     qemu_put_8s(f, &s->asc);
+    qemu_put_8s(f, &s->cdrom_changed);
     /* XXX: if a transfer is pending, we do not save it yet */
 }

-- 
1.6.2.5

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

* Re: [Qemu-devel] save/restore broken?
  2009-08-13 18:59   ` Anthony Liguori
@ 2009-08-13 19:55     ` Gleb Natapov
  2009-08-13 20:08     ` Luiz Capitulino
  1 sibling, 0 replies; 6+ messages in thread
From: Gleb Natapov @ 2009-08-13 19:55 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Paolo Bonzini, qemu-devel, Luiz Capitulino

On Thu, Aug 13, 2009 at 01:59:52PM -0500, Anthony Liguori wrote:
> Luiz Capitulino wrote:
> >On Tue, 11 Aug 2009 18:39:47 +0200
> >Paolo Bonzini <bonzini@gnu.org> wrote:
> >
> >>Hi all,
> >>
> >>if I try to save and restore an image using current qemu and
> >>current libvirt, the load fails.
> >
> > Yes, it's broken. I'm unable to loadvm and to migrate.
> >
> > According to git bisect the problem was introduced by:
> This should fix it.
> 
> Regards,
> 
> Anthony Liguori

> commit a536948b3805a311f274b119c5202fdc86504cf3
> Author: Anthony Liguori <aliguori@us.ibm.com>
> Date:   Thu Aug 13 13:58:21 2009 -0500
> 
>     Fix migration for ide devices
>     
>     commit 93c8cfd9e67a62711b86f4c93747566885eb7928
>     Author: Gleb Natapov <gleb@redhat.com>
>     Date:   Sun Aug 2 11:36:47 2009 +0300
>     
>         make windows notice media change
>     
>     Broke save/restore by loading a new field but not saving it.
>     
>     Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
> 
> diff --git a/hw/ide.c b/hw/ide.c
> index bebda7c..1e38ae3 100644
> --- a/hw/ide.c
> +++ b/hw/ide.c
> @@ -2888,6 +2888,7 @@ static void ide_save(QEMUFile* f, IDEState *s)
>  
>      qemu_put_8s(f, &s->sense_key);
>      qemu_put_8s(f, &s->asc);
> +    qemu_put_8s(f, &s->cdrom_changed);
>      /* XXX: if a transfer is pending, we do not save it yet */
>  }
>  
Yap. Got lost between v3 and v4 of the patch :(


--
			Gleb.

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

* Re: [Qemu-devel] save/restore broken?
  2009-08-13 18:59   ` Anthony Liguori
  2009-08-13 19:55     ` Gleb Natapov
@ 2009-08-13 20:08     ` Luiz Capitulino
  1 sibling, 0 replies; 6+ messages in thread
From: Luiz Capitulino @ 2009-08-13 20:08 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Paolo Bonzini, qemu-devel, gleb

On Thu, 13 Aug 2009 13:59:52 -0500
Anthony Liguori <anthony@codemonkey.ws> wrote:

> Luiz Capitulino wrote:
> > On Tue, 11 Aug 2009 18:39:47 +0200
> > Paolo Bonzini <bonzini@gnu.org> wrote:
> >
> >   
> >> Hi all,
> >>
> >> if I try to save and restore an image using current qemu and current 
> >> libvirt, the load fails.
> >>     
> >
> >  Yes, it's broken. I'm unable to loadvm and to migrate.
> >
> >  According to git bisect the problem was introduced by:
> This should fix it.

 Yes it does, thanks Anthony.

 Tested-by: Luiz Capitulino <lcapitulino@redhat.com>

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

end of thread, other threads:[~2009-08-13 20:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 16:39 [Qemu-devel] save/restore broken? Paolo Bonzini
2009-08-13 18:48 ` Luiz Capitulino
2009-08-13 18:59   ` Anthony Liguori
2009-08-13 19:55     ` Gleb Natapov
2009-08-13 20:08     ` Luiz Capitulino
2009-08-13 19:23   ` [Qemu-devel] " Juan Quintela

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