Work with Hyper-V checkpoint: Overview
You may have heard of well-known virtual machine snapshots ever since you started to realize the virtualization world. In Hyper-V environment, they are called checkpoints.
Just like VMware snapshots, Hyper-V checkpoint is also a convenient quick roll-back failsafe measure. But they can also be dangerous if you didn’t work with them improperly.
You may have created checkpoints for your Hyper-V virtual machine, if the guest fails, you will then need to restore from it. Do you know how to restore checkpoint in Hyper-V properly? Do you know other ways to do that?
In this article, I will introduce 2 easy ways for Hyper-V restore checkpoint. Before you start, here are some basic knowledge that you may need to use Hyper-V checkpoint properly.
Hyper-V checkpoint basic knowledge
Hyper-V checkpoint allows you to capture the current state and data of a virtual machine before performing operations. If problems arise, you can use it to roll back the VM to the state when the checkpoint was created. Hyper-V checkpoint was renamed from snapshot since Windows Server 2012 R2.
When a checkpoint is created, it will be added to the checkpoint tree. Each subsequent checkpoint is a branch of the previous one, incrementally storing the differences since the last checkpoint was created.
Using Hyper-V Manager you can create up to 50 checkpoints for a single virtual machine, and up to 64 checkpoints using System Center Virtual Machine Manager.
The 2 different types of Hyper-V checkpoint
There are 2 types of Hyper-V checkpoint:
- Standard checkpoints: take snapshots of the virtual machine and its memory state, but can cause data consistency issues with systems that replicate data between different nodes, such as Active Directory.
- Production checkpoints: use Volume Shadow Copy Service or File System Freeze to create data-consistent backups of the virtual machine, but do not take snapshots of the virtual machine's memory state.
Production checkpoint is selected by default, you can change it using Hyper-V Manager or Powershell. To learn how you can refer to this article: Choose between standard or production checkpoints in Hyper-V
Hyper-V checkpoint vs. snapshot vs. backup
Checkpoint = snapshot ≠ backup
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.
Hyper-V checkpoint vs backup is basically equals VM snapshot vs backup. Creating a Hyper-V checkpoint, what you are really creating is actually a differencing disk that depends on the parent disk, instead of a full copy of the VM. After that, the original virtual disk of the VM will become read-only, and all changes you make to this VM will be directed to the newly created differential disk.
If the parent disk is deleted or the infrastructure is corrupted, the checkpoint is not enough to restore the VM. If you deleted any file of the previous checkpoints, you may even break your VM. But a VM backup is a full copy that is not depend on the parent disk. It will not be affected, and can be safely stored offsite.
And if you create more Hyper-V checkpoints, or store them for more than a couple days, the accumulated data will consume storage space and VM performance. Therefore, it is not recommended that you keep checkpoints for a long time, please remember to delete the checkpoint to merge its differencing disk with the original virtual disk.
Protect your VM with automatic and free backups
Compared with VM snapshots, VM backups are complete, independent, and do not degrade VM performance. You can try free Hyper-V backup software AOMEI Cyber Backup to create automatic regular backup schedule of multiple Hyper-V VMs. More »
2 easy ways for Hyper-V restore checkpoint
Using Hyper-V checkpoints, you can quickly restore a VM to the state when the checkpoint was created. However, this is completely different from restoring a VM from a backup. You are just deleting the differential disk, discarding all changes made since the checkpoint was created, and bring the VM's original disk back to read-write state.
In this section, I will describe how to use Hyper-V checkpoint to safely and simply restore a VM. Before this, make sure you have created one, you can refer to the supplementary part in backup Hyper-V VM.
Using Hyper-V Manager to Restore checkpoints
1. Launch Hyper-V Manager, and select the VM you want to restore.
2. Check the created checkpoints of this VM in Checkpoints section below. Right-click the checkpoint you want to use and select Apply.
3. In the pop-up window, there are 3 options you can choose:
- Create Checkpoint and Apply: Create a new checkpoint to save the current state before apply this checkpoint. Then you can undo the application of this checkpoint if the operation fails.
- Apply: Directly apply this checkpoint to revert the VM to the previous state. You cannot undo this action.
- Cancel: Close the dialog box without doing anything.
- Please don’t ask me again: It is not recommended to check this option, because you don’t know which option will be chosen by default. If it’s Apply, it may cause you irreparable data loss.
Note: Right-click the VM and select Revert will directly apply the last checkpoint, and irrevocably discard all the changes made after that checkpoint. Please don’t select this option unless you are prepared.
Hyper-V restore checkpoint via PowerShell
You can also use Powershell to apply the Hyper-V checkpoints, by running the following commands:
Restore-VMCheckpoint -Name checkpoint name> -VMName VMName> -Confirm:$false
Note: You can run the following commands to check the checkpoints list of your VM:
Get-VMCheckpoint -VMName VMName>
Hyper-V checkpoint is renamed from snapshot, and cannot be used as backups. In this article I introduced Hyper-V checkpoint with its 2 different types, and shared 2 simple ways to properly restore Hyper-V checkpoint.
Based on its mechanism, restoring Hyper-V checkpoint is completely different from restoring backups. Incorrectly using them may even lead to disastrous data and financial losses.
Therefore, follow the 3-2-1 backup rule to create and keep independent backups for your VMs is still essential. Being experts in VM backups, professional backup tools may help you better by meeting your multiple needs. I recommended you AOMEI Cyber Backup.