Snapshots

A snapshot is reproduction of the virtual machine just as it was when you took the snapshot. The snapshot includes the state of the data on all virtual machine disks and the virtual machine power state (on, off, or suspended). You can take a snapshot when a virtual machine is powered on, powered off, or suspended.

When you create a snapshot, the system creates a delta disk file for that snapshot in the datastore and writes any changes to that delta disk. You can later revert to the previous state of the virtual machine.

The VirtualMachine object has methods for creating snapshots, reverting to any snapshot in the tree, and removing snapshots.

Figure 1. Virtual Machine Snapshots
Shows the snapshot tree after taking three snapshots of a virtual machine.

Snapshot hierarchies can become fairly complex. For example, assume that, in the example in Virtual Machine Snapshots, you revert to snapshot_a. You might then work with and make changes to the snapshot_a virtual machine, and create a new snapshot, creating, in effect, a branching tree.