Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 247646

Remove Snapshots Older than 7 Days

$
0
0

Within my organisation we have a policy that snapshots can only be kept for 7 days before they need to be removed, with only a few VM's with special circumstances (View Enviroment).

 

In order to automate this I used some snippets from a script that LucD provided, with a little bit of reporting on the end.

 

The Report comes out as a HTML formatted email with the following layout

 

VM

DataCentre

SnapName

OldSnap

SnapsIgnored

DataStoreFreeSpace

DataStoreFreePercent

VMHost





 

There is also the option to "Ignore Snaps" by adding a ignore.snaps attribute to the vmx file. It also does a little bit of checking to ensure there is sufficent free space, and overhead for the snaps to be removed. This has been tested in our enviroment, but with our Storage DRS Affinity rules, all the VMDK's for a VM reside on the same Datastore. THIS HAS NOT BEEN TESTED WITH VM's THAT SPAN MULTIPLE DATASTORES

 

I hope this is of some use to other users. Feel free to add/modify/change/comment

 

Cheers


Viewing all articles
Browse latest Browse all 247646

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>