What is VMware RDM?

Spread The Knowledge

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.

VM with the RDM disk

The question is now why and when you can use the RDM instead of VMFS for a virtual machine. Let’s see the scenarios.

  1. 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.
  2. Setting up a quorum for Microsoft clustering as an RDM.
  3. 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:

  1. Compatibility Modes: You can use RDMs in virtual compatibility or physical compatibility modes. These modes provide their own features and benefits as described above.
  2. 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.
  3. 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.
  4. 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:

  1. The RDM is not available for direct-attached block devices or certain RAID devices.
  2. If you are using the RDM in physical compatibility mode, you cannot use a snapshot with the disk.
  3. You can not map to a disk partition. RDMs require the mapped device to be a whole LUN.
  4. 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.
  5. 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.


  1. Go to the virtual machine
  2. Select Edit settings
  3. Under Virtual Hardware
  4. Add New device
  5. Select RDM disk
  6. Click Add
  7. Select the appropriate LUNs for the available list
  8. Click Ok
  9. Click the New Hard Disk triangle to expand the properties for the RDM disk
  10. Select a location for the RDM disk
  11. Select the Compatibility mode you want (either physical or virtual mode).
  12. If you selected virtual compatibility mode, select a disk mode. These are three types:
    • Dependent: Dependent disks are included in snapshots.
    • IndependentPersistent: All data written to a disk in persistent mode are written permanently to the disk
    • IndependentNonpersistent: Changes to disks in nonpersistent mode are discarded when you power off or reset the virtual machine.
  13. Click Ok
  14. 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.


  1. Go to the edit settings option in VM-02
  2. Go to Virtual Hardware tab
  3. Navigate to add a new device
  4. Select “existing Hard disk
  5. Click add
  6. Navigate the existing RDM disk file created in VM-01 from the datastore
  7. Select the RDM disks
  8. Click Ok
  9. Go to the VM-02 and open disk management
  10. Initialize the disk and done.

Reference: About Raw Device Mapping – VMware

[Read more] Top VMware Interview Questions And Answers

Spread The Knowledge

Leave a Comment