Citrix Systems 6 Server User Manual


 
97
VM Snapshots
XenServer provides a convenient snapshotting mechanism that can take a snapshot of a VM storage and metadata
at a given time. Where necessary, IO is temporarily halted while the snapshot is being taken to ensure that a self-
consistent disk image can be captured.
Snapshot operations result in a snapshot VM that is similar to a template. The VM snapshot contains all the
storage information and VM configuration, including attached VIFs, allowing them to be exported and restored
for backup purposes. Snapshots are supported on all storage types, though for the LVM-based storage types the
storage repository must have been upgraded if it was created on a previous version of XenServer and the volume
must be in the default format (type=raw volumes cannot be snapshotted).
The snapshotting operation is a 2 step process:
Capturing metadata as a template.
Creating a VDI snapshot of the disk(s).
Three types of VM snapshots are supported: regular, quiesced, and snapshot with memory
Regular Snapshots
Regular snapshots are crash consistent and can be performed on all VM types, including Linux VMs.
Quiesced Snapshots
Quiesced snapshots take advantage of the Windows Volume Shadow Copy Service (VSS) to generate application
consistent point-in-time snapshots. The VSS framework helps VSS-aware applications (for example Microsoft
Exchange or Microsoft SQL Server) flush data to disk and prepare for the snapshot before it is taken.
Quiesced snapshots are therefore safer to restore, but can have a greater performance impact on a system while
they are being taken. They may also fail under load so more than one attempt to take the snapshot may be
required.
XenServer supports quiesced snapshots on Windows Server 2003 and Windows Server 2008 for both 32-bit and
64-bit variants. Windows 2000, Windows XP and Windows Vista are not supported. For further detail on quiesced
snapshots, see the section called “Advanced Notes for Quiesced Snapshots”.
Snapshots with memory
In addition to saving the VMs memory (storage) and metadata, snapshots with memory also save the VMs state
(RAM). This can be useful if you are upgrading or patching software, or want to test a new application, but also
want the option to be able to get back to the current, pre-change state (RAM) of the VM. Reverting back to a
snapshot with memory, does not require a reboot of the VM.
You can take a snapshot with memory of a running or suspended VM via the XenAPI, the xe CLI, or by using
XenCenter.
Creating a VM Snapshot
Before taking a snapshot, see the section called “Preparing to clone a Windows VM” in XenServer Virtual Machine
Installation Guide and the section called “Preparing to clone a Linux VM” in XenServer Virtual Machine Installation
Guide for information about any special operating system-specific configuration and considerations to take into
account.
Firstly, ensure that the VM is running or suspended so that the memory status can be captured. The simplest
way to select the VM on which the operation is to be performed is by supplying the argument vm=<name>
or vm=<vm uuid>> .
Run the vm-snapshot and vm-snapshot-with-quiesce commands to take a snapshot of a VM.