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:

  1. The location configured in the /etc/vmware/locker.conf configuration file, set by the ScratchConfig.ConfiguredScratchLocation configuration option
  2. A Fat16 filesystem of at least 4 GB on the Local Boot device.
  3. A Fat16 filesystem of at least 4 GB on a Local device.
  4. A VMFS Datastore on a Local device, in a .locker/ directory.
  5. A ramdisk at /tmp/scratch/

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:

  1. Select the ESXi host in the inventory.
  2. Click the Configuration tab.
  3. Click Storage.
  4. Right-click a datastore and select Browse.
  5. Create a uniquely-named directory for this ESXi host (eg, .locker-ESXHostname)
  6. Close the Datastore Browser.
  7. Click Advanced Settings under Software.
  8. Select the ScratchConfig section.
  9. Change the ScratchConfig.ConfiguredScrathLocation configuration option, specifying the full path to the directory (this needs to be unique for every ESXi host). For example:/vmfs/volumes/DatastoreName/.locker-ESXHostname
  10. Enable the ScratchConfig.ConfiguredSwapState (recommended as this is a requirement for HA: see KB 1004177)
  11. Put the ESXi host in maintenance mode and reboot for the configuration change to take effect.
Andrea MauroAbout Andrea Mauro (2448 Posts)

Virtualization & Cloud Architect. VMUG IT Co-Founder and board member. VMware VMTN Moderator and vExpert (2010, 2011, 2012, 2013, 2014, 2015). PernixPro 2014. Dell TechCenter Rockstar 2014. MVP 2014. Several certifications including: VCDX-DCV, VCP-DCV/DT/Cloud, VCAP-DCA/DCD/CIA/CID/DTA/DTD, MCSA, MCSE, MCITP, CCA, NPP.


Share