VMware Cloud Foundation
vSphere
Below steps involves enabling a persistent disk identifier (UUID) in the VM configuration and then retrieving and comparing two unique IDs: the "Serial Number" from the guest OS and the UUID from the virtual machine VMDK file.
Step 1: Enable Disk UUID attribute on the Windows VM
Step 2: Map the OS disk to the VMDK UUID
Once the VM is powered on, retrieve the identifiers and match them:
Get-Disk" then record the content in the column "Serial Number" After performing Step 1, SSH into the ESXi host running the VM. Then, retrieve the UUID from the VMDK file(s) by executing the following command:
vmkfstools -J getuuid /vmfs/volumes/<Datastore Name>/<VM>/<VM>.vmdk
Example output: ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
Match the Identifiers:
The output from "Get-Disk" (Serial Number) and the output from vmkfstools (the UUID) can now be matched to correctly identify the OS device and its corresponding VMDK file.