[sheepdog] reply: execute the snapshot vm became read-only

Liu Yuan namei.unix at gmail.com
Fri Aug 9 10:33:36 CEST 2013


On Fri, Aug 09, 2013 at 08:19:22AM +0000, 周鹏 wrote:
> 
> On Fri, Aug 09, 2013 at 03:03:13AM +0000, zhoupeng wrote:
> > hello,i test snapshot of sheepdog version 0.6 stable.
> > first,i start the sheep with one node:
> >
> > #!/bin/bash
> > sheep /home/cloud -u -g -d 64 -z 0 -D -c local
> > for i in {0..0}
> > do
> > sheep /home/${i} -u -D -d -c local -p $((7001 + $i))
> > done
> >
> > then i use libvirt to start the vdi, by using vnc to login the vdi;
> > i create a file and write sth, everything is ok;
> >
> > but after i execute the snapshot:
> > qemu-img snapshot -c sheepdog:centos6 sheepdog:centos6
> 
> Your qemu might be too old. Try latest QEMU at git://git.qemu.org/qemu.git
> 
> thanks much.i have update qemu to the latest. Excute snapshot is ok now, but 
> when the vm is running, perform the following steps:
> 1.  write some data to a file
> 2.  sync
> 3.  create a snapshot
> 4.  delete the file.
> 5.  shutdown the vm rollbak to the snapId(collie vdi rollback centsos6-test -s 11)
> 6.  enter the vm and the file came back
> 
> but if not shutdown the vm, excute above steps, the file will not be restored.it means that sheepdog
> dose not support hot snapshot. am i right?

Sheepdog fully support live snapshot both for memory state (savevm) and disk only
state(qemu-img snapshot or collie snapshot).

You can only rollback lively to a running VM by QEMU's console
command (savevm & loadvm), e.g,

 qemu monitor> savevm tag # This will create a live snapshot named tag
 qemu monitor> loadvm tag # This will rollback to the snapshot named tag lively.

Thanks
Yuan



More information about the sheepdog mailing list