Delete Orphan Snapshots in AHV

Recently I was onsite running some NCC checks and there was a lot of stale snapshots hanging around where the VM had just been deleted and the snaps where left behind consuming space and giving lots of errors in NCC.

After checking the KB3752 – I was able to run the following command :

ncc health_checks hyper visor_checks orphan_vm_snapshot_checks

Orphan_snaps002

Which gave me a list of all the orphan checks.

Orphan_snaps001

We need to get the GUID of the VM using the following command :

acli snapshot.get “GUID” of the snapshot so you can get the GUID of the VM

Orphan_snaps004

We can then check each of the GUID’s to be sure that the VM has been deleted and it’s safe to delete the snapshot.

Using the following command :

acli vm.get “GUID of VM”

Orphan_snaps003

You can see the VM is not found sp you have proven the VM has been deleted.

Now the snap can be deleted using

acli snapshot.delete “GUID of Snap”

Orphan_snaps005

Then repeat the process to delete all remaining orphan snaps.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s