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.
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.
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
When creating an external snapshot, you can specify the snapshot as a consistency snapshot to snapshot all disks of the VM at the same time, ensuring VM data consistency.
In the current software version, ARM hosts do not support consistency snapshots. |
Do not use VM snapshots as VM backups.
Creating snapshots for a VM will increase the disk file size of the VM. Make sure the storage pool on which the image file of the target VM is saved has sufficient space.
You can create multiple snapshots for a VM. As a best practice to save disk space and avoid long image chains, do not create too many snapshots for a VM. When necessary, you can delete some snapshots to release disk space or improve VM performance. As a best practice, retain only external snapshots created in the past 72 hours.
To create an internal snapshot for a VM, make sure the disk format of the VM is an image file in qcow2 format or RBD. VMs that use RBDs as disks do not support online memory snapshots.
When you create an external snapshot for a VM, only dependent disks are included in the snapshot.
As a best practice to avoid VM restoration failure, do not edit VM settings during the snapshot creation or VM restoration process.
Taking a snapshot for a VM does not replicate the GPU configuration. When you restore a VM from a snapshot, GPU configuration is not restored.
When you take a snapshot of a running VM, the VM will be suspended temporarily. You cannot operate the VM during the VM suspension.
You cannot create a memory snapshot for a VM if live VM migration, CAStools upgrade, CPU hot add, VM reboot, VM hibernation, or VM shutdown is in progress.
You can create consistency snapshots for a VM only when the CAStoolsUsphereTools version of the VM supports consistency snapshots. High disk IO load might cause consistency snapshot creation failures. As a best practice, create consistency snapshots when the disk IO load is low.
If a VM on an x86 host is mounted with a shared disk, the VM does not support memory snapshots or consistency snapshots. When you create a common snapshot for such a VM, the shared disk will not be snapshotted.
VMs that use Windows Server 2003, Windows XP, FreeBSD, and SUSE operating systems do not support consistency snapshots.
On the top navigation bar, click Resources.
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.
Click Snapshot. The VM Snapshot Management dialog box opens.
Click Create.
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."
Click OK.
On the top navigation bar, click Resources.
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.
Click Snapshot. The VM Snapshot Management dialog box opens.
From the VM snapshot tree, select a snapshot, and then click Edit.
Enter the snapshot name and description.
Click OK.
On the top navigation bar, click Resources.
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.
Click Snapshot.
From the VM snapshot tree, select a snapshot, and then click Restore.
In the dialog box that opens, click OK.
On the top navigation bar, click Resources.
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.
Click Snapshot.
From the VM snapshot tree, select one or multiple snapshots, and then click Delete.
In the dialog box that opens, click OK.
On the top navigation bar, click Resources.
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.
Click Snapshot.
Click Consolidate Image Chain.
In the dialog box that opens, click OK.
Snapshot Type: Select a snapshot type.
Memory Snapshot: Whether to include VM memory in the snapshot.
Timeout: Timeout for taking internal snapshots. If snapshot creation is not finished within this timeout, the system suspends the VM and resumes the VM after snapshot creation is finished.
Consistency Snapshot: Select whether to create a consistency snapshot. This feature is enabled by default if the CAStoolsUsphereTools version of the VM and the tool running state support consistency snapshots. If the CAStoolsUsphereTools version of the VM or the tool running state does not support consistency snapshots, this feature is disabled by default. To create consistency snapshots for a VM, you must install a CAStools version for E0750 or later on the VM. Memory snapshot and consistency snapshot are mutually exclusive.