Removing the old snapshots of the Virtual Machine is one of the easiest ways that a virtualization administrator can reclaim storage capacity in their environment.
Unlike reclaiming other resources like CPU or Memory, deleting old snapshots doesn’t require downtime. Now, many of us are guilty of having snapshots that are months old, and sometimes for reasons, we can’t even remember. But unless you have a tool like vRealize Operations Manager, finding and deleting old snapshots can be a lengthy manual process.
There are multiple ways to find the old/stale VM snapshots, you can leverage some smart tools like RVTools to get the snapshots and creation date
or you can write a small PowerCLI script to quickly check and delete the snapshots of the Virtual Machine in the vSphere environment
Get-VM will list all the VMs, you can use regex filter in the Name option
Get-VM -Name asvignesh-*
You can get the snapshots of the VMs using
Get-VM | Get-Snapshot
To get and delete all the snapshots you can use
Get-VM -Name asvignesh-* | get-snapshot | remove-Snapshot
Also published on Medium.
Passionate Developer with 7 years of extensive experience working for Data center related products. Contributed and lead the efforts in Solutioning and engineering in Nimesa Technologies for developing Dataprotection and Copy data management product for Private and Public Clouds
This is my personal weblog, opinions expressed here represent my own and not those of my employer.
All content provided on this blog is for informational purposes only and i will not be liable for any errors, losses, or damages from the display or use of this information.