This article provides steps to identify Raw Device Mappings (RDMs) attached to registered Virtual Machines.
VMware vSphere ESXi 6.5.x
VMware vSphere ESXi 6.7.x
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
VMware vSphere ESXi 9.x
1.) Determine which RDM LUNs are part of a VM cluster. From the vSphere Client, select a Virtual Machine that has a mapping to the RDM devices.
2.) Edit Virtual Machine settings and navigate to the Mapped RAW LUNs.
Example: For Hard disk 2, the RDM Physical path is identified via the VML ID:
3.) To identify the physical drive associated for the VML ID, SSH to the host where the Virtual Machine is running and execute:
$ esxcli storage core device list
1.) SSH to the host where the Virtual Machine is running
2.) Execute:
$ find /vmfs/volumes/ -type f -name '*.vmdk' -size -1024k -exec grep -l '^createType=.*RawDeviceMap' {} \; > /tmp/rdmsluns.txtfor i in `cat /tmp/rdmsluns.txt`; do vmkfstools -q $i; done
Example output: Virtual Mode RDM (virtualrdm.vmdk):
Physical Mode RDM (physicalrdm.vmdk):
1.) Open the vSphere PowerCLI command-line
2.) Execute:
Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl
This command produces a list of Virtual Machines with RDMs, along with the backing SCSI device for the RDMs. Identify the backing SCSI device from either the ScsiCanonicalName or DeviceName identifiers.
Note: To save the output to a file:
Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl | Out-File –FilePath RDM-list.txt
For more information, see Identifying disks when working with VMware ESXi