From: Bamvor Jian Zhang Subject: [PATCH v4 2/5] add xl snapshot command in xl manpage Date: Mon, 23 Jun 2014 19:25:52 +0800 Message-ID: <1403522755-6894-3-git-send-email-bjzhang@suse.com> References: <1403522755-6894-1-git-send-email-bjzhang@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403522755-6894-1-git-send-email-bjzhang@suse.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: zzhou@suse.com, ian.campbell@citrix.com, ian.jackson@eu.citrix.com, cyliu@suse.com, jfehlig@suse.com, Bamvor Jian Zhang , anthony.perard@citrix.com, davidkiarie4@gmail.com List-Id: xen-devel@lists.xenproject.org Some discussion on xl snapshot-create, snapshot-revert implementation xl snapshot-create snapshot-create will save domain memory through save_domain if it is not a disk only snapshot. and save disk snapshot by libxl_disk_snapshot_create. after this successful, it will save snapshot configuration. xl snapshot-revert flow: destroy domain -> revert disk snapshot -> restore domain idealy, i should use libxl__xc_domain_restore for domain memory restore. but i will be a issue when the domain configuration is different between current vm and snapshot. so, in my current implementation, firstly, i destroy the current domain. and after revert disk snapshot, i restore the domain through create_domain with proper dom_info. so, the revert is not pull the domain status back. it is different from qemu snapshot implementation, qemu is pull the domain back to the snapshot point with loadvm hmp. Signed-off-by: Bamvor Jian Zhang --- docs/man/xl.pod.1 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1 index 30bd4bf..93badc2 100644 --- a/docs/man/xl.pod.1 +++ b/docs/man/xl.pod.1 @@ -1368,6 +1368,100 @@ policy. Loading new security policy will reset runtime changes to device labels. =back +=head1 SNAPSHOT + +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. + +=over 4 + +=item B [I] [I] I + +create domain/disk snapshot. + +The create subcommand takes a config file as first argument: see +L for full details of that file format and possible options. +If I is missing B creates the snapshot of domain from options. +I has to be an absolute path to a file. +it is allowed if user use I combine with I, if there is +some conflict in it, it will report and exit. at the point, it is highly +recommend that use I or I alone. + +B + +=over 4 + +=item B<-n> + +domain/disk snapshot name. if ignored, it will be the epoch second from 1, Jan +1970. + +=item B<-D>, B<--disk-only> + +take the internal disk snapshot for all disk except the read-only disk +(e.g. cdrom). for external disk snapshot, user should give the proper options +(such as external file and format) in I. + +=back + +=item B [I] I + +delete domain/disk snapshot according to the snapshot configuration file, which +may include memory check point file, disk snapshot file and configuration file. + +B + +=over 4 + +=item B<-n> + +snapshot name. + +=back + +=item B [I] I I + +Prints information about one or all snapshots for . If no snapshots +are specified it prints out information about all snapshots. + +B + +=over 4 + +=item B<-n> + +snapshot name. + +=item B<-l>, B<--long> + +list the details for specific snapshot or all snapshots of such domain. + +=back + +=item B [I] I I + +revert domain snapshot according to domain snapshot configuration file. + +B + +=over 4 + +=item B<-n> + +snapshot name. + +=back + +=back + =head1 TO BE DOCUMENTED We need better documentation for: -- 1.8.1.4