Documentation/CreateSnapshot

From QEMU
Revision as of 18:02, 28 November 2010 by Clare Liguori (talk | contribs) (Created page with '== Create a snapshot == Snapshots in QEMU are really just images that refer to another image using Copy-on-Write to avoid changing the original image. If you want to create a s…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Create a snapshot

Snapshots in QEMU are really just images that refer to another image using Copy-on-Write to avoid changing the original image. If you want to create a snapshot of an existing image called centos-55.img, create a new QCow2 file using the -b flag to indicate a backing file. The new image is now a read/write snapshot of the original image--any changes to snapshot.img will not be reflected in centos-55.img.

qemu-img create -f qcow2 -b centos-55.img snapshot.img

Returning to a previous version

Since the snapshot is just an image file, if you want to return to the previous version, just delete snapshot.img and start using the original image again centos-55.img. Please note that if you make any changes to the base image while snapshots remain, those snapshots will become corrupted. If unsure, instead of using the base image directly, just create another snapshot.