Thursday, November 08, 2012

VMWare ESXi 4.1 - How to List All VMs with a Snapshot

It took me a while to figure out that there was a way in VMWare to list all of the virtual machine guests with a snapshot, so I'm posting this in the hope that it may help others as well. :)

In our environment (ESXi 4.1) we use snapshots as part of our automated backup process, and occasionally they get orphaned and grow out of control.  So it's important to have a way to list all of them at once in case they need to be deleted.

In VSphere make sure you have the storage plug-in enabled.
 







Select your datacenter on the left drop down menu, and then on the right select "Storage views".

 
You can see which VMs have snapshots based on their higher disk usage.  In the example above they are highlighted in yellow.

You can only use storage views for the particular vcenter site that you are logged into.  If you have additional sites, you will need to log into those sites to view their snapshots.

Also remember that snapshots my be used by third party products (such as Veeam or Comvault), Make sure that if you delete a snapshot, it isn't in use by your backup process. :)

2 comments:

Mike Hunacek said...

Have you used the vSphere PowerCLI? You might be able to get the same results with this powershell: get-vm |get-snapshot | select VM,Name,SizeMB,Created

Kevin Jackson said...

I haven't used PowerCLI, I'll have to try it out!