How to: VMWare ESXi5 Local Disk RAW Mapping

RAW disks or in this case RDM (Raw Device Mapping) for VMWare ESXi4-5

vmware_logo

This is the process to allow virtual machines on a host direct access to the local disks of the host if not currently used as datastores or assigned to other VM’s.

1. On your VM host create a folder in the local datastore for the .vmdk files you need to create later. These are not actual .vmdk files and will act as a proxy/redirect to the RAW disk access. I created the following datastore1 > Symb_Disks

2. Enable SSH on the host if not already

3. SSH into the ESXi Host

4. Run this to get the physical disk info and device ID.

~ # esxcfg-mpath -l

Your output should look similar to this:

sata.vmhba1-sata.0:1-t10.ATA_____SEAGATE_ST3500630NS_____________________XXXXXXXXXXXXX____________
Runtime Name: vmhba1:C0:T1:L0
Device: t10.ATA_____SEAGATE_ST3500630NS_____________________XXXXXXXXXXXXX____________
Device Display Name: Local ATA Disk (t10.ATA_____SEAGATE_ST3500630NS_____________________XXXXXXXXXXXXX____________)
Adapter: vmhba1 Channel: 0 Target: 1 LUN: 0
Adapter Identifier: sata.vmhba1
Target Identifier: sata.0:1
Plugin: NMP
State: active
Transport: sata

4. Command to create proxy RAW link file in VMWare ESXi5

Paste the device ID you got above into the below command in place of my actual disk serial. Rename the target .vmdk to what you want if necessary.The space before /VMFS IS NECESSARY.

vmkfstools -r  /vmfs/devices/disks/t10.ATA_____SEAGATE_ST3500630NS_____________________XXXXXXXXXXXXX____________ /vmfs/volumes/datastore1/Symb_Disks/SG-SATA500GB1.vmdk

You will not see any output confirming this but a VMDK should now exist in your datastore folder you pointed to.

=================================================

4a. Do this again for as many disks you want to create Symb_Links for.

5. Then go in and add a new disk to your VM. When it asks choose existing file and find the one you just created per disk. Choose independent for change option. Done.