Migrate the ESXi OSData partition from an SD card to existing VMFS partitions
search cancel

Migrate the ESXi OSData partition from an SD card to existing VMFS partitions

book

Article ID: 376163

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vSphere ESXi 8.0

Issue/Introduction

Migrate the ESXi OSData partition from an SD card to existing VMFS partitions without an install or upgrade situation.

Environment

ESXi 8.0.x

Resolution

SSH into the ESXi host and navigate to a VMFS datastore subdirectory(root directory of datastore is not permitted), then run the following command:

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
  • local HDD
  • FCoE LUN
  • hardware-independent iSCSI LUN
    (software iSCSI is not valid)

Detail steps:

  1. log in to ESXi CLI using root.
  2. create a unique OSDATA directory under a specific VMFS Datastore using the command:
    mkdir /vmfs/volumes/<Datastore_name>/<unique_osdata_directory>
  3. modify default value path to specific path using command:
    vim-cmd hostsvc/advopt/update OSData.configuredLocation string /vmfs/volumes/<Datastore_name>/<unique_osdata_directory>
  4. After modification, reboot ESXi host.
  5. using commands to confirm OSDATA partition has already been updated successfully:
    vim-cmd hostsvc/advopt/view OSData.configuredLocation
    configstorecli config current get -c "esx" -g "storage" -k "osdata_location"

Note: Change must be done via SSH into the host, changing this parameter via the GUI is not persistent across reboots

Additional Information

After rebooting the ESXi host, check the OSDATA partition path and verify that the value is " " using
vim-cmd hostsvc/advopt/view OSData.configuredLocation

If not, please execute the step 3 from above, reboot and check again.