If you installed VMware ESXi on a USB stick like I did, the “scratch space” (used for storing logs and debug information) is stored on a RAM disk. This takes up 512MB of memory that could otherwise be provisioned to virtual machines. In addition, it does not persist across reboots, which explains why I was never able to find any logs after a crash. Also I was seeing random “No space left on device” errors when I was trying to run the munin monitoring script for ESXi.
The solution to this is to simply create a folder on a disk, and configure ESXi to use it.
- Login to the console or SSH to the host.
- Go into one of your datastores in /vmfs/volumes/
- Create a directory for the scratch space.
- Login to the vSphere Client.
- In the Host device, go to the Configuration tab, then find the Software category on the left menu and click Advanced Settings
- In the Configuration parameters window, find ScratchConfig on the left.
- For the “ScratchConfig.ConfiguredScratchLocation” box, enter the path to the folder you created in step 3.
- Reboot the host.
It’s as simple as that!
- VMware KB: Creating a persistent scratch location for ESXi 4.x and 5.x
- ESX Virtualization: ESXi scratch partition – how to enable and why?