VMware Arena

How to Configure Scratch partition in VMware ESXi using Web Client

What is Scratch partition in VMware ESXi ?

The scratch partition is a 4 GB VFAT partition that is created to store vm-support output, which is needed to analyse the cause of system failures and which is needed by VMware Support to identify and troubleshoot the issues occurred on ESXi host . If the scratch partition is not present, vm-support output is stored in a ramdisk. In low-memory situations, you might want to create a scratch partition if one is not present. In this artcile, I will explain the detailed procedure for configuring Scratch partition in VMware ESXi using vSphere Web Client.

How to Create Scratch partition in VMware ESXi ?

VMware Scratch Partition is configured automatically during ESXi installation or during first boot of an ESXi host, and is not required to be manually configured. ESXi Installable creates a 4 GB Fat16 partition on the target device during installation if there is sufficient space, and if the device is considered Local. Take a look at my article to understand VCSA 6.5 Disk Partition and Mount points

ESXi selects one of these scratch locations during startup in this 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/.

Why do we need to  Configure Persistent Scratch Partition in VMware ESXi?

If persistent scratch space is not available, ESXi stores this temporary data on a ramdisk. This might be problematic in low-memory situations. Information stored on a ramdisk does not persist across reboots, so troubleshooting information such as logs and core files could be lost. Incase of ESXi crash or ESXi PSOD, all the log and core files which is need to analyse the cause of the failure may be lost after the reboot.

As we aware that, VMware Scratch Partition is configured automatically during ESXi installation or during first boot of an ESXi host. These are two examples where scratch space may not be automatically defined on persistent storage. In each case, the temporary scratch location is configured on a ramdisk:

How to Configure Persistent Scratch location in VMware ESXi using vSphere Web Client

Before Configuring Persistent Scratch location in ESXi location. I am just creating a directory in the datastore called ” Scratch”. This is not needed. I have just created it for some lab purposes.

Log in to vCenter Server using the vSphere Web Client. Click Hosts and Clusters, then select the specific host.Click the Manage tab. Click Settings > System > Advanced System Settings.

You can optionally search for the word “Scratch” in search box to see the current configuration value. Click on Edit to configure the advanced settings.

Locate ScratchConfig.ConfiguredScratchLocation in the advanced system settings and specify the  path to the scratch directory. Click on Ok.

 

 

You need to reboot the ESXi host for the configuration changes to takes place. After ESXi reboot, I have validated the Scratch location advanced settings. It is updated now.

 

That’s it. We are done with the configuring Scratch location in VMware ESXi. I hope this is informative for you. Thanks for Reading!!! Be social and share it in social media using social sharing plugins , If you feel worth sharing it.

 

Exit mobile version