How to create RDM (Raw Device Mapping) on ESXi host
- Run fdisk -l to see all the disks available to ESXi host.
- Run /dev/disks/ -l to find out VML ID, which will be used in the command to create RDM.
- Create a folder (i.e. RDMs) for mapping file(s) on the DataStore
- Create the mapping files with LSILogic controller using the following command
vmkfstools -r /vmfs/devices/disks/vml.01000000002020202020202020202020205733383132564439535431303030 RDM1.vmdk -a lsilogic
Two mapping files (RDM1.vmdk and RDM1-flat.vmdk) were created. (Note: file appears to your total disksize but it actually takes no space).
- Go to your VM and add the mapping file as a second disk. Select the option existing disk and point to the RDM1.vmdk file.