[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 2/5] add xl snapshot command in xl manpage



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 <bjzhang@xxxxxxxx>
---
 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<snapshot-create> [I<configfile>] [I<OPTIONS>] I<domain-id>
+
+create domain/disk snapshot.
+
+The create subcommand takes a config file as first argument: see
+L<xl.snapshot.cfg(5)> for full details of that file format and possible 
options.
+If I<configfile> is missing B<XL> creates the snapshot of domain from options.
+I<configfile> has to be an absolute path to a file.
+it is allowed if user use I<configfile> combine with I<OPTIONS>, if there is
+some conflict in it, it will report and exit. at the point, it is highly
+recommend that use I<configfile> or I<OPTIONS> alone.
+
+B<OPTIONS>
+
+=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<configfile>.
+
+=back
+
+=item B<snapshot-delete> [I<OPTIONS>] I<domain-id>
+
+delete domain/disk snapshot according to the snapshot configuration file, which
+may include memory check point file, disk snapshot file and configuration file.
+
+B<OPTIONS>
+
+=over 4
+
+=item B<-n>
+
+snapshot name.
+
+=back
+
+=item B<snapshot-list> [I<OPTIONS>] I<domain-id> I<snapshot-name>
+
+Prints information about one or all snapshots for <domain-id>. If no snapshots
+are specified it prints out information about all snapshots.
+
+B<OPTIONS>
+
+=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<snapshot-revert> [I<OPTIONS>] I<domain-id> I<snapshot-name>
+
+revert domain snapshot according to domain snapshot configuration file.
+
+B<OPTIONS>
+
+=over 4
+
+=item B<-n>
+
+snapshot name.
+
+=back
+
+=back
+
 =head1 TO BE DOCUMENTED
 
 We need better documentation for:
-- 
1.8.1.4

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.