qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] qcow2 snaphot loading


From: Clemens Kolbitsch
Subject: [Qemu-devel] qcow2 snaphot loading
Date: Mon, 23 Mar 2009 17:45:08 +0100
User-agent: KMail/1.10.4 (Linux/2.6.27-11-generic; KDE/4.1.4; x86_64; ; )

Hi list,

I just upgraded from rev. 6600 to head and ran into problems loading snapshots 
(I also checked this with the 0.10.1 release on the homepage) because the old 
revision keeps crashing my Xserver from time to time.

I use an old qcow2 image as base for my snapshot file... when loading a 
snapshot, qemu displays

"Error -22 when loading VM state".

Since HW can change over revisions, I created a new snapshot file ("qemu-img 
create -b <base-file> -f qcow2 snap.qcow2") and retried creating a snapshot. 
When loading it, however, same result...

After stepping through the code, I got to this line (don't know if the bug is 
here, or if it is a bug at all, but maybe it helps finding the problem):


gdb --args ./i386-softmmu/qemu -hda snap.qcow2 -boot c -net nic -net 
tap,script=no,downscript=no,ifname=tap0 -m 512-kernel-kqemu -loadvm test

#0  bdrv_getlength (bs=0x1048010) at block.c:766
#1  0x0000000000492cdd in bdrv_check_byte_request (bs=0x1048010, 
offset=5368709120, size=32768) at block.c:531
#2  0x00000000004934d3 in bdrv_pread (bs=0x1048010, offset=5368709120, 
buf1=0x1301db0, count1=32768) at block.c:720
#3  0x00000000004b6945 in bdrv_get_buffer (opaque=0x107d9b0, buf=0x1301db0 "", 
pos=0, size=32768) at savevm.c:320
#4  0x00000000004b6b6d in qemu_fill_buffer (f=0x1301d70) at savevm.c:396
#5  0x00000000004b6f25 in qemu_get_byte (f=0x1301d70) at savevm.c:491
#4  0x00000000004b6b6d in qemu_fill_buffer (f=0x1301d70) at savevm.c:396
#5  0x00000000004b6f25 in qemu_get_byte (f=0x1301d70) at savevm.c:491
#6  0x00000000004b714d in qemu_get_be32 (f=0x1301d70) at savevm.c:563
#7  0x00000000004b7a24 in qemu_loadvm_state (f=0x1301d70) at savevm.c:856
#8  0x00000000004b8697 in do_loadvm (name=0x7fffbda105d1 "test") at 
savevm.c:1172
#9  0x000000000040fe81 in main (argc=14, argv=0x7fffbda0fbc8, 
envp=0x7fffbda0fc40) at src/qemu/qemu-0.10.1/vl.c:5718


then, back in block.c (bdrv_check_byte_request):

if (bs->growable)                                                               
                                                                                
                                                              
        return 0;                                                               
                                                                                
                                                                  
len = bdrv_getlength(bs);                                                       
                                                                                
                                                              
if ((offset + size) > len)                                                      
                                                                                
                                                              
        return -EIO;                                                            
                                                                                
                                                                  

the code exits the function with the variables set to

(gdb) p/x offset
$1 = 0x140000000
(gdb) p/x size
$2 = 0x8000
(gdb) p/x len
$3 = 0x140000000

and snapshot loading exists with the error above. In case this is an error, 
could someone have a look? Maybe, there is just no backwards compatibility to 
old base images (which would be too bad, but at least I'd know the problem).

Thanks!
Clemens











reply via email to

[Prev in Thread] Current Thread [Next in Thread]