<content type="string" default="live"/>
</parameter>
+ <parameter name="snapshot">
+ <longdesc lang="en">
+ Path to the snapshot directory where the virtual machine
+ image will be stored.
+ </longdesc>
+ <shortdesc lang="en">
+ Path to the snapshot directory where the virtual machine
+ image will be stored.
+ </shortdesc>
+ <content type="string" default=""/>
+ </parameter>
+
<parameter name="depend">
<longdesc lang="en">
Top-level service this depends on, in "service:name" format.
;;
migrate)
;;
+ snapshot)
+ ;;
*)
cmdline="$cmdline $varp=\"$val\""
;;
# doesn't exist...
#
declare cmdline
+ declare snapshotimage
status && return 0
+ snapshotimage="$OCF_RESKEY_snapshot/$OCF_RESKEY_name"
+
+ if [ -n "$OCF_RESKEY_snapshot" -a -f "$snapshotimage" ]; then
+ eval xm restore $snapshotimage
+ if [ $? -eq 0 ]; then
+ rm -f $snapshotimage
+ return 0
+ fi
+ return 1
+ fi
+
cmdline="`build_xm_cmdline`"
echo "# xm command line: $cmdline"
declare -i ret=1
declare st
+ if [ -n "$OCF_RESKEY_snapshot" ]; then
+ xm save $OCF_RESKEY_name "$OCF_RESKEY_snapshot/$OCF_RESKEY_name"
+ fi
+
for op in $*; do
echo xm $op $OCF_RESKEY_name ...
xm $op $OCF_RESKEY_name