[fedora-virt] Status of Snapshots

Ján ONDREJ (SAL) ondrejj at salstar.sk
Mon Jan 10 09:27:54 UTC 2011


Hello,

  there are 2 types of snapshoting in virtualization. You can snapshot whole
virtual machine (it's RAM, registers and also hard disks) and snapshots of
disks only. Disk snapshotting is well implemented in qemu/kvm, but there is
no support in libvirt. I have an very old request for enhance in bugzilla:
  https://bugzilla.redhat.com/show_bug.cgi?id=508662

Qemu disk snapshotting is a very good thing. I use it for testing purposes,
for example if I need to test something in new fedora, I use -drive ...,
snapshot=on option in qemu, I can do anything and after VM shutdown all
changes are gone. If I need to save these changes, there are abilities to
commit all changes back to original image. I can use snapshotting with
compresses images and images without full allocation.

  I think, it's not hard to implement this in libvirt, but my knowledge of
C programming is not enough to do this. Any other volunteer?

			SAL

On Sun, Jan 09, 2011 at 11:19:49PM +0000, Richard W.M. Jones wrote:
> On Sun, Jan 09, 2011 at 05:02:50PM -0400, Jorge Fábregas wrote:
> > I noticed no "snapshot" functionality in virt-manager :(  What I found
> > while doing a search is that it is planned but couldn't find anything
> > recent.  What's the current status on snapshots? Any plans to include it
> > with virt-manager for F15? F16?
> 
> This is really a qemu issue, rather than virt-manager.  Someone from
> Red Hat is working on snapshot patches for qemu at the moment.  No ETA
> that I know of ... I understand that it's a rather difficult problem
> to solve well.
> 
> > Also,  is it to shut down the VM, and just copy the *.img files
> > somewhere else the closest thing we have now ? or place the *.img files
> > on a logical-volume and then perform the snapshot there (LVM wise)?
> 
> There's various different things you can do at the moment:
> 
> (1) If your block layer is able to take an instantaneous snapshot,
> then you can use this to get a "crash consistent" snapshot of a live
> VM.  It will require journal recovery (which you can do with
> libguestfs for example), but apart from that should be usable for most
> things except where you have complex guest applications like databases
> which need their own consistency.
> 
> This feature is available on filers like NetApp, or on LVM using
> 'lvcreate -s'.  It's *not* safe eg. to 'dd' or 'cp' a disk image,
> because that is not snapshotting the whole disk at one instant.
> 
> (2) If you pause the VM, you can use a 'dd'/'cp' to get a crash
> consistent snapshot.  Of course the long pause is not usually
> acceptable.
> 
> (3) If you shut the VM down first, you can snapshot or copy the disk
> image, and the copy you get will be consistent.  What you're really
> getting here is a clone, and if you want to go all the way with
> cloning there are other things you need to adjust:
> 
> https://rwmj.wordpress.com/2010/09/24/tip-my-procedure-for-cloning-a-fedora-vm/
> 
> You should thoroughly test whatever procedure you use before you use
> it for your mission-critical backups ...
> 
> Rich.
> 
> -- 
> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
> virt-p2v converts physical machines to virtual machines.  Boot with a
> live CD or over the network (PXE) and turn machines into Xen guests.
> http://et.redhat.com/~rjones/virt-p2v
> _______________________________________________
> virt mailing list
> virt at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/virt


More information about the virt mailing list