[sheepdog] savevm snapshot hang (qemu 0.12-rc1 + sheepdog git)

Alexandre DERUMIER aderumier at odiso.com
Thu Aug 30 15:05:27 CEST 2012


thanks savevm works fine now.

# collie vdi list
  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
s image1     3  5.0 GB  116 MB  1.1 GB 2012-08-30 14:44   f78be6     2         snap1
  image1     4  5.0 GB   72 MB  1.2 GB 2012-08-30 14:55   f78be7     2   

But I can't get loadvm work.

If I use loadvm online with monitor command, it's hang.

If I use loadvm at command line when vm start "-loadvm snap1", I have

kvm: cannot get vdi info, Failed to find the requested tag, image1 0 image1
kvm: Failed to find_vdi_name
kvm: failed to open. recover old bdrv_sd_state.
kvm: Error -5 while activating snapshot 'snap1' on 'drive-virtio0'

also, If I use loadvm at command line, does I need to use file=sheepdog:image1 or file=sheepdog:image1:snap1 ?

And with the ew rollback command ?

Regards,

Alexandre



----- Mail original ----- 

De: "MORITA Kazutaka" <morita.kazutaka at lab.ntt.co.jp> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: sheepdog at lists.wpkg.org 
Envoyé: Mercredi 29 Août 2012 19:50:39 
Objet: Re: [sheepdog] savevm snapshot hang (qemu 0.12-rc1 + sheepdog git) 

At Wed, 29 Aug 2012 14:59:42 +0200 (CEST), 
Alexandre DERUMIER wrote: 
> 
> Hi, 
> I'm trying to take live snapshots with qemu savevm monitor command, (qemu 0.12-rc1 + sheepdog git), 
> vm is hanging and the snasphot is not take. 
> 
> Is it broken for now ? 

I found a trivial bug in the qemu block driver code. Can you try the 
following diff against QEMU? 

diff --git a/block/sheepdog.c b/block/sheepdog.c 
index df4f441..e0753ee 100644 
--- a/block/sheepdog.c 
+++ b/block/sheepdog.c 
@@ -1986,7 +1986,7 @@ static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data, 
vdi_index = pos / SD_DATA_OBJ_SIZE; 
offset = pos % SD_DATA_OBJ_SIZE; 

- data_len = MIN(remaining, SD_DATA_OBJ_SIZE); 
+ data_len = MIN(remaining, SD_DATA_OBJ_SIZE - offset); 

vmstate_oid = vid_to_vmstate_oid(s->inode.vdi_id, vdi_index); 

@@ -2007,6 +2007,7 @@ static int do_load_save_vmstate(BDRVSheepdogState *s, uint8_t *data, 
} 

pos += data_len; 
+ data += data_len; 
remaining -= data_len; 
} 
ret = size; 



-- 

-- 



	

Alexandre D e rumier 

Ingénieur Systèmes et Réseaux 


Fixe : 03 20 68 88 85 

Fax : 03 20 68 90 88 


45 Bvd du Général Leclerc 59100 Roubaix 
12 rue Marivaux 75002 Paris 



More information about the sheepdog mailing list