qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Correct syntax for named snapshots
@ 2011-10-26 16:24 Ottavio
  2011-10-27  7:29 ` Stefan Hajnoczi
  2011-10-27  8:24 ` Philipp Hahn
  0 siblings, 2 replies; 3+ messages in thread
From: Ottavio @ 2011-10-26 16:24 UTC (permalink / raw)
  To: qemu-devel

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

-- 
Ottavio

qemu-users · The unofficial mailing list for qemu users:
http://tech.groups.yahoo.com/group/qemu-users/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Correct syntax for named snapshots
  2011-10-26 16:24 [Qemu-devel] Correct syntax for named snapshots Ottavio
@ 2011-10-27  7:29 ` Stefan Hajnoczi
  2011-10-27  8:24 ` Philipp Hahn
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2011-10-27  7:29 UTC (permalink / raw)
  To: Ottavio; +Cc: qemu-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Correct syntax for named snapshots
  2011-10-26 16:24 [Qemu-devel] Correct syntax for named snapshots Ottavio
  2011-10-27  7:29 ` Stefan Hajnoczi
@ 2011-10-27  8:24 ` Philipp Hahn
  1 sibling, 0 replies; 3+ messages in thread
From: Philipp Hahn @ 2011-10-27  8:24 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1452 bytes --]

Hello Ottaavio,

On Wednesday 26 October 2011 18:24:01 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"  ?

These are two different things:
The first one creates an *internal* snapshot, which is stored internally in a 
*single* qcow2 file.
The second one creates an *external* snapshot, which creates a *new second* 
qcow2 file.

The first functionality requires a lot more work for qcow2, which can easily 
corrupt your qcow2 file if something goes wrong. Because of this QED (one 
follow-up format of Qcow) IMHO dropped support for internal snapshots.
The second variante has the drawback, that for each snapshot your get an 
additional file, which your have to manage. Deleting one file from the middle 
of such a chain breaks all following snapshots, so be careful when you do 
delete files.

And yes, both are still supported.

Sincerely
Philipp
-- 
Philipp Hahn           Open Source Software Engineer      hahn@univention.de
Univention GmbH        Linux for Your Business        fon: +49 421 22 232- 0
Mary-Somerville-Str.1  D-28359 Bremen                 fax: +49 421 22 232-99
                                                   http://www.univention.de/

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-27  8:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26 16:24 [Qemu-devel] Correct syntax for named snapshots Ottavio
2011-10-27  7:29 ` Stefan Hajnoczi
2011-10-27  8:24 ` Philipp Hahn

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).