From b61a8a50bc8d481df32f929046abf09383c8380e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 28 Jul 2012 21:28:23 +0100 Subject: sysprep: Describe more directly how to use qemu-img for snapshotting. --- sysprep/virt-sysprep.pod | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/sysprep/virt-sysprep.pod b/sysprep/virt-sysprep.pod index 9172931d..66bc7104 100755 --- a/sysprep/virt-sysprep.pod +++ b/sysprep/virt-sysprep.pod @@ -20,7 +20,7 @@ required. Virt-sysprep modifies the guest or disk image I. The guest must be shut down. If you want to preserve the existing contents of -the guest, you I. +the guest, you I. See L below. You do I need to run virt-sysprep as root. In fact we'd @@ -304,33 +304,43 @@ L or L. There are some smarter (and faster) ways too: -=over 4 - -=item * - snapshot template ----------> \------> cloned \-----> guests \----> -Use the block device as a backing file and create a snapshot on top -for each guest. The advantage is that you don't need to copy the -block device (very fast) and only changes are stored (less storage -required). +=over 4 + +=item * + +Create a snapshot using qemu-img: + + qemu-img create -f qcow2 -o backing_file=original snapshot.qcow + +The advantage is that you don't need to copy the original (very fast) +and only changes are stored (less storage required). Note that writing to the backing file once you have created guests on top of it is not possible: you will corrupt the guests. -Tools that can do this include: -L (with the I option), -L (I<--snapshot> option). Some filesystems (such as -btrfs) and most Network Attached Storage devices can also create cheap +=item * + +Create a snapshot using C. + +=item * + +Other ways to create snapshots include using filesystems-level tools +(for filesystems such as btrfs). + +Most Network Attached Storage (NAS) devices can also create cheap snapshots from files or LUNs. =item * -Get your NAS to snapshot and/or duplicate the LUN. +Get your NAS to duplicate the LUN. Most NAS devices can also +duplicate LUNs very cheaply (they copy them on-demand in the +background). =item * -- cgit