https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1017530
/vmfs/devices/disks for local or SAN-based disks.
/vmfs/devices/lvm for ESXi logical volumes.
/vmfs/devices/generic for generic SCSI devices.
To configure a local device as an RDM disk:
- Open an SSH session to the ESXi/ESX host.
- Run this command to list the disks that are attached to the ESXi host:# ls -l /vmfs/devices/disks
-
From the list, identify the local device you want to configure as an RDM and copy the device name.Note: The device name is likely be prefixed with t10. and look similar to:
t10.F405E46494C4540046F455B64787D285941707D203F45765 - To configure the device as an RDM and output the RDM pointer file to your chosen destination, run this command:# vmkfstools -z /vmfs/devices/disks/diskname /vmfs/volumes/datastorename/vmfolder/vmname.vmdkFor example:
# vmkfstools -z /vmfs/devices/disks/t10.F405E46494C4540046F455B64787D285941707D203F45765 /vmfs/volumes/Datastore2/localrdm1/localrdm1.vmdk
Note: The size of the newly created RDM pointer file appears to be the same size and the Raw Device it it mapped to, this is a dummy file and is not consuming any storage space.
- When you have created the RDM pointer file, attach the RDM to a virtual machine using the vSphere Client:
- Right click the virtual machine you want to add an RDM disk to.
- Click Edit Settings.
- Click Add.
- Select Hard Disk.
- Select Use an existing virtual disk.
- Browse to the directory you saved the RDM pointer to in step 5 and select the RDM pointer file and click Next.
- Select the virtual SCSI controller you want to attach the disk to and click Next.
- Click Finish.
- You should now see your new hard disk in the virtual machine inventory as Mapped Raw LUN.