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 the Virtual Machine settings and navigate to the Mapped RAW LUNs.
As shown in the Example below: For Hard disk 2, the RDM Physical path is identified via the VML ID as shown in example below:
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"
Example:
# esxcli storage core device list
1.) Open an SSH session on the host where the Virtual Machine is running
2.) Run the following command:
# find /vmfs/volumes/ -type f -name '*.vmdk' -size -1024k -exec grep -l '^createType=.*RawDeviceMap' {} \; > /tmp/rdmsluns.txt
for i in `cat /tmp/rdmsluns.txt`; do vmkfstools -q $i; done
Example output: Virtual Mode RDM (virtualrdm.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. An output looks similar the below.
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