Compartilhar via


Checkpoints and Snapshots Overview

 

Applies To: Windows Server 2012 R2

Virtual machine checkpoints (formerly known as virtual machine snapshots) capture the state, data, and hardware configuration of a running virtual machine.

Note

In Windows Server 2012 R2, virtual machine snapshots were renamed to virtual machine checkpoints in Hyper-V manager to match the terminology used in System Center Virtual Machine Management. For clarity, this document will refer to virtual machine snapshots as checkpoints. For information about the new production checkpoints in the Windows Server® 2016 Technical Preview and Windows 10®, see What’s New in Hyper-V in Technical Preview: Production checkpoints.

Checkpoints provide a fast and easy way to revert the virtual machine to a previous state. For this reason, virtual machine checkpoints are intended mainly for use in development and test environments. Having an easy way to revert a virtual machine can be very useful if you need to recreate a specific state or condition so that you can troubleshoot a problem.

There are certain circumstances in which it may make sense to use checkpoints in a production environment. For example, you can use checkpoints to provide a way to revert a potentially risky operation in a production environment, such as applying an update to the software running in the virtual machine.

For information about a new type of checkpoints in Windows Server 2016 Technical Preview and Windows 10 that were created for use in a production environment, see What’s New in Hyper-V in Technical Preview: Production checkpoints. For the most current version of this content, see Choose between standard or production checkpoints in Hyper-V and Enable or disable checkpoints in Hyper-V.

This topic contains the following information about standard checkpoints:

Considerations

Keep the following considerations in mind, especially if you plan to use checkpoints on a virtual machine in a production environment:

  • The presence of a virtual machine checkpoint reduces the disk performance of the virtual machine.

  • We do not recommend using checkpoints on virtual machines that provide time-sensitive services, or when performance or the availability of storage space is critical.

    Important

    Microsoft does not support the use of checkpoints on virtual machines running the Active Directory Domain Services role (also known as “domain controllers”) or the Active Directory Lightweight Directory Services role in Windows Server 2008 or Windows Server 2008 R2. For more information, see Operational Considerations for Virtualized Domain Controllers (https://go.microsoft.com/fwlink/?LinkId=159631).

Checkpoint files

Checkpoint files are stored in several locations:

VM Setting Default location Contents
Checkpoint File Location %systemroot%\ProgramData\Microsoft\Windows\Hyper-V\Snapshots This folder will contain the .xml configuration file for each checkpoint using the checkpoint GUID as the file name.

There will also be sub-folder created using the checkpoint GUID as the name (\Snapshots\GUID).

- If the virtual machine was not running when the checkpoint was created, this folder will be empty.
- If the VM was running or in a saved state, this sub-folder will contain a .bin and a .vsv (virtual machine saved state file).

If the virtual machine has no checkpoints, you can change where these checkpoint files are stored.
The path specified in the VM settings under Virtual Hard Disk > Hard Drive Location: C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\ for Windows Server 2012 R2 and Windows 8.1

or

 C:\ProgramData\Microsoft\Windows\Hyper-V\New Virtual Machine\Virtual Hard Disks for Windows Server 2012 and Windows 8.
This is the path to the folder containing the original .vhdx file and an .avhdx file for each checkpoint. You can specify any location for the .vhdx and the .avhdx files are always created in the same location as their parent .vhdx files.

Warning

  • Do not delete .avhdx files directly. Instead, use Hyper-V Manager to select the virtual machine, and then delete them from the checkpoint tree. You can also use the Windows Powershell cmdlet Remove-VMSnapshot.
  • Do not expand a virtual hard disk when it is used in a virtual machine that has checkpoints. Doing so will make the checkpoints unusable.
  • Checkpoint Process

    Creating a checkpoint

    .

    Deleting a checkpoint

    Applying a checkpoint

    Frequently asked questions

    I’ve taken multiple checkpoints and now my virtual machine pauses automatically. Hyper-V Manager shows the status as ‘paused-critical’. How can I fix this?

    This problem occurs when you have run out of space on the physical storage where the virtual machine snapshot files are stored. Note that this may be on a different drive than where the virtual hard disk is stored.

    To fix the problem, create additional space on the drive by deleting unused data. For example, if you do not need to keep some of the checkpoints, you can delete the checkpoints individually. Make sure to use Hyper-V Manager to delete the checkpoints. Do not delete the .ahvd files directly.

    I’ve tried to delete checkpoints, but they failed to merge because there is not enough space on the disk (error 0x80070070). What can I do?

    If possible, free up storage space on the volume where the .vhdx file is located. If you cannot free up space on the current volume, you can use storage migration to move the storage to a location with more space while the virtual machine is still running. For more information, see Storage migration.

    You can also export the virtual machine to a volume that has sufficient disk space to allow the merge to complete. The process of exporting the virtual machine to delete checkpoints consists of the following steps:

    1. Export the virtual machine to a location that has sufficient storage space. The location should be a different volume on the same host to avoid configuration problems.

    2. Delete the virtual machine from the Hyper-V Management console.

    3. Import the virtual machine using the Register import type. This imports the virtual machine in-place and keeps the same unique ID.

    4. If you want to move the virtual machine back to the original location, free up additional space on the original volume.

    5. Import the virtual machine back to the original location. For this, you can use the Restore import type, which copies the virtual machine files to the default location for the host.

    For more information about exporting and importing virtual machines, see: Export and import VM.

    Should checkpoints be used as a substitute for backups?

    No, because virtual machine checkpoints are not the same as backups created by a Volume Shadow Copy Service (VSS) writer. We do not recommend using virtual machine checkpoints as a permanent data or system recovery solution. A backup solution helps provide protection that is not provided by checkpoints.

    Even though virtual machine checkpoints provide a convenient way to store different points of system state, data, and configuration, there are some inherent risks of unintended data loss if they are not managed appropriately. Checkpoints do not protect against problems that may occur on the host, such as a hardware malfunction on the physical computer or a software-related issue in the management operating system. Also, applications that run in a virtual machine are not aware of the snapshot, and will not be able to adjust appropriately. For example, if you used a virtual machine snapshot to restore an Exchange server, the server would expect the same set of client connections that were present when the snapshot was taken.

    For more information about backing up Hyper-V and its virtual machines, see Back up and restore.

    See also

    Windows Server 2008 R2 Hyper-V Component Architecture (with Service Pack 1)