HyperV snapshot cannot be removed

By steve, 24 May, 2017

Today I came across a HyperV VM where new snapshots were not being shown in SCVMM. I then checked the HyperV console which showed all the new snapshots, but there was one in the chain that had the text "- backup -" in the checkpoint name, which could not be deleted from the HyperV GUI either (the delete checkpoint option was not in the menu).

The fix was to use powershell on the HyperV host to list the checkpoints for the affected VMs, and the undeletable checkpoint was listed as a "Recovery" checkpoint. These are created by backups, so before deleting you need to be sure that they are not being actively used by a backup process, but you can follow the powershell steps shown below:

The steps are to list all snapshots for the affected VM, then pipe the Recovery snapshot to the Remove-VMSnapshot command.

PS C:\Windows\system32> Get-VMSnapshot -VMName _VMName_

VMName     Name                                             SnapshotType CreationTime          ParentSnapshotName
------     ----                                             ------------ ------------          ------------------
_VMName_ Checkpoint 1 Name                                Standard     4/04/2017 1:45:54 PM                       
_VMName_ Checkpoint 2 Name                                Standard     4/04/2017 1:45:55 PM  Checkpoint 1 Name
_VMName_ Checkpoint 3 Name                                Recovery     4/04/2017 1:45:55 PM  Checkpoint 2 Name
_VMName_ Checkpoint 4 Name                                Standard     23/05/2017 4:24:18 PM Checkpoint 3 Name
_VMName_ Checkpoint 5 Name                                Standard     23/05/2017 4:25:59 PM Checkpoint 4 Name
_VMName_ Checkpoint 6 Name                                Standard     23/05/2017 8:32:08 PM Checkpoint 5 Name
_VMName_ Checkpoint 7 Name                                Standard     23/05/2017 8:33:51 PM Checkpoint 6 Name
_VMName_ Checkpoint 8 Name                                Standard     23/05/2017 8:43:37 PM Checkpoint 7 Name
_VMName_ Checkpoint 9 Name                                Standard     23/05/2017 9:38:07 PM Checkpoint 8 Name
_VMName_ Checkpoint 10 Name                               Standard     23/05/2017 9:45:40 PM Checkpoint 9 Name

PS C:\Windows\system32> $s=Get-VMSnapshot -VMName _VMName_
PS C:\Windows\system32> $s[2]
VMName     Name                                             SnapshotType CreationTime         ParentSnapshotName
------     ----                                             ------------ ------------         ------------------
_VMName_ Checkpoint 3 Name                                Recovery     4/04/2017 1:45:55 PM  Checkpoint 2 Name

PS C:\Windows\system32> $s[2] | Remove-VMSnapshot

Comments