Recently I experienced a strange issue regarding snapshots in Hyper-V. I had to remove a snapshot (Checkpoint) of a particular VM, but I could not find the delete option. In this guide, you can find out how to delete snapshots in Hyper-V when the delete option is unavailable in GUI.
I’m sure this checkpoint was created by the third-party backup tool. Usually, it should have been deleted by the same VM backup tool once the backup is succeeded. Even if it misses the first attempt, it should happen in the next run. But, in this case, the checkpoint was there.
Somehow I needed to remove it because it prevented me from modifying any settings of the particular VM configurations. For example, when there is a checkpoint, we can’t edit most settings, such as adding a new hard disk or extending the space of the existing disk.
How to Delete Hyper-V Checkpoint When the Delete Option is Not Available
Here are the major steps you need to try. One method will surely work to delete the snapshot/checkpoint in Hyper-V that doesn’t have the option in the menu.
- Refresh the Hyper-V host from the manager – it could bring back the delete option in the menu.
- Close the Hyper-V manager and open it again.
- Select the snapshot/checkpoint and press the Delete key on the keyboard.
- Execute the delete command by PowerShell
Let’s see the details instructions below:
Difference in GUI
Usually, the delete option should appear as below. That is the usual way to delete a snapshot.
Here is the screenshot of when the delete option is unavailable to remove a checkpoint in Hyper-V.
My Hyper-V setup runs with five node Windows 2012 R2 data centre cluster.
What to Do when Checkpoint Delete Option is Not Available
If you experience this issue, it can be fixed in several ways. Try the below steps first.
1) In Hyper-V manager, select the host server and refresh. It may restore the server connection and any missing options.
2) Close the Hyper-V manager console, wait and reopen again. This is basically to reset/refresh the connection.
3) If none of the above steps brings back the delete option in GUI, select the checkpoint and press the Delete key on the keyboard. It doesn’t matter whether you see the delete option or not, press the delete key.
You will get the confirmation dialogue box below if the command passes successfully.
Press Yes to delete the snapshot. That is how I fixed this issue.
Try PowerShell to Delete Checkpoints in Hyper-V
If the above GUI steps do not work, we have the final and reliable option with Powershell.
In a cluster environment with administrative privilege, you can run the below Powershell command from any server.
We need to identify the owner of the VM while executing the command. Since we call the owner node with the -ComputerName key, it should work from any server.
Get-VMSnapshot -ComputerName <Name-of-Computer> -VMName <Name-of-VM> | Remove-VMSnapshot
Before executing the delete command, you can view the snapshots of a particular VM by the below command.
Get-VMSnapshot -ComputerName <Name-of-Computer> -VMName <Name-of-VM>
In this example, hvsrv3 is the Hyper-V host of the VM, which has a snapshot that I want to delete.
Now execute the remove command as below.
Remember, we have not mentioned the snapshot name in any commands. We called the VM and Hyper-V server name only.
You can try a similar command from the virtual machine’s host; in that case, we do not need to mention the server name.
Get-VMSnapshot -VMName “sql2012srv” | Remove-VMSnapshot
Once the command succeeded in GUI or Powershell, you can see the merge progress for the particular VM.
Depending on the snapshot size and how busy is your Hyper-V host, it may take some time to merge with the original virtual hard disk.
Now you should be able to modify the virtual machine configuration, or any other settings stopped due to the existence of a checkpoint that doesn’t have the delete option in Hyper-V.