This article describes how to migrate the ESXi OSData partition from the SD card to existing VMFS partitions when the ESXi host runs normally without an Install or upgrade situation.
ESXi 8.0.x
To a VMFS datastore subdirectory(root directory of datastore is not permitted)
vim-cmd hostsvc/advopt/update OSData.configuredLocation string /vmfs/volumes/<Datastore_name>/<unique_osdata_directory>
Note: datastore device must be a type which is also supported by OSDATA: local NVMe/SSD/HDD or remote FCoE or hardware-independent iSCSI (i.e. not software iSCSI)
Detail step:
mkdir /vmfs/volumes/<Datastore_name>/<unique_osdata_directory>
vim-cmd hostsvc/advopt/update OSData.configuredLocation string /vmfs/volumes/<Datastore_name>/<unique_osdata_directory>
vim-cmd hostsvc/advopt/view OSData.configuredLocation
configstorecli config current get -c "esx" -g "storage" -k "osdata_location"
If after rebooting ESXi host to check OSDATA partition path and encounter the value is " " using vim-cmd hostsvc/advopt/view OSData.configuredLocation
, please execute the step 3 command again and reboot again, and then check again.