VM Recovery

Recover your Virtual Machine data now!

Mapping a VMFS disk to Guest OS as RDM disk

Mapping VMFS disk to guest OS as RDM drive

Warning: officially VMware doesn't support this feature. But we've tested mounting VMFS disk as RDM at ESX 6.5 and it worked.

You need to create new vmdk file and mount it to VMFS disk using RDM. After it's done, you'll be able to add this “vmdk” disk to VM and use it's data from within guest OS.

Now connect to ESXi host using SSH. If SSH is disabled, please see this guide on how to enable it

Browse to the folder with virtual machine where RDM disk should be added. To do this enter:

cd /vmfs/volumes//

Obtain path to the local hard drive that should be mapped. You can use command:

ls -l /vmfs/devices/disks/

to list all available disks.

Create a vmdk file:

vmkfstools -z /vmfs/devices/disks/ example.vmdk

Mapping local hard drive to vmdk file:

vmkfstools -z /vmfs/devices/disks/t8.ATA_Hitachi_HTS725032A9A364_.vmdk

Add new vmdk file to virtual machine using vSphere as new drive from existing vmdk.

Please note: command

vmkfstools -z /vmfs/devices/disks/ example.vmdk

Also works with -r parameter:

vmkfstools -r /vmfs/devices/disks/ example.vmdk

Disks connected as “-r” are connected as hypervisor disks. Such mode offers better compatibility for some guest OS, but some features like disk's S.M.A.R.T. are unavailable. We recommend to use -z parameter during mount operation as at this case disks are mounted as is and represented to guest OS as a real hardware drives.

Return to contents