PowerCLI Script to list VMs not specifically set to Thick Eager Zeroed
- Ben Liebowitz
- 0
- 1985
First, I’ll start with a little back story.
We recently deployed an EMC XTremIO All-Flash storage appliance. The recommendation we got from EMC, for the best deduplication ratios, was to use the Thick-Eager Zeroed disk format. No matter how many times I tell my coworkers to make sure to use this format when deploying VMs to the xTremIO LUNs, once in a while, someone does forgets and deploys a THIN provisioined VM.
Also, we found that when performing P2Vs using the VMware Standalone Converter, when you choose the THICK disk format, it does the P2V and uses the Thick-Lazy Zeroed format.
To prepare for the script, I use folders in the Datastores & Datastore Clusters Inventory View. I have a parent folder for each SAN, and may have sub folders for datastores dedicated to certain functions, say Microsoft Exchange, etc. I also put all the LOCAL drives into a folder as well.
You could very easily modify the script below to modify the script to show anything not THIN provisioned by changing “EagerZeroedThick” to “Thin”.
Here is the script:
——————————
Connect-viserver VCENTER_NAME get-folder -name SAN_NAME | Get-VM | Get-HardDisk | where {$_.StorageFormat -ne "EagerZeroedThick"} | select Parent,StorageFormat,Filename | export-csv c:\VMware\diskformat.csv -notypeinformation -useculture