Citrix Systems 5.6 User Manual

Page of 235
131
This will list all of the templates on the XenServer host.
Exporting a snapshot to a template
When you export a VM snapshot, a complete copy of the VM (including disk images) is stored as a single
file on your local machine, with a 
.xva file extension.
To do this:
1. Use the command 
snapshot-export-to-template to create a new template file:
xe snapshot-export-to template snapshot-uuid=
<snapshot-uuid>
 \
  filename=
<template- filename>
For example:
xe snapshot-export-to-template snapshot-uuid=b3c0f369-59a1-dd16-ecd4-a1211df29886 \ 
  filename=example_template_export
The VM export/import feature can be used in a number of different ways:
• As a convenient backup facility for your VMs. An exported VM file can be used to recover an entire VM
in the event of disaster.
• As a way of quickly copying a VM, for example, a special-purpose server configuration that you use many
times. You simply configure the VM the way you want it, export it, and then import it to create copies of
your original VM.
• As a simple method for moving a VM to another server.
For further information on the use of templates refer to the Creating VMs chapter in the XenServer Virtual
Machine Installation Guide and also the Managing virtual machines section in the XenCenter Help.
Advanced Notes for Quiesced Snapshots
Note:
Do not forget to install the Xen VSS provider in the Windows guest in order to support VSS. This is done using
the install- XenProvider.cmd script provided with the Windows PV drivers. More details can be found in the
Virtual Machine Installation Guide in the Windows section.
In general, a VM can only access VDI snapshots (not VDI clones) of itself using the VSS interface. There is
a flag that can be set by the XenServer administrator whereby adding an attribute of 
snapmanager=true
to the VM's 
other-config
 allows that VM to import snapshots of VDIs from other VMs.
Warning:
This opens a security vulnerability and should be used with care. This feature allows an administrator to
attach VSS snapshots using an in-guest transportable snapshot ID as generated by the VSS layer to another
VM for the purposes of backup.
VSS quiesce timeout: the Microsoft VSS quiesce period is set to a non-configurable value of 10 seconds,
and it is quite probable that a snapshot may not be able to complete in time. If, for example the XAPI daemon
has queued additional blocking tasks such as an SR scan, the VSS snapshot may timeout and fail. The
operation should be retried if this happens.
Note: