Snapshots preserve the state and data of a virtual machine at the time you take the snapshot. When you take a snapshot of a virtual machine, an image of the virtual machine in a given state is copied and stored.

Snapshots are useful when you want to revert repeatedly to a virtual machine state, but you do not want to create multiple virtual machines.

You can take multiple snapshots of a virtual machine to create restoration positions in a linear process. With multiple snapshots, you can save many positions to accommodate many kinds of work processes. Snapshots operate on individual virtual machines. Taking snapshots of multiple virtual machines, for example, taking a snapshot of a VM for each member of a team, requires that you take a separate snapshot of each team member's virtual machine.

Snapshots are useful as a short term solution for testing software with unknown or potentially harmful effects. For example, you can use a snapshot as a restoration point during a linear or iterative process, such as installing update packages, or during a branching process, such as installing different versions of a program. Using snapshots ensures that each installation begins from an identical baseline.

With snapshots, you can preserve a baseline before you change a virtual machine.

Several operations for creating and managing virtual machine snapshots and snapshot trees are available in the vSphere Client. These operations enable you to create snapshots, revert any snapshot in the snapshot hierarchy, delete snapshots, and more. You can create snapshot trees where you save the virtual machine state at any specific time so that you can revert that virtual machine state later. Each branch in a snapshot tree can have up to 32 snapshots.

A snapshot preserves the following information:

  • Virtual machine settings. The virtual machine directory, which includes the disks added or changed after you take the snapshot.
  • Power state. The virtual machine can be powered on, powered off, or suspended.
  • Disk state. State of all the virtual machine's virtual disks.
  • (Optional) Memory state. The contents of the virtual machine's memory.

The Snapshot Hierarchy

The vSphere Client presents the snapshot hierarchy as a tree with one or more branches. Snapshots in the hierarchy have parent to child relationships. In linear processes, each snapshot has one parent snapshot and one child snapshot, except for the last snapshot, which has no child snapshot. Each parent snapshot can have more than one child. You can revert to the current parent snapshot or to any parent or child snapshot in the snapshot tree and create more snapshots from that snapshot. Each time you revert a snapshot and take another snapshot, a branch (child snapshot) is created.

Parent Snapshots
The first virtual machine snapshot that you create is the base parent snapshot. The parent snapshot is the most recently saved version of the current state of the virtual machine. Taking a snapshot creates a delta disk file for each disk attached to the virtual machine and optionally, a memory file. The delta disk files and memory file are stored with the base .vmdk file. The parent snapshot is always the snapshot that appears immediately above the You are here icon in the Snapshot Manager. If you revert a snapshot, that snapshot becomes the parent of the You are here current state.
Note: The parent snapshot is not always the snapshot that you took most recently.
Child Snapshots
A snapshot of a virtual machine taken after the parent snapshot. Each child snapshot contains delta files for each attached virtual disk, and optionally a memory file that points from the present state of the virtual disk (You are here). Each child snapshot's delta files merge with each previous child snapshot until reaching the parent disks. A child disk can later be a parent disk for future child disks.

The relationship of parent and child snapshots can change if you have multiple branches in the snapshot tree. A parent snapshot can have more than one child. Many snapshots have no children.

Caution: Do not manually manipulate individual child disks or any of the snapshot configuration files because doing so can compromise the snapshot tree and result in data loss. This restriction includes disk resizing and making modifications to the base parent disk by using the vmkfstools command.

Snapshot Behavior

Taking a snapshot preserves the disk state at a specific time by creating a series of delta disks for each attached virtual disk or virtual RDM and optionally preserves the memory and power state by creating a memory file. Taking a snapshot creates a snapshot object in the Snapshot Manager that represents the virtual machine state and settings.

Each snapshot creates an additional delta .vmdk disk file. When you take a snapshot, the snapshot mechanism prevents the guest operating system from writing to the base .vmdk file and instead directs all writes to the delta disk file. The delta disk represents the difference between the current state of the virtual disk and the state that existed at the time that you took the previous snapshot. If more than one snapshot exists, delta disks can represent the difference between each snapshot. Delta disk files can expand quickly and become as large as the entire virtual disk if the guest operating system writes to every block of the virtual disk.

Snapshot Files and Limitations

When you take a snapshot, you capture the state of the virtual machine settings and the virtual disk. If you are taking a memory snapshot, you also capture the memory state of the virtual machine. These states are saved to files that reside with the base files of the virtual machines.

Snapshot Files

A snapshot consists of files that are stored on a supported storage device. A Take Snapshot operation creates .vmdk, -delta.vmdk or -sesparse.vmdk, .vmsd, and .vmsn files. By default, the first and all delta disks are stored with the base .vmdk file. The .vmsd and .vmsn files are stored in the virtual machine directory.

SEsparse is a default format for all delta disks on the VMFS6 datastores.

Delta disk files
A .vmdk file to which the guest operating system can write. The delta disk represents the difference between the current state of the virtual disk and the state that existed at the time that the previous snapshot was taken. When you take a snapshot, the state of the virtual disk is preserved, the guest operating system stops writing to it, and a delta or child disk is created.

A delta disk has two files. One is a small descriptor file that contains information about the virtual disk, such as geometry and child-parent relationship information. The other one is a corresponding file that contains the raw data.

The files that make up the delta disk are called child disks or redo logs.
Flat file
A -flat.vmdk file that is one of two files that comprises the base disk. The flat disk contains the raw data for the base disk. This file does not appear as a separate file in the Datastore Browser.
Database file
A .vmsd file that contains the virtual machine's snapshot information and is the primary source of information for the Snapshot Manager. This file contains line entries, which define the relationships between snapshots and between child disks for each snapshot.
Memory file
A .vmsn file that includes the active state of the virtual machine. Capturing the memory state of the virtual machine lets you revert to a turned on virtual machine state. With nonmemory snapshots, you can only revert to a turned off virtual machine state. Memory snapshots take longer to create than nonmemory snapshots. The time the ESXi host takes to write the memory onto the disk depends on the amount of memory the virtual machine is configured to use.

A Take Snapshot operation creates .vmdk, -delta.vmdk, vmsd or -sesparse.vmdk, and vmsn files.

File Description
vmname-number.vmdk and vmname-number-delta.vmdk Snapshot file that represents the difference between the current state of the virtual disk and the state that existed at the time the previous snapshot was taken.

The filename uses the following syntax, S1vm-000001.vmdk where S1vm is the name of the virtual machine and the six-digit number, 000001, is based on the files that already exist in the directory. The number does not consider the number of disks that are attached to the virtual machine.

vmname.vmsd Database of the virtual machine's snapshot information and the primary source of information for the Snapshot Manager.
vmname.Snapshotnumber.vmsn Memory state of the virtual machine at the time you take the snapshot. The filename uses the following syntax, S1vm.snapshot1.vmsn, where S1vm is the virtual machine name, and snapshot1 is the first snapshot.
Note: A .vmsn file is created each time you take a snapshot, regardless of the memory selection. A .vmsn file without memory is much smaller than one with memory.

Snapshot Limitations

Snapshots can affect the virtual machine performance and do not support some disk types or virtual machines configured with bus sharing. Snapshots are useful as short-term solutions for capturing point-in-time virtual machine states and are not appropriate for long-term virtual machine backups.

  • VMware does not support snapshots of raw disks, RDM physical mode disks, or guest operating systems that use an iSCSI initiator in the guest.
  • Virtual machines with independent disks must be powered off before you take a snapshot.
  • You can take a memory snapshot of a virtual machine with an independent disk only to analyze the guest operating system behavior of a virtual machine. You cannot use such snapshots for virtual machine backups because restoring this type of snapshots is unsupported.
  • Quiesced snapshots require VMware Tools installation and guest operating system support.
  • Snapshots are not supported with PCI vSphere DirectPath I/O devices.
  • VMware does not support snapshots of virtual machines configured for bus sharing. If you require bus sharing, consider running backup software in your guest operating system as an alternative solution. If your virtual machine currently has snapshots that prevent you from configuring bus sharing, delete (consolidate) the snapshots.
  • Snapshots provide a point-in-time image of the disk that backup solutions can use, but Snapshots are not intended for a robust method of backup and recovery. If the files containing a virtual machine are lost, its snapshot files are also lost. Also, large numbers of snapshots are difficult to manage, consume large amounts of disk space, and are not protected if there is hardware failure.
  • Snapshots can negatively affect the performance of a virtual machine. Performance degradation is based on how long the snapshot or snapshot tree is in place, the depth of the tree, and how much the virtual machine and its guest operating system have changed from the time you took the snapshot. Also, you might see a delay in the amount of time it takes the virtual machine to power on. Do not run production virtual machines from snapshots on a permanent basis.
  • If a virtual machine has virtual hard disks larger than 2 TB, snapshot operations can take much longer to finish.

