Hi World,
I'd like to be able to run daily snapshots against the below VMs which vary in name, but would like script to first determine whether there is sufficient space on intended datastores before executing command? All VMs are in the same vCenter Server and datastores will be a min of x2 1TB (although VMs are across different Datastore Clusters).
Example:
get-vm VM1,VM2,VM3 | new-snapshot -Name "10/01/17" -Description "Daily Backup" –RunAsync
Any help would be kindly appreciated?
To confirm, your VMs are spread over multiple datastores?
And you want to verify for each of the used datastores if the space is available?
And what exactly do you mean with sufficient space?
A snapshot's delta file can grow over time, do you want to verify if the maximum space (size of the original VMDK file(s)) is available?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
Yep VMs are spread over various Datastore Clusters and I'd like a threshold of 20% available space on datastore in order to initiate snapshot per VM.
As above is a work around, the idea is that designated person will be maintaining some housekeeping in as much as they'll be no more than two snapshots per VM (two days worth!)
I'd like to verify the maximum space of the latest snapshot available?