Raw device mapping (RDM)

From Notes_Wiki

Home > VMWare platform > VMWare vSphere or ESXi > Raw device mapping (RDM)

Ideally we can map LUNs to ESXi hosts and create VMFS filesystem. The immediate advantage is that same LUN can be accessed in parallel for read/write from multiple ESXi hosts. On top of this VMFS filesystem we can create .vmdk files or virtual hard-disks which can be used for persistent storage in VMs. However, if it is required to map a hardware device directly with a VM to expose low-level device APIs then we can use Raw Device Mapping (RDM).

Note that RDM is of two types:

  • Virtual compatibility mode: In this case RDM acts like a virtual-disk file. Most of the low-level access are masked and managed by ESXi. This mode supports snapshots.
  • Physical compatibility mode: Most of the commands are pass-through to the actual device as it is.

There are special considerations while doing vMotion or while expanding RDM devices. Use references below for more information


Refer:

About RDM, advantages and limitations
https://docs.vmware.com/en/VMware-vSphere/6.5/com.vmware.vsphere.storage.doc/GUID-9E206B41-4B2D-48F0-85A3-B8715D78E846.html
Migration VMs with RDM
https://kb.vmware.com/s/article/1005241
Expanding size of RDM
https://kb.vmware.com/s/article/1007021


Add USB Devices from an ESXi Host to a Virtual Machine

To map USB device to a VM at ESXi level use:

  1. Connect the USB to base ESXi host
  2. Login into ESXi using root account
  3. Go to virtual machines page
  4. Right-click on virtual machine where we want to map the drive and select Edit Settings.
  5. On the Virtual Hardware tab, use "Add other device" menu. From "Add other device" menu select "USB Device"
    Note that "USB Device" option will be enabled only when there is a USB device available for adding. Otherwise the option would be grayed out.
  6. The new USB device appears at the bottom of the Virtual Hardware device list.
  7. Expand New USB Device, and select the device to add.
    Note that you can add multiple USB devices, but only one device at a time.
  8. Click OK / Save.

Refer:


ESXi installation or boot gets stuck at vmw_satp_alua

It is possible that during installation or boot ESXi gets stuck after displaying

vmw_satp_alua loaded successfully

This can happen if:

  • We are trying to install ESXi on a node which was earlier part of Hyper-V cluster and has disks mapped to the host via storage (FC/iSCSI) with persistent reservation enabled
  • We have mapped RDM to a ESXi host so that it can be further mapped with a windows VM.

In either case the solution is either to ask ESXi that the disk is perennially reserved and hence it should not scan it via:

OR

Unmap the storage from Hyper-V cluster (Remove reservation) and then unmap the LUN from host and then proceed further.


If the hosts have been formatted or hyper-V cluster is down then deletion / unmap of such LUNs fails due to persistent reservation. In case of Dell MD3800F found that:



Home > VMWare platform > VMWare vSphere or ESXi > Raw device mapping (RDM)