Snapshot Limitations

Snapshots can affect the virtual machine performance and do not support some disk types or virtual machines configured with bus sharing. Snapshots are useful as short-term solutions for capturing point-in-time virtual machine states and are not appropriate for long-term virtual machine backups.

  • VMware does not support snapshots of raw disks, RDM physical mode disks, or guest operating systems that use an iSCSI initiator in the guest.
  • Virtual machines with independent disks must be powered off before you take a snapshot.
  • Starting with ESXi 7.0 Update 3l, you can take a memory snapshot of a virtual machine with an independent disk only to analyze the guest operating system behavior of a virtual machine. You cannot use such snapshots for virtual machine backups because restoring this type of snapshots is unsupported.
  • Quiesced snapshots require VMware Tools installation and guest operating system support.
  • Snapshots are not supported with PCI vSphere DirectPath I/O devices.
  • VMware does not support snapshots of virtual machines configured for bus sharing. If you require bus sharing, consider running backup software in your guest operating system as an alternative solution. If your virtual machine currently has snapshots that prevent you from configuring bus sharing, delete (consolidate) the snapshots.
  • Snapshots provide a point-in-time image of the disk that backup solutions can use, but Snapshots are not meant to be a robust method of backup and recovery. If the files containing a virtual machine are lost, its snapshot files are also lost. Also, large numbers of snapshots are difficult to manage, consume large amounts of disk space, and are not protected if there is hardware failure.
  • Snapshots can negatively affect the performance of a virtual machine. Performance degradation is based on how long the snapshot or snapshot tree is in place, the depth of the tree, and how much the virtual machine and its guest operating system have changed from the time you took the snapshot. Also, you might see a delay in the amount of time it takes the virtual machine to power on. Do not run production virtual machines from snapshots on a permanent basis.
  • If a virtual machine has virtual hard disks larger than 2 TB, snapshot operations can take much longer to finish.

Take a Snapshot of a Virtual Machine in the VMware Host Client

You can take one or more snapshots of a virtual machine to capture the settings state, disk state, and memory state at the time you take the snapshot. When you take a snapshot, you can also quiesce the virtual machine files and exclude the virtual machine disks from snapshots. You can take a snapshot when a virtual machine is powered on, powered off, or suspended. To take a snapshot of a suspended virtual machine, wait until the suspend operation finishes before you take a snapshot.

When you take a snapshot, other activity that is occurring in the virtual machine might affect the snapshot process when you revert to that snapshot. The best time to take a snapshot from a storage perspective, is when you are not incurring a large I/O load. The best time to take a snapshot from a service perspective is when no applications in the virtual machine are communicating with other computers. The potential for problems is greatest if the virtual machine is communicating with another computer, especially in a production environment. For example, if you take a snapshot while the virtual machine is downloading a file from a server on the network, the virtual machine continues downloading the file and communicating its progress to the server. If you revert to the snapshot, communications between the virtual machine and the server are confused and the file transfer fails. Depending on the task that you are performing, you can create a memory snapshot or you can quiesce the file system in the virtual machine.

Memory Snapshots
The default selection for taking snapshots. When you capture the virtual machine memory state, the snapshot retains the live state of the virtual machine. Memory snapshots create a snapshot at a precise time, for example, to upgrade software that is still working. If you take a memory snapshot and the upgrade does not complete as expected, or the software does not meet your expectations, you can revert the virtual machine to its previous state.

When you capture the memory state, the virtual machine files do not require quiescing. If you do not capture the memory state, the snapshot does not save the live state of the virtual machine and the disks are crash consistent unless you quiesce them.

Snapshots that capture the memory state of a virtual machine take longer to complete. You might also see a momentary lapse in response over the network.

