Microsoft PowerShell 2.0, VMware PowerCLI 188.8.131.5201, VMware ESXi 4.1.0
New-EagerZeroHardDisk is a PowerShell function I wrote to create hard disks that are eagerly scrubbed, meaning that ESX will create the hard disk in Thick format and then write zeroes to the disk. The ESX SDK refers to this as eagerlyScrub, while other documents refer to the process as eagerzero.
Zeroing disks at creation time should create a vmdk in a contiguous region on the physical hard disks, preventing fragmentation and seek times versus a hard disk that is thin.
I say should, but I'm not sure if this is true. If you have knowledge on this, please leave a message in the comments. Update: according to a presentation given by Eric Sloof and Mattias Sundling on ntpro.nl, eager zeroed disks have (slides 41-43) 651% faster throughput and 4.5x faster seeks than lazy zeroed disks. Compared to thin provisioned disks, eagered zero disks have 632% faster throughput and 4.8x faster seeks.
The function is available on github:
git clone [email protected]:ryanchapman/vmware_scripts.git
Once you clone the git repository, source the script in PowerShell with:
PS C:\TEMP\vmware_scripts> . .\New-EagerZeroDisk.ps1
Documentation on the function can be had by using the help command:
PS C:\TEMP\vmware_scripts> help New-EagerZeroHardDisk -Full