This post is also available in: Italian
In a previous post I’ve described the partitions used by a ESXi installation (see ESXi – Partitions layout of system disk).
Partitions are formatted with a FAT16 filesystem, but the ESXi files are stored into the banks partitions with a specific system that consist in some compressed archives containing the required files or more archives (as also described in the yesterday’s post about the reset of the root password). More details on the filesystem used is on the first number of the VMware Technical Journal, in the paper: VisorFS: A Special-purpose File System for Efficient Handling of System Images.
But for a installation on small disks or on a USB keys/flash card more considerations are needed about ESXi partitions, expecially for the missing scratch partition.
ESXi selects one of these scratch locations during startup in order of preference:
- The location configured in the
/etc/vmware/locker.confconfiguration file, set by the
- A Fat16 filesystem of at least 4 GB on the Local Boot device.
- A Fat16 filesystem of at least 4 GB on a Local device.
- A VMFS Datastore on a Local device, in a
- A ramdisk at
The scratch partion is necessary for several task, like apply the update (you will have strange VUM errors without it). Also several directory are instead a symbolic link to directory in the scracth partition, like, for example:
- /var/tmp -> /scratch/var/tmp/
- /var/core -> /scratch/core
For more information, see also this blog post: ESXi Scratch Partition. In order to create a persistent scratch location for ESXi see the KB 1033696. Basically you configure persistent scratch space for ESXi using the vSphere Client:
- Select the ESXi host in the inventory.
- Click the Configuration tab.
- Click Storage.
- Right-click a datastore and select Browse.
- Create a uniquely-named directory for this ESXi host (eg,
- Close the Datastore Browser.
- Click Advanced Settings under Software.
- Select the ScratchConfig section.
- Change the
ScratchConfig.ConfiguredScrathLocation configuration option, specifying the full path to the directory (this needs to be unique for every ESXi host). For example:
- Enable the ScratchConfig.ConfiguredSwapState (recommended as this is a requirement for HA: see KB 1004177)
- Put the ESXi host in maintenance mode and reboot for the configuration change to take effect.