ESXi system disks do not require a lot of storage space on their boot media. That’s the reason why many installations use small and less expensive flash media instead of disks (and SCSI controller). It can be USB flash media for example or a SD-card.
The quality and reliability of these media varies. Even from batch to batch of the same type and the same vendor. Heavy write activity, but also heavy reading may significantly shorten the lifespan of flash media. In recent times we had to witness media that failed after less than a year in service. As long as the host keeps running this isn’t a bigger problem, because all crucial components are kept in ESXi host RAM. With VMtools-Image the situation is different. Each time a VM requests access to the image it will be read from flash. Especially VDI environments have a high read rate onto VMtools-Image, which may ‘burn’ the media.
VMware is aware of the problem and has introduced a migitation of the issue starting with ESXi 6.0 U3. It is not active by default and has to be activated manually. The migitation is fairly simple. During host boot VMtools-Image will be mapped into RAMDisk. Read access will be served from RAM and the lifetime of the media will be extended.
I will show here how to activate the option with web-client, PowerCLI or ESXi shell.
PowerCLI
Connect-VIServer <myVC>
Get Settings
Get-VMHost | Get-AdvancedSetting -Name UserVars.ToolsRamdisk | Select Entity, Name, Value
A value of 0 indicates that VMtools image is not mapped into RAMDisk.
Set Value
To set the value on a distinct host:
Get-VMHost esx1.mydomain.local | Get-AdvancedSetting -Name UserVars.ToolsRamdisk | Set-AdvancedSetting -Value 1 -Confirm:$false
To set the value on all hosts (careful !) use this command:
Get-VMHost | Get-AdvancedSetting -Name UserVars.ToolsRamdisk | Set-AdvancedSetting -Value 1 -Confirm:$false
To activate the setting, the host needs to reboot.
ESXCLI
You can change settings on the shell too. Connect with SSH client to the host or login to DCUI.
esxcli system settings advanced set -o /UserVars/ToolsRamdisk -i 1
This method also requires a host reboot.
A slight disadvantage of this method compared to PowerCLI is that you’ll have to enable the SSH service on the host first before you can connect a SSH client to it.
Web-Client
That’s the method of choice for all of you who don’t like working on command shells. Go to Hosts and Clusters -> Manage -> Settings -> Advanced System Settings.
Filter results for “ramdisk”.
A zero value means the setting is disabled. Change the value to 1 in order to activate the setting.
Links
KB 2149257 – High frequency of read operations on VMware Tools image may cause SD card corruption