Switching a raw data mapping (RDM) between physical and virtual compatibility modes in ESX/ESXi
search cancel

Switching a raw data mapping (RDM) between physical and virtual compatibility modes in ESX/ESXi

book

Article ID: 339865

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

A Raw Data Mapping (RDM) allows a virtual machine to directly access a LUN on the physical storage subsystem. This mapping exists in two compatibility modes: Physical and Virtual. While physical mode allows the guest operating system to access the hardware directly for SAN-aware applications, it limits certain virtualization features. This article provides the procedure to switch between these modes to enable features such as VMware snapshots, cloning, or to resolve migration errors in environments like Nutanix or HCX.

Environment

  • Hypervisor: ESXi 6.5, 6.7, 7.0, 8.0
  • Management: vCenter Server 6.x, 7.x, 8.x
  • Configurations: Windows Server Failover Clustering (WSFC), Microsoft SQL Clusters
  • Solutions: HCX Bulk Migration, Nutanix AHV Migration

Cause

Physical compatibility mode RDMs do not support VMware-native snapshots or advanced migration features because the hypervisor does not intercept SCSI commands (except for LUN Report). Switching to virtual compatibility mode allows the hypervisor to manage the RDM as a virtual disk file, enabling snapshot and cloning capabilities.

Resolution

Switching modes requires recreating the RDM pointer file. This process does not result in data loss on the physical LUN, but the virtual machine must be powered off.

Procedure

  1. Power off the virtual machine. If the RDM is shared across a cluster (e.g., WSFC), power off all nodes in the cluster.
  2. Right-click the virtual machine and select Edit Settings.
  3. Locate the RDM hard disk and note the SCSI controller and Target ID (e.g., SCSI 0:5).
  4. Remove the RDM from the virtual machine:
    • vSphere 8.x: Select Remove Device. Do not select "Remove Device and Data" unless the intention is to delete the data on the LUN.
    • vSphere 7.x and earlier: Select Remove from virtual machine. If the option "Delete from disk" is available, selecting it removes only the RDM pointer file; data on the physical LUN remains intact.
  5. Click OK to confirm the removal.
  6. Right-click the virtual machine and select Edit Settings again.
  7. Select Add New Device > RDM Disk.
  8. Select the LUN and click OK.
  9. In the disk configuration, select the desired Compatibility Mode (Physical or Virtual).
  10. Ensure the SCSI Target ID matches the original value noted in Step 3.
  11. Click OK.
  12. Power on the virtual machine.

Note: For clustered virtual machines, repeat the removal on all nodes. When re-adding to secondary nodes, add the disk as an Existing Hard Disk and browse to the RDM pointer file created on the first node to ensure consistent mapping.

Additional Information

Supported storage configuration options for virtual machines configured with Microsoft Cluster Services (MSCS):   Supported Configuration Guidelines for Microsoft Windows Server Failover Clustering (WSFC) with shared disks