Removing Backup Checkpoint in Hyper-V That Has No Delete Option
Hyper-V doesn’t require much maintenance, but once in a while you may see a checkpoint (formerly called snapshot) attached to a virtual machine (VM) that cannot be deleted because the option to delete is unavailable. I have encountered this on Hyper-V running on a Windows Server 2012 R2 Datacenter. One day something went wrong with the server backup and I noticed a checkpoint that I did not create. The checkpoint was called ServerName – Backup, where ServerName was the name of the VM. I wanted to export the VM and didn’t want to have any checkpoints in the backup. I already had a backup of the VM and everything was working fine so I didn’t really care about the backup that system created. When I right-clicked the checkpoint to delete it, I noticed that the option Delete Checkpoint was not available. Here’s what I saw.
Notice that the options to Delete Checkpoint and Delete Checkpoint Subtree are missing in the above screenshot. Here’s what the options are for a standard checkpoint.
If you have run into a similar situation and are trying to delete a checkpoint that can’t be deleted, you can use the PowerShell script to get rid of unwanted checkpoints. This applies to any checkpoint that you want to delete.
PowerShell Script to Delete a Checkpoint
To delete a checkpoint in Hyper-V, use the following instructions. The script should work on Hyper-V installed on any operating system, e.g. Windows Server 2008, Windows Server 2012, Windows Server 2016, Windows 10, etc.
- Start PowerShell on the computer where the virtual machine is located. I prefer to use PowerShell ISE.
- Type the following command and press Enter. As I mentioned, the checkpoint used to be called snapshot in Hyper-V before Microsoft changed its name.
Get-VMSnapshot -ComputerName Name-of-Computer -VMName Name-of-VM | Remove-VMSnapshot
The vertical bar is the pipe symbol above the Enter key on a standard keyboard. If your computer is called SERVER1 and the name of the virtual machine is SQLServer, you will use the following command.
Get-VMSnapshot -ComputerName “SERVER1” -VMName “SQLServer” | Remove-VMSnapshot
- As soon as the checkpoint is deleted, Hyper-V will start the merge process in Hyper-V Manager. Depending on the size of the virtual hard disk, the merge process may take some time so be patient.
- If you need to export the virtual machine, you will be able to proceed once the merge is complete.
Copyright © 2017 SeattlePro Enterprises, LLC. All rights reserved.