Quiesced Snapshots
When you quiesce a virtual machine, VMware Tools quiesces the file system of the virtual machine. A quiesce operation ensures that a snapshot disk represents a consistent state of the guest file systems. The quiesce operation pauses or alters the state of running processes on the virtual machine, especially processes that might modify information stores on the disk during a restore operation. Quiesced snapshots are appropriate for automated or periodic backups. For example, if you are unaware of the virtual machine activity, but want several recent backups to revert to, you can quiesce the files.

If the virtual machine is powered off or VMware Tools is not available, the Quiesce parameter is not available. You cannot quiesce virtual machines that have large capacity disks.

Application-consistent quiescing is not supported for virtual machines with IDE or SATA disks.

Important: Do not use snapshots as your only backup solution or as a long-term backup solution.
Note: If you take a snapshot of a Dynamic Disk (Microsoft-specific disk type), the snapshot technology preserves the quiesced state of the file system, but does not preserve the quiesced state of the application.

Prerequisites

  • If you are taking a memory snapshot of a virtual machine that has multiple disks in different disk modes, verify that the virtual machine is powered off. For example, if you have a special purpose configuration that requires you to use an independent disk, you must power off the virtual machine before taking a snapshot.
  • To capture the memory state of the virtual machine, verify that the virtual machine is powered on.
  • To quiesce the virtual machine files, verify that the virtual machine is powered on and that VMware Tools is installed.
  • Verify that you have the Virtual machine.Snapshot management.Create snapshot privilege on the virtual machine.

Procedure

  1. Click Virtual Machines in the VMware Host Client inventory.
  2. Right-click a virtual machine from the list and select Snapshots > Take snapshot.
  3. Enter a name for the snapshot.
  4. (Optional) Type a description for the snapshot.
  5. (Optional) Select the Snapshot the virtual machine's memory check box to capture the memory of the virtual machine.
  6. (Optional) Deselect Snapshot the virtual machine's memory and select Quiesce guest file system (needs VMware Tools installed) check box to pause running processes on the guest operating system so that file system contents are in a known consistent state when you take the snapshot.
    Quiesce the virtual machine files only when the virtual machine is powered on and you do not want to capture the virtual machine's memory.
  7. Click Take snapshot.

Revert to the Latest Snapshot in the VMware Host Client

To return a virtual machine to its original state, or to return to another snapshot in the snapshot hierarchy, you can restore a snapshot.

When you restore a snapshot, you return the virtual machine memory, settings, and the state of the virtual machine disks to the state they were in at the time you took the snapshot. If you want the virtual machine to be suspended, powered on, or powered off when you start it, make sure that it is in the correct state when you take the snapshot.

You can restore snapshots in the following ways:
Revert to Latest Snapshot
Restores the parent snapshot, one level up in the hierarchy from the You are Here position. Revert to Latest Snapshot activates the parent snapshot of the current state of the virtual machine.
Revert To
Lets you restore any snapshot in the snapshot tree and makes that snapshot the parent snapshot of the current state of the virtual machine. Subsequent snapshots from this point create a new branch of the snapshot tree.

Restoring snapshots has the following effects:

  • The current disk and memory states are discarded, and the virtual machine reverts to the disk and memory states of the parent snapshot.
  • Existing snapshots are not removed. You can restore those snapshots at any time.
  • If the snapshot includes the memory state, the virtual machine will be in the same power state as when you created the snapshot.
    Table 1. Virtual Machine Power State After Restoring a Snapshot
    Virtual Machine State When Parent Snapshot Is Taken Virtual Machine State After Restoration
    Powered on (includes memory) Reverts to the parent snapshot, and the virtual machine is powered on and running.
    Powered on (does not include memory) Reverts to the parent snapshot and the virtual machine is powered off.
    Powered off (does not include memory) Reverts to the parent snapshot and the virtual machine is powered off.

Virtual machines running certain kinds of workloads can take several minutes to resume responsiveness after reverting from a snapshot.

Note: vApp metadata for virtual machines in vApps does not follow the snapshot semantics for virtual machine configuration. vApp properties that are deleted, modified, or defined after a snapshot is taken remain intact (deleted, modified, or defined) after the virtual machine reverts to that snapshot or any previous snapshots.

Prerequisites

Verify that you have the Virtual machine.Snapshot management.Revert to snapshot privilege on the virtual machine.

