A snapshot is a replica of a VM as it was when you take the snapshot. If the image file of a VM is damaged or deleted, the snapshot data will be lost.
Snapshots can be used for VM recovery and VM creation when application software and VM OS incompatibility occur because of new application software installation, VM OS upgrade, or application software upgrade.
You can create a snapshot for one VM, or create a snapshot policy to take effect periodically on multiple VMs. To create a snapshot policy, 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
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 take internal snapshots only for the VMs that use QCOW2 or RBD disks. You can take memory snapshots for a VM that uses RBD disks only when the VM is in shutdown state.
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.
Do not use VM snapshots as VM backups. VM snapshots downgrade VM performance.
If the original image file for a VM is damaged, you cannot use an internal or external snapshot to restore the data of the VM.
As a best practice to avoid VM restoration failure, do not edit VM settings during the snapshot creation process.
When you create an external snapshot for a VM, only dependent disks are included in the snapshot. VMs using RBD blocks do not support external snapshots.
A VM snapshot does not include GPU configuration, and the GPU configuration of a VM does not change when the VM is restored from a snapshot.
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.
When you take a snapshot of a running VM, the VM will be suspended temporarily. You cannot operate the VM during the VM suspension.
On the top navigation bar, click VMs. If multiple clusters exist in the system, you must also select a cluster from the left navigation pane.
Select a VM, click More on the VM tile, and then select Snapshot, or select a VM from the navigation pane to enter the VM overview page, and then click Snapshot.
From the VM snapshot navigation pane, select the target snapshot, and then click Add VM.
Configure the VM parameters as described in "Parameters."
Click Finish.
On the top navigation bar, click VMs. If multiple clusters exist in the system, you must also select a cluster from the left navigation pane.
Select a VM, click More on the VM tile, and then select Snapshot, or select a VM from the navigation pane to enter the VM overview page, and then click Snapshot.
Click Create, and then enter a name and description. For a VM in running or suspended state, you must set memory snapshot and timeout, as described in "Parameters."
Click OK.
On the top navigation bar, click VMs. If multiple clusters exist in the system, you must also select a cluster from the left navigation pane.
Select a VM, click More on the VM tile, and then select Snapshot, or select a VM from the navigation pane to enter the VM overview page, and then click Snapshot.
Click Edit in the Actions column for a snapshot.
Edit the snapshot name and description as needed, and then click OK.
After you restore a VM by using a snapshot, data written after the snapshot is taken will be lost. Please be cautious. If the memory is not included in the snapshot, the VM will be in shutdown state after restoration.
To restore a VM from a snapshot:
On the top navigation bar, click VMs. If multiple clusters exist in the system, you must also select a cluster from the left navigation pane.
Select a VM, click More on the VM tile, and then select Snapshot, or select a VM from the navigation pane to enter the VM overview page, click More Actions, and then select Snapshot.
Select a snapshot, and then click Restore.
In the dialog box that opens, click OK.
Deleting a snapshot will not affect the VM operation, but you cannot restore the VM to the state when the snapshot was taken.
To delete snapshot:
On the top navigation bar, click VMs. If multiple clusters exist in the system, you must also select a cluster from the left navigation pane.
Select a VM, click More on the VM tile, and then select Snapshot, or select a VM from the navigation pane to enter the VM overview page, click More Actions, and then select Snapshot.
Delete a snapshot:
If the VM is in shutdown state, select a snapshot, and then click Delete. In the dialog box that opens, click OK.
If the VM is in running state, select a snapshot, and then click Delete. In the dialog box that opens, set the maximum deletion rate, and then click OK. The maximum deletion rate parameter is available only for external snapshots. For more information about the maximum deletion rate, see "Parameters."
The system can cancel deletion of the external snapshots that are being deleted. The system cannot cancel deletion of the external snapshots that have been deleted. You can view the progress of an external snapshot deletion task in the task console.
To cancel an external snapshot deletion task:
Select external snapshots from the snapshot history tree for a VM, click Delete, and then click OK.
Access the task console, right click the external snapshot deletion task, and then click Cancel Task.
From the left navigation pane, select Resources > host pool name > host name > VM name or Resources > host pool name > cluster name > host name > VM name. If multiple clusters exist in the system, you must also select a cluster from the left navigation pane.
Click Snapshot.
Click Consolidate Image Chain.
In the dialog box that opens, click OK.
Create a VM by using a snapshot:
Alias: Specify an alias for the VM.
Description: Specify a description for the VM.
Target Storage File: Specify the VM's disk file name.
Target Storage Pool: Select a storage pool for the VM.
vSwitch: Select a vSwitch for the VM.
Port Profile/Port Group: Select a port profile for the VM.
Network Parameters: Configure network parameters such as IP address, subnet mask, and gateway address for the VM.
Virtual Firewall: Specify a virtual firewall for the VM.
Create a snapshot:
Memory Snapshot: Select whether to include memory state in the snapshot.
Snapshot Type: Select a snapshot type.
Timeout: Set the timeout for taking the internal snapshot. If snapshot creation is not finished before the timeout expires, the system does not restore the VM until snapshot creation is finished.
Delete a snapshot:
Max Deletion Rate (MB/s): Specify a maximum deletion rate for external snapshots. A higher rate indicates a more severe adverse impact on VM performance, because data processing might slow down as more data is transmitted over the storage I/O channel. The value range is 10 to 500. This parameter is available only when the VM is online and external snapshots are deleted for the VM.