10.8. Virtual Machine Snapshots for VMware
(VMware hosts only) In addition to the existing CloudStack ability to snapshot individual VM volumes, you can now take a VM snapshot to preserve all the VM's data volumes as well as (optionally) its CPU/memory state. This is useful for quick restore of a VM. For example, you can snapshot a VM, then make changes such as software upgrades. If anything goes wrong, simply restore the VM to its previous state using the previously saved VM snapshot.
The snapshot is created using the VMware native snapshot facility. The VM snapshot includes not only the data volumes, but optionally also whether the VM is running or turned off (CPU state) and the memory contents. The snapshot is stored in CloudStack's primary storage.
VM snapshots can have a parent/child relationship. Each successive snapshot of the same VM is the child of the snapshot that came before it. Each time you take an additional snapshot of the same VM, it saves only the differences between the current state of the VM and the state stored in the most recent previous snapshot. The previous snapshot becomes a parent, and the new snapshot is its child. It is possible to create a long chain of these parent/child snapshots, which amount to a "redo" record leading from the current state of the VM back to the original.
10.8.1. Limitations on VM Snapshots
If a VM has some stored snapshots, you can't attach new volume to the VM or delete any existing volumes. If you change the volumes on the VM, it would become impossible to restore the VM snapshot which was created with the previous volume structure. If you want to attach a volume to such a VM, first delete its snapshots.
VM snapshots which include both data volumes and memory can't be kept if you change the VM's service offering. Any existing VM snapshots of this type will be discarded.
You can't make a VM snapshot at the same time as you are taking a volume snapshot.
The "quiesce" option is not supported. This option is provided by the underlying VMware snapshot facility so that you can choose whether to quiesce the file system on a running virtual machine before taking the snapshot. In CloudStack, the quiesce option is always set to false; the file system is not quiesced before taking a snapshot of a running VM.
You should use only CloudStack to create VM snapshots on VMware hosts managed by CloudStack. Any snapshots that you make directly on vSphere will not be tracked in CloudStack.
10.8.3. Using VM Snapshots
To create a VM snapshot using the CloudStack UI:
Log in to the CloudStack UI as a user or administrator.
Click Instances.
Click the name of the VM you want to snapshot.
Click the Take VM Snapshot button.
If a snapshot is already in progress, then clicking this button will have no effect.
Provide a name and description. These will be displayed in the VM Snapshots list.
(For running VMs only) If you want to include the VM's memory in the snapshot, click the Memory checkbox. This saves the CPU and memory state of the virtual machine. If you don't check this box, then only the current state of the VM disk is saved. Checking this box makes the snapshot take longer.
Click OK.
To delete a snapshot or restore a VM to the state saved in a particular snapshot:
Navigate to the VM as described in the earlier steps.
Click View VM Snapshots.
In the list of snapshots, click the name of the snapshot you want to work with.
Depending on what you want to do:
To delete the snapshot, click the Delete button.
To revert to the snapshot, click the Revert button.
VM snapshots are deleted automatically when a VM is destroyed. You don't have to manually delete the snapshots in this case.