Prevent corruption of the ESXi bootable SD card

In vSphere ESXi 6.0 U3 an optimization is added to reduce the wear on the bootable SD card. Without this optimization high read load of VMware Tools ISO images might cause corruption of the flash media. You can copy all the VMware Tools data into its own ramdisk. As a result, the data can be read from the flash media only once per boot.

To activate this feature the following advanced settings must be changed on each ESXi host:

  • Set the advanced ToolsRamdisk option to 1 by using this command:
    esxcli system settings advanced set -o /UserVars/ToolsRamdisk -i 1 
  • After changing the setting reboot the host.

I created a simple PowerCLI script that sets the advanced setting `toolsRamdisk` value to ‘1’ on all the ESXi hosts.

<# Author : Ivo Beerens Blog : Twitter : @ibeerens Pre-requisite : ESXi 6.0 U3 Set : Set UserVars.ToolsRamdisk to the value 1 #>

Get-Module -ListAvailable VMware* | Import-Module
    Foreach ($vmhost in Get-VMHost | where {$_.ConnectionState -eq "Connected"}) {
        Write-Host "Host: $($" -ForegroundColor Green
        Get-AdvancedSetting -Entity $vmhost -Name UserVars.ToolsRamdisk | Set-AdvancedSetting -Value ‘1’ -Confirm:$false

After running this script all the ESXi hosts must be rebooted.
More information: VMware KB: High frequency of read operations on VMware Tools image may cause SD card corruption (2149257), Link

Leave a Comment