Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

How to convert RDM disk (Raw Device Mapping) to VMDK

In my previous article I shown Adding and sharing RDM disk to multiple VMs in VMware step by step, I received one related task to convert virtual machine RDM (Raw device mapping) hard disk to VMDK disk. Basically I require it to convert because, I was not going to use microsoft clustering anymore, also I was planning to change backend storage due to end of life. To complete this task, you have to just vMotion the rdm disk to another datastore changing disk type. Before doing it make ensure  RDM disk compatibility mode must be Virtual mode, (Physical RDM disk cannot be changed VMDK). Here I have one with Physical RDM, To convert it to Virtual, go to VM edit settings, and expand the hard disk information. Click remove cross button on the same.

vmware vsphere esxi virtual machine rdm raw device mapping disk vmdk convert hard disk phyiscal compatibility mode, physical lun virtual device node iscsi, vm edit settings

Once hard disk remove is pressed, Check the box Delete files from datastore, Note, this device will be removed. but it is safe to remove, as you are just removing RDM pointer file, actual data is still on remote storage device. Click OK button to proceed.

vmware vsphere esxi virtual machine vm edit settings harddisk rdm convert to vmdk remove datastore, vml, compatibility mode physical

Now add same lun as new RDM hard disk, which still has data and change it's compatibility mode to Virtual. Click Ok.

For more on adding new RDM check Adding and sharing RDM disk to multiple VMs in VMware step by step.

vmware vsphere esxi virtual machine vm edit settings, new hard disk, add rdm, raw device mapping compatibility mode virtual disk vml, convert rdm to vmdk easy process

Next right click virtual machine and from VMs actions context menu click Migrate, in the wizard select the migration type to change storage only. (Migrate the virtual machines's storage to a compatible datastore or datastore cluster)

vmware vsphere esxi migrate storage vmotion, change storage, convert RDM to raw device mapping easy way, raw lun, migrate type

In the next select storage here I can move entire VM to different datastore, but I am migrating only RDM disk, for this click Advanced button. From here select the new storage location for RDM and next change disk format to any of the one from 3 type - Thick provision lazy Zeroed, Thick provision eagar zeroed and Thin provision. I am selecting thin. Make sure compatibility checks succeeded and it is green. On the next ready to complete review the changes and click finish to start migration.

vmware vsphere esxi vm virtual machine storage migration vmotion, select storage datastore hard disk format, RDM raw device mappping thin, thick provision.png

This will take time based on disk size. Here you can see the Recent Tasks has Relocate virtual machine is completed.

vmware vsphere esxi vm virtual machine vmotion migrate relocate virtual machine recent tasks status completed validation succeeded successfully

Now, again going to Edit settings of virtual machine, I see disk is VMDK now with type Thin provision. To reclaim raw disk back, Rescan datastores on esxi hosts. 

vmware vsphere esxi vm, virtual machine edit settings hard disk convert rdm to vmdk raw device mappping vmdk, shared type, extend vmdk

Useful articles
POWERCLI: VMWARE ESXI CONFIGURE (VSWITCH) VMKERNEL NETWORK PORT FOR ISCSI STORAGE
POWERCLI VMWARE: CONFIGURE SOFTWARE ISCSI STORAGE ADAPTER AND ADD VMFS DATASTORE
POWERCLI: VIRTUAL MACHINE STORAGE MIGRATE/SVMOTION AND DATASTORE PORT BINDING MULTIPATHING
Emulate HDD as SSD flash disk on Esxi and VMware workstation

Go Back

Comment

Blog Search

Page Views

11240542

Follow me on Blogarama