1.Use the command snapshot-export-to-templateto 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 other-configallows 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:

The more VBDs attached to a VM, the more likely it is that this timeout may be reached. Citrix recommends attaching no more that 2 VBDs to a VM to avoid reaching the timeout. However, there is a workaround to this problem. The probability of taking a successful VSS based snapshot of a VM with more than 2 VBDs can be increased manifold, if all the VDIs for the VM are hosted on different SRs.

VSS snapshot all the disks attached to a VM: in order to store all data available at the time of a VSS snapshot, the XAPI manager will snapshot all disks and the VM metadata associated with a VM that can be snapshotted using the XenServer storage manager API. If the VSS layer requests a snapshot of only a subset of the disks, a full VM snapshot will not be taken.

vm-snapshot-with-quiesceproduces bootable snapshot VM images: To achieve this, the XenServer VSS hardware provider makes snapshot volumes writable, including the snapshot of the boot volume.

101

Page 119
Image 119
Citrix Systems 6 manual Advanced Notes for Quiesced Snapshots