To configure a local device as an RDM disk:

  1. Open an SSH session to the ESXi/ESX host.
  2. List the disks that are attached to the ESXi host, use the command:

    # ls -l /vmfs/devices/disks

  3. From the list, identify the local device you want to configure as an RDM and copy the device name.

    Note: The device name will likely be prefixed with t10. and look similar to: t10.F405E46494C4540046F455B64787D285941707D203F45765

  4. To configure the device as an RDM and output the RDM pointer file to your chosen destination, run the command:

    # vmkfstools -z /vmfs/devices/disks/<diskname> /vmfs/volumes/<datastorename>/<vmfolder>/<vmname>.vmdk
    For Example:

    # vmkfstools -z /vmfs/devices/disks/t10.F405E46494C4540046F455B64787D285941707D203F45765 /vmfs/volumes/Datastore2/localrdm1/localrdm1.vmdk

    Note: The size of the newly created RDM pointer file appears to be the same size and the Raw Device it it mapped to, this is a dummy file and is not consuming any storage space.

  5. When you have created the RDM pointer file, attach the RDM to a virtual machine using the vSphere Client:
    1. Right click on the virtual machine you want to add an RDM disk to.
    2. Click Edit Settings.
    3. Click Add…
    4. Select Hard Disk.
    5. Select Use an existing virtual disk.
    6. Browse to the directory you saved the RDM pointer to in step 5 and select the RDM pointer file and click Next.
    7. Choose the virtual SCSI controller you want to attach the disk to and click Next.
    8. Click Finish.
  6. You should now see your new hard disk in the virtual machine inventory as Mapped Raw LUN.

    Note: As this virtual machine now has an attached local disk migration, using vMotion is not possible.

Leave a Reply

Your email address will not be published. Required fields are marked *