Converting a virtual disk (VMDK) into a Raw Device Mapping (RDM)
searchcancel
Converting a virtual disk (VMDK) into a Raw Device Mapping (RDM)
book
Article ID: 325341
calendar_today
Updated On: 03-14-2025
Products
VMware vSphere ESXi
Issue/Introduction
This article provides the commands to convert a virtual disk (VMDK) into a Raw Device Mapping (RDM) for either a virtual or physical RDM in an ESXi environment.
Converting a VMDK to an RDM or vice versa is a block for block copy so disk partition type (gpt, mbr, msdos, ect.) and on-disk file system (NTFS, EXT4, etc) is NOT a factor for the conversion.
Environment
VMware ESXi (All Versions)
Resolution
To import a virtual disk into a raw LUN for use with an RDM in ESXi:
Log into the ESX host as root via the console or an SSH session
Run the command:
# esxcfg-mpath -L |grep <serial# of the LUN created on the array for use of the RDM> Note: The Serial number of the LUN that was created on the array will be part of the disk identifier
The output appears similar to:
vmhba33:C0:T0:L0 state:active naa.6090a#######################909b vmhba33 0 0 0 NMP active san iqn.1998-01.com.vmware:bs-tse-i137-35c1bf18 00023d000001,iqn.2001-05.com.equallogic:0-8a0906-516ecdf03-9b9000004644a365-bs-lab-vc40,t,1
Make note of the LUN number (highlighted in red) and the identifier (highlighted in blue).
Run the appropriate command for either the virtual or physical compatibility mode: Notes:
With the examples below make sure you're running the command from within the VM directly of the VMDK you want to convert to an RDM, otherwise if running the commands from anywhere outside of the VM directory proved the full path to the VMDK you want to convert to an RDM.
Make sure the disk to be used for the RDM conversion has no filesystem already on the disk as this will result in a File Lock error