The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
Raw Device Mapping for local storage (1017530)
When attempting to configure a local datastore as a Raw Device Mapping (RDM), you see these symptoms:
- The option to create an RDM is grayed out.
- You cannot add a local volume to a virtual machine as a raw device mapping.
To configure an RDM on local storage with ESXi/ESX hosts, both of these conditions are required:
- The candidate device must support SCSI Inquiry Vital Data Product (VPD) page code 0x83, which is used to directly address and communicate with RDM devices. For more information on SCSI sense code, see Understanding SCSI Check Conditions in VMkernel logs during rescan operations (1010244).
- The candidate device must export a global serial number, which enables the ESXi/ESX host to uniquely identify the device for use as an RDM.
Note: This capability to serve as an RDM may not be possible on some local controllers and their attached storage. Contact your hardware vendor to verify if your controller supports the required conditions, and for any technical support.
If you have a suitable controller, you can configure the local device as an RDM. Configuration of a local storage device as an RDM must be done using the Command Line Interface (CLI), it cannot be done through the vSphere Client.
To configure a local device as an RDM disk:
- Open an SSH session to the ESXi/ESX host.
- List the disks that are attached to the ESXi host, use the command:
# ls -l /vmfs/devices/disks
- 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
- 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
# 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.
- When you have created the RDM pointer file, attach the RDM to a virtual machine using the vSphere Client:
- Right click on the virtual machine you want to add an RDM disk to.
- Click Edit Settings.
- Click Add...
- Select Hard Disk.
- Select Use an existing virtual disk.
- Browse to the directory you saved the RDM pointer to in step 5 and select the RDM pointer file and click Next.
- Choose the virtual SCSI controller you want to attach the disk to and click Next.
- Click Finish.
- You should now see your new hard disk in the virtual machine inventory as Mapped Raw LUN.
- As this virtual machine now has an attached local disk migration, using vMotion is not possible.
- If you need to remove the local RDM mapping from the virtual machine, just apply the same process you would with a shared storage RDM. In the vSphere Client: right-click the virtual machine, click Edit settings, select the RDM disk and choose delete from disk. This will not delete the data on the disk, it will only delete the RDM mapping file.
For more information, see:
- Raw Device Mapping option is grayed out (1017704)
- RDM Filter & MSCS using Egenera, see Allowing VMware ESX 3.5 to use Raw Device Maps (RDM) on Egenera pservers (1014513)
- Limitations of Raw Device Mapping from the VMware vSphere Online Library
Request a Product Feature
To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.