Convert RDM to VMDK
In preparation for a SRM project we had to check and migrate all RDM files to VMDK.
Check which VM has RDM using PowerCLI
Get-VM | Get-HardDisk -DiskType “RawPhysical”,”RawVirtual” | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName
Verify how RDM is connected
Edit the settings of the virtual machine in the VMware web client (while the machine is running) to verify if the RDM is connected physical or virtual.
The field compatibility tells how the RDM is connected, Physical or Virtual
Convert Physical RDM to VMDK
A physical connected RDM cannot be converted online to a VMDK. Before that we need to convert the Physical RDM to a Virtual RDM. (VMware KB)
- Write down the drive letter of the disk in the guest OS
- Stop the Virtual Machine by doing a shutdown of the guest OS
Note-down the LUN ID of the RDM by going into the multipath settings of the RMD connected to the VM
Remove the RDM, and check “Delete fr
Re-Add the RDM but change the compatibility mode to Virtual. Be sure the RDMs are connected to a separate SCSI-Controller (VM-PARAVIRTUAL). Select the same LUN ID as the LUN disconnected.
- Power on the virtual machine
Go into storage management and check if the disk is online. Default it will be offline, bring it back online and connect it to the correct drive letter.
- No your server is up and running with a Virtual RDM wich can be migrated online to a VMDK (see Convert Virtual RDM to VMDK)
Convert Virtual RDM to VMDK
A Virtual connected RDM can be migrated to a VMDK while the machine is running. (VMware KB)
Check if the RDM is connected virtual. Edit the VM settings and check compatibility mode of the disk
Start the Storage migration of the virtual machine
Be sure you change the disk mode to Thin or Thick provisioned.
- If you select “Same format as source” then the RMD link file will be moved and NO migration to VMDK will happen.
If needed you can select this setting for each disk (and VMX config file) if you go into the advanced
Change the setting for each individual disk and start the migration
- After the migration check the disk to see it is a VMDK and not a RDM.