When attempting to access or view ESXi logs, the system returns an error message: "Device or resource busy"
This error typically prevents the host from successfully writing logs or updating the scratch partition, which can lead to data loss for diagnostic logs after a reboot.
VMware vSphere ESXi 8.0.x
This issue occurs because multiple ESXi hosts are configured to write their logs or scratch data to the same shared folder on a datastore. Since ESXi requires exclusive access to its scratch directory, a file lock conflict occurs when a second host attempts to access the same directory, resulting in the "Resource busy" state.
Log in to the VMware Host Client for the specific ESXi host.
Click Storage in the left-side navigation pane.
Right-click the desired Datastore and select Browse.
Create a new directory with a unique name specific to this host.
Example: .locker-ESXHostname01
Close the Datastore Browser.
Click the Manage tab, then select Settings.
Under the System menu, click Advanced settings.
Locate the following parameters (use the search bar in the top right for quick access):
ScratchConfig.CurrentScratchLocation: Displays the active path currently in use (read-only).
ScratchConfig.ConfiguredScratchLocation: This is the field you must edit.
In the ScratchConfig.ConfiguredScratchLocation field, enter the full path to the unique directory created in Step 1.
Format: /vmfs/volumes/DatastoreUUID/.locker-ESXHostname
Note: Using the Datastore UUID instead of the Friendly Name is recommended to avoid pathing issues if the datastore is renamed.
Click Save.
Reboot the ESXi host for the changes to take effect and for the host to begin using the new, unique scratch location