For those who use the Virtual Machine File System (VMFS) datastores, one of the steps when upgrading to vSphere 6.5 is to migrate them to VMFS-6.
However, there are three edge cases that require extra steps to continue with the migration. They are as follows:
- A system swap configured to use the VMFS datastore,
- A persistent scratch location for ESXi is set to a folder on the VMFS datastore,
- A diagnostic core dump location points to a file on the VMFS datastore.
All those objects, if they exist, prevent the ESXi host from unmounting the datastore, and they need to be moved to a new location before migration continues. The required steps to relocate them will be reviewed in the paragraphs below.
Relocating the system swap
The system swap location can be checked and set via vSphere Client in Configure > System > System Swap settings of the ESXi host.
Alternatively, the system swap settings can be retrieved via PowerCLI:
The script above can be modified to create the system swap files on a new datastore:
Note: The host reboot is not required to apply this change.
Moving the persistent scratch location
A persistent scratch location helps when investigating the host failures. It preserves the host log files on a shared datastore. So they can be reachable for troubleshooting, even if the host experienced the Purple Screen of Death (PSOD) or went down.
To identify the persistent scratch location, filter the key column by the ‘scratch’ word in Settings > System > Advanced System Settings of the ESXi host in vSphere Client.
You only need to point the ScratchConfig.ConfiguredScratchLocation setting to a new location and reboot the host for this change to take effect.
Note: Before doing any changes, make sure that the .locker folder (should be unique for each configured host to avoid data mixing or overwrites) has been created on the desired datastore. Otherwise, the persistent scratch location remains the same.
To review and modify advanced host parameters including the persistent scratch location via PowerCLI, look for two cmdlets named Get-AdvancedSetting and Set-AdvancedSetting. This procedure is well-documented in KB 1033696.
An information about how to automate the diagnostic coredump file relocation will be covered in Part 2 or this series later on. Keep you posted!