Manage VM snapshots

A snapshot is a replica of a VM as it was when you took the snapshot. A snapshot saves VM settings and disk data, and can be used for VM recovery. You can create a snapshot for a VM for VM recovery when application software and VM OS incompatibility occur because of new application software installation, VM OS upgrade, or application software upgrade. To create a snapshot policy that takes effect periodically on multiple VMs, see "Add a snapshot policy."

You can create either internal or external snapshots for a VM. If a VM has an internal snapshot, you cannot create external snapshots for it, and vice versa.

Internal snapshots

When you create a snapshot for a VM, the system sets the allocated clusters in the disk of the VM to read-only state to indicate that these clusters have been referenced by the snapshot. Before writing new data into a cluster, the system copies the data in the cluster to a new cluster, and subsequent edits will be executed in the new cluster. Internal snapshots are stored in the disk files of VMs. Therefore, if the disk file of a VM is corrupted or deleted, the snapshot data will be lost.

Deleting internal snapshots releases disk space. As a best practice to save disk space, do not create too many snapshots for a VM. When necessary, you can delete some snapshots to release disk space.

External snapshots

When you create a snapshot for a VM, the system sets the disk of the VM to read-only state and creates an incremental image file for the VM. Subsequent edits to the VM's disk will be executed in the incremental image file. When you create a snapshot for the VM again, the system sets both the original disk and the incremental image file of the VM to read-only state and creates a new incremental image file for the VM to form an image chain. External snapshots store only incremental data, so they do not affect the VM services and are applicable to VMs with frequent service changes.

Deleting external snapshots for a VM does not affect the VM or other snapshots of the VM. When you delete an external snapshot of a VM, the image files of the VM are merged. The data stored in the incremental image file created after the snapshot is taken will be written into the upper-level image file. As a best practice to avoid long image chains, do not create too many snapshots for a VM. When necessary, you can delete some snapshots to consolidate the image chain and improve VM performance.

After you create or restore external snapshots multiple times for a VM, redundant incremental image files might exist, for example, the incremental image file that is not merged into the upper-level image file after you delete the associated external snapshot. To prevent redundant incremental image files from affecting VM performance, you can consolidate the image chain of the VM to merge the images and increase the disk read speed. After you consolidate the image chain of the VM, incremental image files will be merged into their upper-level images on the premise that data dependency is not affected.

Figure-1 Image chain

Restrictions and guidelines

Create a snapshot

  1. On the top navigation bar, click Resources.

  1. From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.

  1. Click Snapshot. The VM Snapshot Management dialog box opens.

  1. Click Create.

  1. Enter the snapshot name and description and select a snapshot type.

If the VM is in running or suspended state, you can specify whether to include memory state in the snapshot. For internal snapshots, you can set the snapshot creation timeout. For more information, see "Parameters."

  1. Click OK.

Edit a snapshot

  1. On the top navigation bar, click Resources.

  1. From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.

  1. Click Snapshot. The VM Snapshot Management dialog box opens.

  1. From the VM snapshot tree, select a snapshot, and then click Edit.

  1. Enter the snapshot name and description.

  1. Click OK.

Restore a VM by using a snapshot

  1. On the top navigation bar, click Resources.

  1. From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.

  1. Click Snapshot.

  1. From the VM snapshot tree, select a snapshot, and then click Restore.

  1. In the dialog box that opens, click OK.

Delete a snapshot

  1. On the top navigation bar, click Resources.

  1. From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.

  1. Click Snapshot.

  1. From the VM snapshot tree, select one or multiple snapshots, and then click Delete.

  1. To delete an external snapshot, select the target snapshot from the snapshot tree, click Delete, specify a maximum deletion rate in the dialog box that opens, and then click OK.

  1. In the dialog box that opens, click OK.

You can set the deletion rate and cancel the deletion of an external snapshot. To cancel the deletion of an external snapshot, right click the external snapshot deletion task on the task console, and then click Cancel Task.

Consolidate the image chain of a VM

  1. On the top navigation bar, click Resources.

  1. From the left navigation pane, select Compute > host pool name > host name > VM name or Compute > host pool name > cluster name > host name > VM name.

  1. Click Snapshot.

  1. Click Consolidate Image Chain.

  1. In the dialog box that opens, click OK.

Parameters