Skip to content

Month: August 2024

How to Identify the RDM ID of a Virtual Machine in VMware vSphere

Raw Device Mapping (RDM) allows virtual machines to directly access a physical storage device, making it ideal for scenarios like clustering and certain database setups. However, when troubleshooting or managing storage configurations, it’s essential to identify the RDM ID associated with a virtual machine. In this guide, we’ll explain how to find the RDM ID using VMware tools like the vSphere Client and, ESXi CLI.

Identifying the RDM ID via vSphere Client

Steps to Follow:

  1. Open the vSphere Client and log in to the vCenter Server.
  2. Navigate to the VM Settings of the virtual machine with the RDM.
  3. Locate the disk marked as Physical (RDM) or Virtual (RDM).
  4. Check the Device Name (e.g., vmhba2:0:1) in the disk settings. This is the identifier for the RDM.
    Tip: You may also see the RDM file path in the datastore browser, which points to the mapping file (e.g., /vmfs/volumes/datastore_name/vm_name/rdm.vmdk).

Using the ESXi CLI to Identify RDM Mappings

Steps to Use CLI:

  1. Enable SSH on the ESXi Host:
    • Use the vSphere Client or DCUI to enable SSH access to the ESXi host.
  2. SSH into the Host:
    • Use an SSH client (e.g., PuTTY) to log in to the ESXi host.
  3. List RDM Mappings:
    Run the following command to identify RDM devices attached to the VM:

    ls -l /vmfs/devices/rvm

    This command displays the mappings of RDM devices.

  4. Verify VM Device Links:
    Identify the RDM mappings for the specific VM by cross-referencing the VM’s disk configuration.

Best Practices for Managing RDMs

  1. Label RDM Devices Clearly:
    Use consistent naming conventions in vSphere to avoid confusion.
  2. Document RDM Configurations:
    Maintain detailed records of RDM devices and their associated VMs.
  3. Monitor Storage I/O:
    Regularly check the performance and health of physical devices backing RDMs.
  4. Test Before Modifying:
    If you plan to migrate or change an RDM device, ensure compatibility and test in a non-production environment.