All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Chunyan Liu <cyliu@suse.com>
Cc: ian.jackson@eu.citrix.com, jfehlig@suse.com, wei.liu2@citrix.com,
	xen-devel@lists.xen.org
Subject: Re: [RFC V9 3/4] domain snapshot design: xl
Date: Thu, 18 Dec 2014 15:15:59 +0000	[thread overview]
Message-ID: <1418915759.11882.91.camel@citrix.com> (raw)
In-Reply-To: <1418711577-15449-4-git-send-email-cyliu@suse.com>

On Tue, 2014-12-16 at 14:32 +0800, Chunyan Liu wrote:
> Changes to V8:
>   * xl won't manage snapshots, that means it won't maintain json files,
>     won't maintain snapshot chain relationship, and then as a result
>     won't take care of deleting snapshot and listing snapshots.
>   * remove snapshot-delete and snapshot-list interface
>   * update snapshot-revert interface
>   * update snapshot-create/revert implementaion
> 
> ===========================================================================
> 
> XL Design
> 
> 1. User Interface
> 
> xl snapshot-create:
>   Create a snapshot (disk and RAM) of a domain.
> 
>   SYNOPSIS:
>     snapshot-create <domain> [<cfgfile>] [--name <string>] [--live]
> 
>   OPTIONS:
>     --name <string>  snapshot name
>     --live           take a live snapshot
> 
>     If option includes --live, then the domain is not paused while creating
>     the snapshot, like live migration. This increases size of the memory
>     dump file, but reducess downtime of the guest.
> 
>     If option doens't include --name, a default name will be generated
>     according to the creation time.
> 
>     If specify @cfgfile, use cfgfile. (e.g. if --name specifies a name,
>     meanwhile there is name specified in cfgfile, name in cfgfile will
>     be used.)

If you do not specify cfgfile then where do things go? Is --name perhaps
also serving as a basename for a path to save things to?

I wonder if we can simplify this a bit and therefore avoid the need cfg
file in common case. e.g.

----8<-------
  xl snapshot-create [--live] [--internal|--external] <domain> <path>

<path> is a path to a directory, which must not exist. This path will be
created and the memory snapshot stored in it using some well defined
name.

If the snapshot is --external then the snapshot disks are created in
<path> with some well defined name based on the virtual device and
backend format in use.

If the snapshot is --internal then the snapshot disks are internal.

The default is <TBD, based on backends in use?>

--live is as you've already got it.
----8<-------

I'm not sure what name and description actually are here, so I've
omitted them.

Any of that could be overridden with e.g. more specific disk
configuration stanzas etc via the cfg file, if necessary.

This is just a suggestion, feel free to disagree.

NB xl create can accept a series of cfg file lines on the command line
too, and treats them as appended to the cfgfile (if any was given). I
think xl snapshot-create should include this functionality too.
> xl snapshot-revert:
>   Revert domain to status of a snapshot.
> 
>   SYNOPSIS:
>       snapshot-revert <domain> <cfgfile> [--running] [--force]
> 
>   OPTIONS:
>     --running        after reverting, change state to running
>     --force          try harder on risky reverts
> 
>     Normally, the domain will revert to the same state the domain was in while
>     the snapshot was taken (whether running, or paused).
> 
>     If option includes --running, then overrides the snapshot state to
>     guarantee a running domain after the revert.
> 
> 
> 
> 2. cfgfile syntax
> 
> #snapshot name. If user doesn't provide a VM snapshot name, xl will generate
> #a name automatically by the creation time.
> name=""

What is name used for? (I guessed it might be output path above, but I'm
not sure).

> #snapshot description. Default is NULL.
> description=""

What is this used for? Is it embedded into e.g. qcow images or is it
just for the admin's own use (in which cases the existing support for
#comments ought to suffice).

> #memory location. This field should be filled when memory=1. Default is NULL.

The memory option isn't defined anywhere, and I think you've rules
disk-only snapshots out of scope for xl, so I think this is just a left
over from a previous revision.

> #e.g. to specify exernal disk snapshot, like this:
> #disks=['/tmp/hda_snapshot.qcow2,qcow2,hda',
>         '/tmp/hdb_snapshot.qcow2,qcow2,hdb',]
> 
> #e.g. to specify internal disk snapshot, like this:
> disks=[',,hda',',,hdb',]

Ideally one or the other of these behaviours would be possible without
needing to be quite so explicit.

Ian.

  parent reply	other threads:[~2014-12-18 15:15 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-16  6:32 [RFC V9 0/4] domain snapshot document Chunyan Liu
2014-12-16  6:32 ` [RFC V9 1/4] domain snapshot terms Chunyan Liu
2014-12-18 15:05   ` Ian Campbell
2014-12-19  2:46     ` Chun Yan Liu
2014-12-16  6:32 ` [RFC V9 2/4] domain snapshot overview Chunyan Liu
2014-12-17 12:17   ` Wei Liu
2014-12-18  3:34     ` Chun Yan Liu
2014-12-18 10:57       ` Wei Liu
2014-12-18 15:10   ` Ian Campbell
2014-12-19  5:45     ` Chun Yan Liu
2014-12-19 10:25       ` Ian Campbell
2014-12-23  3:42         ` Chun Yan Liu
2015-01-08 12:26           ` Ian Campbell
2015-01-12  7:01             ` Chun Yan Liu
2015-01-12 13:54               ` Ian Campbell
2015-01-14  3:12                 ` Chun Yan Liu
2014-12-16  6:32 ` [RFC V9 3/4] domain snapshot design: xl Chunyan Liu
2014-12-17 12:28   ` Wei Liu
2014-12-18  3:23     ` Chun Yan Liu
2014-12-18 11:02       ` Wei Liu
2014-12-18 15:15   ` Ian Campbell [this message]
2014-12-19  7:03     ` Chun Yan Liu
2014-12-19 10:27       ` Ian Campbell
2014-12-22  8:52         ` Chun Yan Liu
2015-01-08 11:59           ` Ian Campbell
2014-12-16  6:32 ` [RFC V9 4/4] domain snapshot design: libxl/libxlu Chunyan Liu
2014-12-17 14:09   ` Wei Liu
2014-12-18  3:01     ` Chun Yan Liu
2014-12-18 15:27   ` Ian Campbell
2014-12-19  6:58     ` Chun Yan Liu
2014-12-19 10:38       ` Ian Campbell
2014-12-22  9:36         ` [Qemu-devel] " Chun Yan Liu
2015-01-08 12:11           ` Ian Campbell
2015-01-08 12:11           ` [Qemu-devel] " Ian Campbell
2015-01-09  9:59             ` Chun Yan Liu
2015-01-09  9:59               ` Chun Yan Liu
2014-12-22  9:36         ` Chun Yan Liu
2014-12-22  9:53         ` Chun Yan Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1418915759.11882.91.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=cyliu@suse.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jfehlig@suse.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.