vSphere ESXi 7.x
vSphere ESXi 8.x
By default, the device naming conventions (like /dev/sda, /dev/sdb) used by the Linux guest OS may change upon reboot or are simply not directly linked to the unique identifiers used by VMware (such as the VMDK's UUID). This lack of a consistent, shared identifier can lead to misidentification when performing critical disk management operations.
Below steps involves enabling a persistent disk identifier (UUID) in the VM configuration and then retrieving and comparing two unique IDs: the WWID (World Wide Identifier) from the guest OS and the UUID from the virtual machine VMDK file.
disk.EnableUUIDTRUE and then click ADDStep 2: Map the OS disk to the VMDK UUID
Once the VM is powered on, retrieve the identifiers and match them:
WWID (World Wide Identifier) from the disk inside the Linux Guest OS: Run the following command, replacing " * " with the disk device you need to identify (e.g., sdb):
scsi_id --whitelisted --device=/dev/sd*
3################################UUID from the VMDK file(s) by executing the following command:vmkfstools -J get uuid /vmfs/volumes/<Datastore Name>/<VM>/<VM>.vmdk
## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##scsi_id (the WWID) and the output from vmkfstools (the UUID) can now be matched to correctly identify the OS device and its corresponding VMDK file.Note: The leading '3' in the scsi_id output and any spaces in the vmkfstools output must be disregarded for a successful comparison.