What You Need to Know About Hyper-V Checkpoints

Virtualization has significantly changed the way businesses conduct their operations and provide services to customers. One of the most significant virtualization technologies is snapshots. This technology has transformed the way data is protected in virtual environments. In this blog post, we will cover the snapshot technology used in Hyper-V and describe how you can manage and configure Hyper-V checkpoints in your virtual environment.

What Is a Hyper-V Checkpoint?

Hyper-V checkpoints allow you to save the VM state at a particular point in time. Checkpoints can be very helpful if you plan to adopt some new changes to the system, such as software updates or a program installation. If an unexpected error occurs, you can revert a VM to a previous state, thus discarding all the changes made.

It is worth noting that the term ‘snapshots’ is currently used only in reference to Hyper-V snapshots created on older Windows operating systems, which were introduced prior to Windows 10.

Types of Hyper-V Checkpoints

Prior to Windows 10, Hyper-V provided only standard checkpoints. Currently, there are two types of Hyper-V checkpoints available:

  • Standard Checkpoints (formerly known as Hyper-V snapshots) take a snapshot of the VM and its memory state, which allows you to capture the VM state at a particular point in time. A standard snapshot doesn’t enable application consistency, which may result in incomplete data transactions. This is crucial for VMs running Active Directory, Microsoft Exchange, SQL Server, or any other application/database which transfers data between different nodes. Also, note that this snapshot type shouldn’t be regarded as a full backup.

Managing Hyper-V Checkpoints

The following excerpt will provide guidance on how you can manage various aspects of Hyper-V checkpoints: from changing the checkpoint type to configuring the checkpoint location.

How to change the checkpoint type

As mentioned above, you can change the checkpoint type through Hyper-V Manager or PowerShell. Both approaches are described below.

Using Hyper-V Manager

  1. Open Hyper-V Manager.

If you have selected Standard checkpoints, you can enable the feature of Automatic checkpoints, which automatically takes checkpoints of VMs when they’re started and deletes them as soon as they are stopped.

Using PowerShell

To change the checkpoint type, run the following commands in PowerShell:

  • To enable the Standard Checkpoint type, insert: Set-VM -Name <vmname> -CheckpointType Standard.

How to create checkpoints

Hyper-V checkpoints can be created using one of two ways: Hyper-V Manager or PowerShell.

Using Hyper-V Manager

  1. Open Hyper-V Manager.

4. The checkpoint is created and can be accessed in the Checkpoints section below.

Using PowerShell

Run the following command to create Hyper-V checkpoints: Checkpoint-VM -Name <VMName>. After the checkpoint has been created, you can see a full list of VM checkpoints by using the command: Get-VMCheckpoint -VMName <VMName>.

How to revert a VM to a previous state using checkpoints

Hyper-V checkpoints are primarily used to revert a VM to its previous state. Use the steps below to apply the checkpoint for this purpose.

Using Hyper-V Manager

  1. Open Hyper-V Manager.

4. After that, a dialog box including the following options will appear:

  • Create Checkpoint and Apply: Before the chosen checkpoint is applied, a new checkpoint of the VM is created. This way the VM is protected, even if this operation fails.

Using PowerShell

To apply the checkpoint via the PowerShell command-line interface (CLI), run the following command: Restore-VMCheckpoint -Name <checkpoint name> -VMName <VMName> -Confirm:$false.

How to delete checkpoints

In Hyper-V, checkpoints are stored as .avhdx files in the same location as the .vhdx files of the VM. As a result of deleting checkpoints, the .avhdx and .vhdx files are merged so as to save space and ensure that no critical data is lost. After that, the checkpoint’s .avhdx file is completely deleted from the file system.

To delete checkpoints using Hyper-V Manager, do the following:

  1. After opening Hyper-V Manager, select the required VM.

If you want to delete a checkpoint tree containing the primary checkpoint and all subsequent checkpoints, right-click the earliest checkpoint that you want to delete and click Delete Checkpoint Subtree.

How to enable or disable checkpoints

Using Hyper-V Manager, you can manually set up whether you want checkpoints to be taken off this VM or not. For this purpose, do the following:

  1. Open Hyper-V Manager, right-click the name of the needed VM, and click Settings.

4. Click Apply.

How to set up a checkpoint location

Hyper-V allows you to configure where the checkpoint configuration and checkpoint saved state files will be stored. To set up a checkpoint location, follow the steps below:

  1. Open Hyper-V Manager, right-click the name of the required VM, and click Settings.

4. Click Apply.

How to rename checkpoints

The standard checkpoint name includes the name of the VM, the date, and the time when the checkpoint was created (e.g. Virtual Machine — (1/5/2019–8:17:35 AM)). To make it more distinguishable, you can rename the selected checkpoint using either Hyper-V Manager or PowerShell.

Using Hyper-V Manager

  1. Open Hyper-V Manager and select the required VM.

Click here to continue reading this article on our website