VMware vSphere ScratchConfig Error – Persistent Scratch Location for ESXi 4.x/5.x/6.0

cropped-vmware.jpg

Creating a persistent scratch location for ESXi 4.x/5.x/6.0

Recently, I updated the storage array and while one of the controllers (Dell Compellent split-controller design SC4020) was rebooting, I’ve noticed that occasionally the host loses communication to the SAN array via the fibre channel. Even though I used dual pathing for each ESXi host, vSphere was throwing this error:

Lost connectivity to the device naa.6000d3xxxxxxx backing the boot filesystem /vmfs/devices/disks/naa.6000d3xxxxxxx. 
As a result, host configuration changes will not be saved to persistent storage.

VMware recommends that ESXi has a persistent scratch location available for storing temporary data including logs, diagnostic information, and system swap. This error just means that the ScratchConfig was wiped out and needed to be updated in order to save host configuration changes. Changing the configured scratch location requires a reboot of the ESXi host for the changes to take effect. The VMware KB has documentation of the particular error but, it’s a little confusing.

Configuring a persistent scratch location using SSH

1. Put the ESXi host into maintenance mode
2. Enable SSH on Host
——————————————————————

Configuration > Security Profile > Properties > SSH > Options > Start/Stop > OK

——————————————————————

3. Open SSH/Terminal Emulator and type the ESXi hostname or IP
4. Enter username and password

——————————————————————

~# cd /vmfs/volumes

/vmfs/volumes # ls -l

——————————————————————

5. Find the Datastore containing the existing log (use the Datastore GUID) or create a new directory

——————————————————————

/vmfs/volumes #  mkdir /vmfs/volumes/DatastoreName/DirectoryName 

——————————————————————

Once you have the Datastore GUID run this (Be sure to change the GUID to your GUID)

6. Check the current value of the ScratchConfig.ConfiguredScratchLocation

——————————————————————

/vmfs/volumes #  vim-cmd hostsvc/advopt/view ScratchConfig.ConfiguredScratchLocation 

——————————————————————

7. Change the ScratchConfig.ConfiguredScratchLocation configuration option, specifying the full path to the directory

——————————————————————

/vmfs/volumes # vim-cmd hostsvc/advopt/update ScratchConfig.ConfiguredScratchLocation string /vmfs/volumes/565e1b0f-8c531b3b-7e0a-00215e5d7dcc/logs/log 

——————————————————————

8. Reboot for the configuration change to take effect

Follow Us On
Twitter
fb-art Postwaves

References

VMware, Inc. (2016). Creating a persistent scratch location for ESXi 4.x/5.x/6.0 (1033696). Retrieved from: https://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=1033696&sliceId=2&docTypeID=DT_KB_1_1&dialogID=726279278&stateId=0%200%20726283435

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s