VMware vCenter Server is an server management solution which provides a centralised platform for controlling vSphere environments.
Snapshots can be used for development and testing purposes. It can be considered as a quick failsafe to be able to rollback before a patch performing tests on certain applications residing on VM.
The major issue is when someone create a snapshot, do the fun and then let the snapshot there. Issue is generated by the fact that that every snapshot created will consume storage disk useless.
To detect orphans snapshots we have 2 possibilities. One of them is to use Veeam One when it exists but there may be a lost of cases when this is not in place.
When it is not in place we need to solve this issue by hand. For this to be solved I’ve developed a super short powershell script to export a list with VMs and snapshot size.
Connect-VIServer -Server <vCenter server> -Protocol https -User <vCenter user> -Password <vCenter password>
Get-VM | Get-Snapshot | select VM, Name, @{Label="Size";Expression={"{0:N2} GB" -f ($_.SizeGB)}}, Created
Output for this script will be like the following one:
VM : <VM Name>
Name : <VM Snapshot name>
Size : <VM Snapshot size in GB>
Created : <VM Snapshot creation date>
Need help managing VMware infrastructure or automating reporting?
→ Learn more about our Infrastructure Services
1 Comment