The reason to delete Hyper-V checkpoints created either automatically by schedule or manually on demand may be different. The careful and attentive management of Hyper-V checkpoints enables you to optimize the use of storage space and, consequently, improve the IT infrastructure’s cost-efficiency. Plus, you might need to do a cleanup after a checkpoint fails.
This post will remind you what a Hyper-V checkpoint is and explain why it’s not recommended to use checkpoints as backups. Then, we will show how to delete a Hyper-V checkpoint when you need that.
Table of Contents
What is a Hyper-V Checkpoint?
Checkpoints are point-in-time copies of virtual machines. A checkpoint represents a “frozen” state of a virtual machine (VM), including the apps, objects, and other data. Whenever necessary, you can roll back a VM to the state of the saved checkpoint, canceling the changes done after the checkpoint was saved. If you’re new to virtualization, you can think of Hyper-V checkpoints similar to system restore points in any Windows OS. Also, a checkpoint in Microsoft Hyper-V is the same as a snapshot in VMware virtualization software.
How Hyper-V Checkpoints Are Used
Whenever necessary, you can roll back a VM to the state of the saved Hyper-V checkpoint. It enables you to restore the VM’s data after, for example, a failed OS or software update. You can also use that VM as a sandbox test environment with the known conditions.
Whenever you install an update for an application or an OS, an updated version is probably not working correctly. To avoid possible issues in the organization’s production environment, run a test VM, and set a checkpoint with the default conditions close to your central server VMs. Then, install updates on a test VM before applying the same changes to the production infrastructure.
If a failure occurs to the test VM after the update, you have the space to investigate the reason for an issue. After the cause is found, you can roll back the state of a VM to the known Hyper-V checkpoint, tweak the test environment and try installing the update again. This procedure can be repeated as often as required to get a VM to a stable working condition with the necessary updates installed. At the same time, your production machines continue working correctly. Install an update to production when you’re sure it won’t render the IT environment inoperable.
Can I Use Hyper-V Automatic Checkpoints as Backups?
Some users treat Hyper-V checkpoints as backups because of their ability to “remember” the state of a VM and to roll back to the saved VM configuration at any moment. Users think that snapshots are enough to keep their VM data; however, considering a Hyper-V checkpoint as a backup is incorrect.
Hyper-V checkpoints can help you restore the VM functionality and data after the internal software or guest OS failure, and nothing more. A checkpoint won’t be effective when a loss affects, for example, a VM’s virtual disk, hypervisor, partitions, physical disks, or other hardware. And here’s why:
- Every VM checkpoint relies on the structure of virtual disks to function correctly. It means that any disruption happening above the level of a VM renders all of that VM’s checkpoints unusable. On the contrary, a real backup does not rely on virtual disks or production environments, nor does a data backup affect VM performance while stored.
- Unlike backups, checkpoints can slow down the entire Hyper-V host. The longer your Hyper-V checkpoints live, the more storage space they consume. The overload of checkpoints can cause storage overflow and result in global disruptions. Backup data can be deduplicated and compressed to minimize storage space consumption.
- How many checkpoints can be created for a single VM? The maximum number of checkpoints for one Hyper-V VM is only 50. Even if you try using them as backups, you might want more flexibility for different disaster cases and recovery purposes.
You need a specialized solution and strategy to protect your Microsoft Hyper-V VM data reliably. For example, consider using the NAKIVO’s Hyper-V backup solution, which can help you automate and orchestrate data backup and recovery processes efficiently.
Why Delete a Hyper-V Checkpoint
Hyper-V admins rarely need to keep dozens of checkpoints. Regarding the use of checkpoints for testing, acceptance, or development purposes but not on production infrastructures, two to four checkpoints per VM are enough.
- With two close Hyper-V checkpoints available, you have a reserve VM state for a rollback if the latest checkpoint fails.
- One or two additional checkpoints can be used for more testing or development flexibility while consuming adequate storage space.
By removing Hyper-V checkpoints, you can get more free space on your host storage. If you are using specialized multifunctional backup software, your checkpoint storing policies can be adjusted to save storage space and performance. After the VM data has been backed up, you can directly restore a full VM or individual files from an appropriate backup.
How to Delete a Hyper-V Checkpoint
In Hyper-V, .avhdx files are checkpoint storages. You can find those storage files and the .vhdx virtual machine files in one location. Whenever a checkpoint is deleted, Hyper-V merges the .vhdx and .avhdx files. Therefore, deleting a checkpoint correctly does not lead to data loss. When the Hyper-V checkpoint merge procedure is finished, the .avhdx file is removed from the disk.
Note: do not delete an .avhdx file directly. Otherwise, you can cause a checkpoint tree failure.
To delete a Hyper-V checkpoint:
- Open the Hyper-V Manager.
- Choose the virtual machine you need to delete a checkpoint for.
- Find the Checkpoints tab.
- Right-click the required checkpoint and hit Delete Checkpoint.
- If asked about the action confirmation, ensure the checkpoint is correct and hit Delete once again.
Tip: If you need to delete all subsequent checkpoints, right-click the earliest checkpoint that should be deleted, and hit Delete Checkpoint Subtree.
How to clean up when a Hyper-V checkpoint operation failed
After a failed checkpoint operation, use the PowerShell to delete the backup checkpoint:
- Open the Windows PowerShell ISE as administrator.
- Get the recovery checkpoint exact name with the command Get-VMSnapshot. Provide the VMName when prompted.
- Run the command Get-VM -Name <VMName> | Get-VMSnapShot -Name <CheckpointName> | Remove-VMSnapshot.
- Verify that the recovery checkpoint is successfully deleted with the command Get-VMSnapshot.
Conclusion
A Hyper-V checkpoint is a point-in-time copy of a VM. Checkpoints are comfortable rollback instruments to use for testing, development or acceptance purposes. At the same time, checkpoints rely on virtual disks to function properly and should not be used as backups. Any disruption happening above the level of a VM means checkpoints are unusable and cannot prevent data loss. To guarantee data and infrastructure resilience, your best choice is a specialized backup software solution, such as NAKIVO Backup & Replication.
Proper management and timely deletion of Hyper-V checkpoints enable you to save storage space and, therefore, improve the cost efficiency of your IT environment. Correct deletion is required to keep checkpoint trees operable. You can delete checkpoints with the Hyper-V Manager for properly functioning checkpoints, or with the Windows PowerShell ISE when checkpoint operations fail.