Received: from eggs.gnu.org ([140.186.70.92]:49221) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPH4L-0006QZ-UT for qemu-devel@nongnu.org; Wed, 25 May 2011 12:36:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QPH4K-0000E0-Tv for qemu-devel@nongnu.org; Wed, 25 May 2011 12:36:25 -0400 Received: from mail-yi0-f45.google.com ([209.85.218.45]:65521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QPH4K-0000Ds-QE for qemu-devel@nongnu.org; Wed, 25 May 2011 12:36:24 -0400 Received: by yib19 with SMTP id 19so3738767yib.4 for ; Wed, 25 May 2011 09:36:24 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 25 May 2011 08:21:33 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Derivative snapshots or snapshots for versioning List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mike Young Cc: qemu-devel@nongnu.org On Tue, May 24, 2011 at 5:14 PM, Mike Young wr= ote: > I'm trying to see if I can I do a derivative snapshot as a means of > versioning. I wish to do this vs dd or cp as it's much faster. I do not > intend to apply a snapshot back to an original volume. > So, let's say I have original_volume.img and I create a snapshot using th= e > =96b option: "qemu-img create =96f qcow2 =96b original_volume.img snapsho= t1.img", I would not call the new file "snapshot1.img" since the frozen disk image should be original_volume.img. You can write to snapshot1.img but it is not safe to original_volume.img because snapshot1.img will then become inconsistent (you've changed the blocks that it was based on). > but now I wish to create a snapshot2 from snapshot1.img. Is there a way t= o > do this? qemu-img create -f qcow2 -b snapshot1.img snapshot2.img Note that you should not write to snapshot1.img anymore. However, you could say: qemu-img create -f qcow2 -b snapshot1.img snapshot2a.img qemu-img create -f qcow2 -b snapshot1.img snapshot2b.img Don't write to snapshot1.img but you can run VMs using snapshot2a.img and snapshot2b.img independently. > Also, is there a way to generate 100% snapshot of the original volume (an > exact replica), so that a 40G original results in a 40G snapshot? cp original.qcow2 clone.qcow2 Stefan