Identifying Virtual Machines with Raw Device Mappings (RDMs)
search cancel

Identifying Virtual Machines with Raw Device Mappings (RDMs)

book

Article ID: 332510

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides steps to identify Raw Device Mappings (RDMs) attached to registered Virtual Machines.

Environment

VMware vSphere ESXi (All Versions)

Resolution

Via Web Client (= vSphere Client ):

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 your Virtual Machine settings and navigate to your 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.) Identify the physical drive associated for the VML ID 

Open SSH/Putty Session on the Host where the Virtual Machine is running on and run "esxcli storage core device list"

Example: 

esxcli storage core device list


 

 

Via ESXi CLI:

1.) Open SSH/Putty Session on the Host where the Virtual Machine is running on

2.) Run the following commands:

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):

 

  • Physical Mode RDM (physicalrdm.vmdk):



Via PowerCLI:

1.) Open the vSphere PowerCLI command-line

2.) Run the following command:

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:

If you need to save the output to a file the command can be modified - Example:

Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl | Out-File –FilePath RDM-list.txt

Additional Information