Skip to content

domain snapshot documents

Bamvor Jian Zhang xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest5 patches 6 repliesIn review

Changes in v4 from the cover letter

split one document into difference document, hope it will be easier to review and discuss.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5define snapshot APItools/libxl/libxl.h+37 -05 replies
2/5add xl snapshot command in xl manpagedocs/man/xl.pod.1+94 -00 replies
3/5add xl snapshot configuration syntax filedocs/man/xl.snapshot.conf.pod.5+58 -00 replies
4/5examples for xl internal snapshottools/examples/xlsnapshot.internal+6 -01 reply
5/5examples for xl external snapshottools/examples/xlsnapshot.external+7 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/5] domain snapshot documents

here is the fourth version about domain snapshot documents, the previous version is here[1][2][3].

there are lots of potential feature about snapshots. for now, i focus on providing the api for libvirt libxl driver in order to support the same functionality compare with libvirt qemu driver.
i plan to work on other "advanced feature" after my first stage patch ack.

there are two types of snapshots supported by libxl: disk snapshot and domain snapshot and four types of operations: create, delete, list and revert.

Disk snapshot will only be crash-consistent if the domain is running. Disk snapshots can also be internal (qcow2) or external (snapshot in one file, delta in another).

Domain snapshots include disk snapshots and domain state, allowing to resume the domain from the same state when the snapshot was created. This type of snapshot is also referred to as a domain checkpoint or system checkpoint.

In libvirt, there is a something like resource manager for domain snapshot managements. So, in libxl, all these information is transfered through libxl_domain_snapshot struct. xl will manage the snapshot by itself based on Liu Wei libxl-json apis.

Domain snapshot create means save domain state and do disk snapshots. At the beginning of domain snapshot create, it will check whether it is snapshotable.

Domain snapshot revert means rollback the current snapshot state.

the domain snapshot information will store in the follow path:
/var/lib/xen/snapshots/<domain_uuid>/snapshotdata-<snapshot_name>.xl reference patch 0004 for details.

here is some features i do not want to implement in my first version code:

about non-qdisk backend, after some discussion with Jim, it seems that the snapshot of these device could be done by difference utils through libxl__exec. for tap/tap2, td-util or vhd-util.
for lvm, snapshot create, delete, revert could be done by lvcreate, lvremove, lvconvert respectively.

live snapshot.
i do not know how it should work exactly. if we talk about live memory save, i guess it is simialr to live migration. but i am not sure how to sync with live memory save and disk transaction.

changes since v3:
split one document into difference document, hope it will be easier to review and discuss.

changes since v2:
1), reorgnized the whole docments.
2), do not export the dedicated the disk snapshot commands. 3), others changes according to Ian and Jim's comment.

[1] http://lists.xen.org/archives/html/xen-devel/2014-04/msg00414.html

    http://lists.xen.org/archives/html/xen-devel/2014-04/msg00244.html

[2] http://lists.xen.org/archives/html/xen-devel/2014-04/msg02549.html
[3] http://lists.xen.org/archives/html/xen-devel/2014-05/msg01977.html

Bamvor Jian Zhang (5):
define snapshot API
add xl snapshot command in xl manpage
add xl snapshot configuration syntax file
examples for xl internal snapshot
examples for xl external snapshot

 docs/man/xl.pod.1                  | 94 ++++++++++++++++++++++++++++++++++++++
 docs/man/xl.snapshot.conf.pod.5    | 58 +++++++++++++++++++++++
 tools/examples/xlsnapshot.external |  7 +++
 tools/examples/xlsnapshot.internal |  6 +++
 tools/libxl/libxl.h                | 37 +++++++++++++++
 5 files changed, 202 insertions(+)
 create mode 100644 docs/man/xl.snapshot.conf.pod.5
 create mode 100644 tools/examples/xlsnapshot.external
 create mode 100644 tools/examples/xlsnapshot.internal

--
1.8.1.4