VMware Arena

How to Convert RDM to VMDK – The Ultimate Guide

As we already discussed many times, VMware RDM (Raw device mapping) is a mapping file that provides direct access to a LUN on the fiber channel storage system for a virtual machine. There are two types of RDM Disks (Virtual Compatibility RDM and Physical Compatibility RDM). Take a look at the 11 differences between RDM physical vs virtual Compatibility Mode.  There could be various instances that we may need to convert RDM to VMDK.  Instances such as migrating VM across datacenter without having the option to move with RDM disks, Decommission of storage array where RDM LUN is allocated, etc. We need to understand how to convert RDM to VMDK and this article will explain you the detailed procedure to convert both virtual and physical RDM disks to VMDK.

How to Convert RDM to VMDK

Convert Virtual RDM to VMDK using Storage vMotion

Virtual compatibility RDM disks allow RDM to act exactly like a virtual disk file, including the use of snapshots. We can convert virtual compatibility RDM disks to VMDK disks during Storage vMotion to different datatsore.

when you perform Storage vMotion, the virtual machine files are physically relocated to a destination datastore. The same host retains ownership or registration of the virtual machine after Storage vMotion completes.

Virtual mode RDM data can be migrated to a VMDK disk with Storage vMotion by selecting the Disk Format from Advance View. This operation can be performed when the Virtual machine is in both Powered on or Powered off state.

In the below example, I have Hard Disk 3 (1 TB) which is a RAW LUN attached to the virtual machine as virtual compatibility RDM.

You can initiate the storage vMotion of the virtual machine with virtual RDM disks attached. To convert RDM to VMDK, You can use the Advanced option in Storage vMotion ->Change the disk format as “Thin or Thick” from the disk format drop down for the RDM disk, select the destination datastore and proceed with the storage vMotion.

Once storage vMotion is completed, virtual RDM disk will be converted to VMDK. It is easy and simple rite.

If you do not change the destination format to thick or thin provisioned for an RDM in the advanced section of the migration wizard, only the RDM mapping file will be migrated to the destination datastore.

Convert Physical RDM to VMDK using Storage vMotion

1. Convert Physical RDM to VMDK using Storage vMotion (VM Powered on = Not Possible)

Physical mode RDM data can be migrated to VMDK disks only via cold migration. It is not possible to Convert Physical RDM to VMDK using disk format option during Storage vMotion when the virtual machine is Powered-on.

If you try to Change the Disk format of Physical RDM during Storage vMotion, Storage vMotion is not allowed.

It throws the compatibility errors ” Virtual disk is mapped direct-access LUN in Physical compatibility mode; converting it to different disk type is not supported for  this operation”

2. Convert Physical RDM to VMDK using Storage vMotion (VM Powered off = Possible)

As similar to Converting virtual RDM to VMDK using Storage vMotion with Disk format change option, you can convert the physical RDM to VMDK by changing Disk Format to Thick or thin during storage vMotion only When the virtual machine is Powered off.

Physical mode RDM data can be migrated to VMDK disks only via cold migration.

3. Convert Physical RDM to VMDK using Storage vMotion (Workaround When VM is Powered on) 

As we are aware that, Convert Physical RDM to VMDK of Powered-on virtual machine using Storage vMotion is not possible and you need to power off the virtual machine to perform this action. The third way I am going to explain is Workaround method to convert physical RDM to VMDK without powering off the virtual machine.

This Workaround  procedure is 3 Step Process

  1. Delete the Physical RDM Disk  from virtual machine (Delete from Disk option .  This will only delete RDM mapping file and  will not delete the data in the RDM. Refer VMware article for more information)
  2. Re-add the RDM LUN as virtual RDM disk
  3. Storage VMotion the virtual RDM disk by changing disk format to either Thick or Thin to convert RDM to VMDK.

Let’s Explain this 3 step process step by step for better understanding.

My virtual machine is attached to Physical RDM disk (1 TB) (Hard disk 3)

Remove the RDM disk from the virtual machine, and delete it from disk to ensure that the RDM mapping file is deleted. This will not delete the data in the RDM.

Re-add that RAW LUN to the virtual machine. Virtual Machine -> Edit Settings -> RDM Disk -> Add

Select the RAW LUN to add it as virtual RDM disk. Click ok.

Select the Compatibility Mode as “Virtual” and click Ok.

 

Once the same RAW Lun is added back as virtual RDM, you can select disk format as Thin or Thick during storage vMotion to convert Physical RDM disk to VMDK without powering off the virtual machine.

 

Convert Physical LUN to VMDK using VMware Converter

I hope we are now clear on how to covert RDM to VMDK in VMware virtual machine. What if the physical server is attached to the RAW LUN and how do you convert the physical RAW LUN as VMDK virtual disk?. This may be needed when you are performing the P2V migration of physical server to VMware virtual machine.

In the below example, you can see the physical windows server is connected to the RAW physical LUN directory to windows server.  RDM1 (1 TB) is physical LUN which is connected to windows server directly and mounted it as the windows drive.

You can convert the physical RAW LUN to VMDK during P2V migration using VMware Converter. You can modify the destination virtual machine disk layout for the respective physical LUN attached to the windows server.

In my below example, 1 TB drive is actually consuming 7.75 GB out of 1 TB. I can reduce the size of the disk during P2V migration and also change the format of the disk type to either Think or Thick.

Once the P2V migration is completed for this VM using VMWare Converter. The converted virtual machine will be attached the VMDK instead of RAW LUN. You will be ready to power off the physical server and reclaim the RDM LUN attached the physical server.

I hope the article will be informative for you. Thanks for Reading!!!. Be social and share it with social media, if you feel worth sharing it.

Exit mobile version