--- title: "Create eager zero hard disks from PowerCLI (PowerShell)" date: "2012-01-29" redirect_from: "/post/16690892045/create-eager-zero-hard-disks-from-powercli-powershell" categories: - "Eager zero disk" - "Eagerly scrub disk" - "VMware ESXi" - "VMware ESX" - "PowerCLI" - "PowerShell" - "VMFS3" ---
Microsoft PowerShell 2.0, VMware PowerCLI <IP_ADDRESS>01, 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:
https://github.com/ryanchapman/vmware_scripts
git clone git@github.com: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


A 3-Metre Wide Sinkhole Opened Up In KL And Nearly Swallowed A Myvi
The incident took place on Jalan Maharajalela at 11.35pm yesterday, 24 November.
by Yap Wan XiangCover image via Info Roadblock JPJ-POLIS/Facebook China Press
A Perodua Myvi fell into a sinkhole along Jalan Maharajalela, Kuala Lumpur last night, 24 November
According to New Straits Times, the incident happened at 11.35pm and the driver has been identified as a 42-year-old woman.
She was driving along Jalan Maharajalela heading towards Jalan Loke Yew near Viva Home, before suddenly falling into a sinkhole, measuring about three square metres wide.
The Myvi fell head-first into the sinkhole, with only one of its back tyres gripping onto the edge of the road
The driver is reportedly unharmed from the incident
Kuala Lumpur Traffic Investigation and Enforcement Chief Assistant Commissioner Zulkefly Yahya said the case is being investigated under Rule 10 LN166/59 of the Road Traffic Rules 1959, reported Sinar Harian.
Photos and videos of the incident have since gone viral on Facebook
A post uploaded by Info Roadblock JPJ/POLIS has garnered over 1,100 shares and 6,000 reactions in less than a day.
A 38-second video showed a crane was used to pull the Myvi out of the sinkhole.
The Myvi suffered some damage on the front bumper and the skirts.
Kuala Lumpur City Hall (DBKL) has since initiated repair works on the road
China Press reported that DBKL workers have covered up the sinkhole as of 7.15am this morning, 25 November.
However, two lanes are still blocked as the recovery works continue.


\pageref{key}
The \pageref command produces the page number of the place in the text where the corresponding \label command appears.
The \pageref command is fragile.
See also: Cross References Return to LaTeX Table of Contents


--- category: 'graphics' sortorder: 90 ---
Load shaders from file, used when drawing primitives. A shader program is a combination of vertex/geometry/fragment-shaders. When creating the shader program, a path to the shaders are specified. The following files are expected to be in that path: vertex.glsl, fragment.glsl. The file geometry.glsl will also be loaded if it exists. Writing shader-code is nothing specific for Gameplay, for a more general understanding of GLSL (OpenGL Shading Language), visit https://open.gl
// var window = new Window(...) var program = new ShaderProgram(window.graphics, 'path/to/shaders'); // Use the shader program. window.graphics.setShaderProgram(program);
A uniform is a global GLSL variable that act as a parameter that the user of a shader program can pass to that program. For example, a shader has the uniforms defined below.
uniform vec2 position; uniform vec3 direction; uniform vec4 color; uniform mat4 projection; uniform float time; uniform int visible;
Uniform values can be set using the code below. The following types of uniforms can be set on a shader program: int, float, vec2, vec3, vec4, mat4. All values (except int and float) are set using the type Float32Array.
// var program = new ShaderProgram(...) program['position'] = new Float32Array(2); program['direction'] = new Float32Array(3); program['color'] = new Float32Array(4); program['projection'] = new Float32Array(16); program['time'] = 0.167; program['visible'] = 1;


- New: Fullscreen mode with controller support
- New: Counting game session play time
- New: Support for scripting (PowerShell and IronPython)
- New: Support for compiled plugins (.NET)
- New: Additional fields for game details
- New: Ability to set completion status
- New: Save state of collapsed groups
- New: Games can be imported via by dropping executables (and folders) to Playnite window
- New: Using screenshots instead of store background for Steam games
- New: Script for exporting library to a csv or formatted txt file
- New: Scanning for emulated and installed games can be canceled
- New: Added review score game fields
- New: PCem emulator profile
- New: Vita3K emlator profile
- New: Option to download metadata only for games missing them
- New: Offer application restart when settings are changed
- New: Last played time displayed the same way as in Steam client
- New: Initial scan for installed games is not done by default anymore when importing installed programs
- New: Improvements to cover view (Classic theme)
- New: Change default installation location to %localappdata%
- New: Favorite and Hidden fields selectable from game editing window
- New: Critic and community score metadata download
- New: Cache Steam metadata for faster downloads
- New: Automatically assign PC platform when importing custom games
- New: Force HTTPS for BattleNet login window and Steam private account URLs
- Fix: GPU acceleration is disabled by default
- Fix: French translation fixes
- Fix: Portable version crashes when it tries to access the games.db
- Fix: Sorting icons not visible on grid view
- Fix: Selecting multiple games results in wrong list scrolling
- Fix: Problem with shortcuts names and special characters
- Fix: Possible crash due to corrupted Steam files
- Fix: Playnite window is not maximized when opened from the taskbar
- Fix: Playnite crashes when trying to remove emulated "Play" action
- Fix: Other actions for Steam games are not imported correctly
- Fix: Freezing and OutOfMemory crash when putting many games into a category
- Fix: Crash when opening link without http
- Fix: Context menu not updating properly when game properties change