On Wed, Oct 26, 2011 at 05:24:01PM +0100, Ottavio wrote: > According to the latest doc file you create a named snapshot like this: > > qemu-img snapshot [-l | -a snapshot | -c snapshot | -d snapshot] > base-image.img > > Is this other following syntax still supported or deprecated: > > "qemu-img create -f qcow2 -b base-image.img snapshot.img" ? > > The latter is on the qemu wiki but not on the qemu-doc.html file. > > Can you cc: me please? Thanks
These two commands do different things. There are two different snapshot concepts: internal and external snapshot. Internal snapshots can be created with qcow2 and can be manipulated with the qemu-img snapshot command. They are called "internal" because all snapshot data is part of the same image file; you can have a single qcow2 file that contains 10 different snapshots. External snapshots can be created with any format that supports backing files (qcow2, qed, vmdk, ...) and is created with qemu-img create -o backing_file=base-image.img -f qcow2 vm001.qcow2 (or with the older -b option). They are called "external" snapshots because they involve multiple files and data is stored separately. In the command-line I gave you could access base-image.img in read-only fashion - the base image is the "snapshot" and the vm001.qcow2 image file contains data written since creating the new image file. The word "snapshot" is overloaded in QEMU, we use it for several different things, but I hope this explanation helps. Stefan