VMware RDM stands for Raw Device Mapping. An RDM is a mapping file in a separate VMFS volume that acts as a proxy for a raw physical storage device. The RDM allows a virtual machine to directly access and use the storage device.
It enables a storage LUN(Logical Unit Number) to be directly presented to a virtual machine from the storage array. LUN is a unique alphanumeric number of the storage unit. You can see the RDM under the host’s datastore section.
We can say a Virtual Machine in VMware virtualization has access and use storage in two ways. The first is VMFS(Virtual Machine File System) and second RDM. It is recommended to use VMFS for most of the applications but in a few scenarios, you can also use RDM.
The file gives you some of the advantages of direct access to a physical device while keeping some advantages of a virtual disk in VMFS. It increases the manageability of files. The RDM disk file has the same .vmdk extension as a regular virtual disk file.
We can understand RDM functionality with below picture. We have a Virtual Machine using mapping files located in VMFS datastore. Virtual machine can easily access it, perform reads and writes operations.

The question is now why and when you can use the RDM instead of VMFS for a virtual machine. Let’s see the scenarios.
- When you want better and fast IOPS(Input-Output Per Second) for your applications such as Microsoft Clustering with SQL applications. It increases the performance of your application by accessing directly the storage device.
- Setting up a quorum for Microsoft clustering as an RDM.
- When SAN snapshot runs in the virtual machine the RDM better enables scalable backup systems by using features inherent to the SAN.
There are two compatibility modes available for RDMs:
- Virtual compatibility mode allows an RDM to act exactly like a virtual disk file. A virtual machine with a virtual compatibility mode allows you to take snapshots. All iSCSI commands from the virtual machine to LUN will pass through the VMFS layer and only READ & WRITE operation will go directly to the LUN. You can see it in the above picture also.
- Physical compatibility mode allows direct access of the SCSI device for those applications that need lower-level control. In this mode, all iSCSI commands will pass directly to physical LUN expect a few used by VMware VMKernal. The maximum LUN size in this mode can be up to 2TB. You can not take the snapshot of virtual machines if they are using RDM as physical compatibility mode.
Characteristics of the RDMs
The RDMs are mapping files in a VMFS volume that manages metadata for its mapped device. The mapping file is presented to the management software as a normal disk file. RDMs have following benefits:
- Compatibility Modes: You can use RDMs in virtual compatibility or physical compatibility modes. These modes provide their own features and benefits as described above.
- Dynamic Name Resolution: The RDM file supports dynamic name resolution when a path to a raw device changes such as a Fibre Channel switch failure or the addition of a new HBA, can change the device name.
- RDM with VM Cluster: When you want a set of VM that should use the same physical LUN and share the storage, you can configure RDMs between them by sharing the disks.
- RDM uses iSCSI commands for its operations. You can take advantage of iSCSI features also.
Limitations of the RDMs
Having such a great advantages, however, RDM has some limitations also:
- The RDM is not available for direct-attached block devices or certain RAID devices.
- If you are using the RDM in physical compatibility mode, you cannot use a snapshot with the disk.
- You can not map to a disk partition. RDMs require the mapped device to be a whole LUN.
- If you use vMotion to migrate virtual machines with RDM disks, make sure to maintain consistent LUN IDs for RDMs across all participating ESXi hosts.
- Flash Read cache does not support RDMs in physical compatibility mode and only virtual compatibility mode RDMs are supported with Flash Read Cache.
How To Configure RDMs for Virtual Machine
To configure an RDM for a virtual machine is a super easy task for the server administrators. But before configuring it you should request with storage team to present the LUN to the associated Host and NAA ID. The NAA stands for Network Address Authority which also a unique ID for that physical storage.
Steps:
- Go to the virtual machine
- Select Edit settings
- Under Virtual Hardware
- Add New device
- Select RDM disk
- Click Add
- Select the appropriate LUNs for the available list
- Click Ok
- Click the New Hard Disk triangle to expand the properties for the RDM disk
- Select a location for the RDM disk
- Select the Compatibility mode you want (either physical or virtual mode).
- If you selected virtual compatibility mode, select a disk mode. These are three types:
- Dependent: Dependent disks are included in snapshots.
- Independent – Persistent: All data written to a disk in persistent mode are written permanently to the disk
- Independent – Nonpersistent: Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine.
- Click Ok
- Go to the VM’s disk management console and initialize the disk.
This way you can add RDM disks to your virtual machines as per your technical requirements.
How To Share The RDM disks Between Virtual Machines
Let’s talk about sharing the RDM disks between virtual machines cluster together. This scenario comes in the picture if you want that your virtual machine should use the same LUN and storage unit to read and write the purpose for multiple VMs.
Let suppose you have VM-01 and VM-02 and you have already added RDM disks to VM-01 and now want to share it for VM-02.
Steps:
- Go to the edit settings option in VM-02
- Go to Virtual Hardware tab
- Navigate to add a new device
- Select “existing Hard disk”
- Click add
- Navigate the existing RDM disk file created in VM-01 from the datastore
- Select the RDM disks
- Click Ok
- Go to the VM-02 and open disk management
- Initialize the disk and done.
Reference: About Raw Device Mapping – VMware
[Read more] Top VMware Interview Questions And Answers