[fedora-virt] Status of Snapshots

Richard W.M. Jones rjones at redhat.com
Sun Jan 9 23:19:49 UTC 2011


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


More information about the virt mailing list