Procedure

  1. Click Virtual Machines in the VMware Host Client inventory.
  2. Right-click the virtual machine in the list and select Snapshots > Restore snapshot.
    Note: The current state of the virtual machine will be lost unless you save it in a snapshot.
  3. Click Restore to revert the virtual machine to the most recent snapshot.

Delete a Snapshot in the VMware Host Client

You can use the Snapshot Manager to delete a single snapshot or all snapshots in a tree. Deleting a snapshot removes the snapshot from the Snapshot Manager. The snapshot files are consolidated and written to the parent snapshot disk and merge with the virtual machine base disk.

Deleting a snapshot does not change the virtual machine or other snapshots. Deleting a snapshot consolidates the changes between snapshots and previous disk states and writes all the data from the delta disk that contains the information about the deleted snapshot to the parent disk. When you delete the base parent snapshot, all changes merge with the base virtual machine disk.

To delete a snapshot, a large amount of information needs to be read and written to a disk. This process can reduce virtual machine performance until consolidation is complete. Consolidating snapshots removes redundant disks, which improves virtual machine performance and saves storage space. The time it takes to delete snapshots and consolidate the snapshot files depends on the amount of data that the guest operating system writes to the virtual disks after you take the last snapshot. The required time is proportional to the amount of data the virtual machine is writing during consolidation if the virtual machine is powered on.

Failure of disk consolidation can reduce the performance of virtual machines. You can check whether any virtual machines require separate consolidation operations by viewing a list. For information about locating and viewing the consolidation state of multiple virtual machines and running a separate consolidation operation, see vSphere Virtual Machine Administration.

Delete
Use the Delete option to remove a single parent or child snapshot from the snapshot tree. Delete writes disk changes that occur between the state of the snapshot and the previous disk state to the parent snapshot.
Note: Deleting a single snapshot preserves the current state of the virtual machine and does not affect any other snapshot.
You can also use the Delete option to remove a corrupt snapshot and its files from an abandoned branch of the snapshot tree without merging them with the parent snapshot.
Delete All
Use the Delete All option to delete all snapshots from the Snapshot Manager. Delete all consolidates and writes the changes that occur between snapshots and the previous delta disk states to the base parent disk and merges them with the base virtual machine disk.

To prevent snapshot files from merging with the parent snapshot if, for example, an update or installation fails, first use the Restore command to restore to a previous snapshot. This action invalidates the snapshot delta disks and deletes the memory file. You can then use the Delete option to remove the snapshot and any associated files.

Be careful not to accidentally delete a snapshot that you need. You cannot restore a deleted snapshot. For example, you might want to install several browsers, a, b, and c, and capture the virtual machine state after you install each browser. The first, or base snapshot, captures the virtual machine with browser a and the second snapshot captures browser b. If you restore the base snapshot that includes browser a and take a third snapshot to capture browser c and delete the snapshot that contains browser b, you cannot return to the virtual machine state that includes browser b.

Procedure

  1. Click Virtual Machines in the VMware Host Client inventory.
  2. Right-click the virtual machine in the list and select Snapshots > Manage Snapshots.
  3. Click the snapshot that you want to delete and click Delete snapshot.
  4. (Optional) In the Delete Snapshot dialog box, select the Remove all children snapshots check-box to delete the selected snapshot together with all its children snapshots.
  5. Click Remove to confirm the deletion.
  6. Click Close to navigate out of the Snapshot Manager.

Why to Use Snapshot Manager in the VMware Host Client

You can review all snapshots for your virtual machines and use the Snapshot Manager to manage the snapshots.

After you take a snapshot, you can right-click a virtual machine and click Revert to snapshot to restore the virtual machine to the state of the snapshot at any time.

If you have a series of snapshots, you can use the Snapshot Manager to restore any parent or child snapshot. Subsequent child snapshots that you take from the restored snapshot create a branch in the snapshot tree. Use the Snapshot Manager to delete a snapshot from the tree.

Table 2. Snapshot Manager
Option Description

Snapshot tree

Displays all snapshots for the virtual machine.

You are here icon

The You are here icon represents the current and active state of the virtual machine.

The Restore, Delete, and Edit actions are deactivated for the You are here state.

Take, Restore, Delete, Edit

Snapshot options.

Details

Shows the snapshot name and description, the date you created the snapshot. The Console shows the power state of the virtual machine when a snapshot was taken. The Name, Description, and Created text boxes are blank if you do not select a snapshot.