Virtual machine snapshots are file-based snapshots of the state, disk data, and configuration of a virtual machine at a specific point in time. You can take multiple snapshots of a virtual machine, even while it is running. You can then revert the virtual machine to any of the previous states by applying a snapshot to the virtual machine.

To take a snapshot, you can use either Hyper-V Manager or Virtual Machine Connection. All of the other tasks you can perform with snapshots, such as applying or deleting a snapshot, or viewing a list of all snapshots for a specific virtual machine, are available through Hyper-V Manager. You also can inspect or edit the .avhd files, as well as determine which snapshot an .avhd file is associated with. For instructions on using and managing virtual machine snapshots, see the Windows 2008 Technical Library (https://go.microsoft.com/fwlink/?LinkID=143557).

Important

Do not edit a virtual hard disk when it is used by a virtual machine that has snapshots.

Considerations about virtual machine snapshots

Snapshots can help you increase efficiency in many settings where you need to recreate different computing environments and reproduce various conditions in those environments. Some examples include software development and test, technical support services, and training curriculum development.

However, the same power and flexibility that makes these snapshots useful and effective in certain settings can cause unintended and potentially serious consequences in other settings. These consequences include the inherent risks of unintended data loss if the snapshots are not managed appropriately. For example, if you edit a virtual hard disk connected to a virtual machine that has snapshots, data loss may occur.

Appropriate settings for using snapshots are development and test activities, including using a virtual machine as a staging server to test updates and hotfixes before deploying them to production servers. We do not recommend using snapshots on virtual machines that provide time-sensitive services such as Active Directory services, or when performance or the availability of storage space is critical.

Additionally, you should consider the following before you start using snapshots:

  • Taking a snapshot reduces the performance of the virtual machine while the snapshot is created. You should not use these snapshots on virtual machines that provide services in a production environment.

  • We do not recommend using snapshots on virtual machines that are configured with fixed virtual hard disks because they reduce the performance benefits that are otherwise gained by using fixed virtual hard disks.

  • Snapshots require adequate storage space. Snapshots are stored as .avhd files in the same location at the virtual hard disk. Taking multiple snapshots can quickly consume a large amount of storage space. When you use Hyper-V Manager to delete a snapshot, the snapshot is removed from the snapshot tree but the .avhd file is not deleted until you turn off the virtual machine.

    Caution

    Do not delete .avhd files directly from the storage location.

  • Virtual machine snapshots are not the same as the snapshots created by Volume Shadow Copy Services (VSS). Virtual machine snapshots can be a useful way to create temporary backups of a virtual machine, but are not a replacement for a permanent backup solution. For more information about backing up virtual machines, see Planning for Backup (https://go.microsoft.com/fwlink/?LinkId=143125).

Additional references