* [Qemu-devel] Derivative snapshots or snapshots for versioning
@ 2011-05-24 16:14 Mike Young
2011-05-25 7:21 ` Stefan Hajnoczi
0 siblings, 1 reply; 3+ messages in thread
From: Mike Young @ 2011-05-24 16:14 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 614 bytes --]
Hi,
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 the
b option: "qemu-img create f qcow2 b original_volume.img snapshot1.img",
but now I wish to create a snapshot2 from snapshot1.img. Is there a way to
do this?
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?
Thanks,
Mike
[-- Attachment #2: Type: text/html, Size: 956 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Derivative snapshots or snapshots for versioning
2011-05-24 16:14 [Qemu-devel] Derivative snapshots or snapshots for versioning Mike Young
@ 2011-05-25 7:21 ` Stefan Hajnoczi
2011-05-25 11:50 ` Mike Young
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2011-05-25 7:21 UTC (permalink / raw)
To: Mike Young; +Cc: qemu-devel
On Tue, May 24, 2011 at 5:14 PM, Mike Young <myoung@wildernessvoice.com> wrote:
> 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 the
> –b option: "qemu-img create –f qcow2 –b original_volume.img snapshot1.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 to
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] Derivative snapshots or snapshots for versioning
2011-05-25 7:21 ` Stefan Hajnoczi
@ 2011-05-25 11:50 ` Mike Young
0 siblings, 0 replies; 3+ messages in thread
From: Mike Young @ 2011-05-25 11:50 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: qemu-devel
Thanks Stefan!
On 5/25/11 1:21 AM, "Stefan Hajnoczi" <stefanha@gmail.com> wrote:
>On Tue, May 24, 2011 at 5:14 PM, Mike Young <myoung@wildernessvoice.com>
>wrote:
>> 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
>>the
>> b option: "qemu-img create f qcow2 b original_volume.img
>>snapshot1.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
>>to
>> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-25 16:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-24 16:14 [Qemu-devel] Derivative snapshots or snapshots for versioning Mike Young
2011-05-25 7:21 ` Stefan Hajnoczi
2011-05-25 11:50 ` Mike Young
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).