Creating a persistent scratch location for ESXi

Why we need a persistent scratch location in ESXi host:
Sometimes scanning the ESXi host using Update Manager fails with General System Error and also can’t install HA agent on affected ESXi hosts. In few cases we got custom requirements to manually create a folder and assign to a persistent scratch location for ESXi hosts.
Purpose:
VMware recommends that ESXi has a persistent scratch location available for storing temporary data including logs, diagnostic information, and system swap. Persistent scratch space may be provisioned on a FAT 16, VMFS, or NFS partition accessible by the ESXi host.
Note:
Scratch space is configured automatically during installation or first boot of an ESXi host, and is not required to be manually configured. ESXi install-able creates a 4 GB Fat16 partition on the target device during installation if there is sufficient space, and if the device is considered local.
Cause:
If persistent scratch space is not available, ESXi stores this temporary data on a ramdisk, which is constrained in space. This might be problematic in low-memory situations, but is not critical to the operation of ESXi. Information stored on a ramdisk does not persist across reboots, so troubleshooting information such as logs and core files could be lost. If a persistent scratch location on the host is not configured properly, you may experience intermittent issues due to lack of space for temporary files and the log files are not updated.
Resolution:
Scratch space can be manually configured for an ESXi host using the vSphere Client, the vCLI, PowerCLI, Tech Support Mode, or during scripted installation. Select the method appropriate to your environment. Regardless of the method selected, the configuration is written to the /etc/vmware/locker.conf configuration file for use during the next boot.
Changing the configured scratch location requires a reboot of the ESXi host for the changes to take effect. Use vMotion to migrate or power off all virtual machines on the ESXi host prior to making the change.
The configured scratch location must point to a directory on a file-system accessible to the ESXi host, such as a Fat16 or VMFS volume. The location may be a directory on a shared or remote disk as long as the ESXi host is allocated its own separate directory.
Note:
- Do not share a scratch locker directory among multiple ESXi hosts.
- It is not supported to configure a scratch location on a VSAN data-store.
- It may be necessary to do a reboot of the ESXi host before completing these procedures.
Configuring persistent scratch location using VMware Host Client for ESXi 6.x:
- Connect to ESXi host using Host Client
- Click Storage
- Right-click on a data-store and click Browse
- Create a uniquely-named directory for this ESXi host. For example: ESXiHostname
- Close the Data-store Browser
- Click the Manage tab
- Under System, click Advanced System Settings
- The setting ScratchConfig.CurrentScratchLocation shows the current location of the scratch partition
- In the ScratchConfig.ConfiguredScratchLocation field, enter a directory path that is unique for this host
- For example- /vmfs/volumes/DatastoreUUID/ESXiHostname
- Reboot the host
For more details on this troubleshooting, please refer to VMware KB 1033696
Write Review