Sometimes it becomes a tedious job to for VMware administrators to migrate the virtual machines across the hosts. In this blog post we will see how to migrate virtual machines having RDM attached to it.
Mostly the RDM VMs are configured with Microsoft Cluster having minimum of two nodes.
1) Active Node
2) Passive Node.
If the hardware version is greater than 10, VMs can be migrated without shutting down it but if the hardware version is less than 10, It needs to be shutdown.
You should involve support team to fail-over the resources from the node you are going to migrate. This way you can avoid any unnecessary outage.
Also if you are removing the RDM from the virtual machine during the datastore expansion, you might lose the data from the disk associated with the virtual machine. To prevent the data loss you can do the following things:
- Let the support team know about the activity. If they are doing the datastore expansion, abort your migration.
- Remove the device that has an issue from all the ESXi hosts on the cluster temporarily.
Migrating a virtual machine with RDMs can be done either three ways:
- Warm Migration (vMotion), with the virtual machine powered on.
- Cold Migration, with the virtual machine powered off.
- Storage Migration (Storage vMotion), with the virtual machine powered on.
When you do the vMotion of the virtual machine, It just moves the compute resources from the current host to destination without affecting the RDMs and disk files. It does not require any downtime on the virtual machine.
In cold migration, virtual machine needs to be shutdown. If you are migrating the VM files also, All non-RDM VMs files will move to destination host including virtual machine configuration file. However, RDMs files do not move automatically because it is physical storage but pointer file (RDM) can be reallocated to destination host.
When migrating RDM files, It creates a new .vmdk file exactly the RDM disk files at destination host. We can say it clones the same files at new host. And leave the current source intact. It does not allow virtual machine to read or write instead it uses the new disk.
Normally we do not do that either we de-attach the RDM disk from the source VM(do not delete it) and then migrate the VM, re-attach to disk on VM at the destination host. This is simple and does not require to create any .vmdk file. While migrating the files you can change the storage type of datastore.
In the whole process of migration Virtual Machine Files are untouched only virtual machine registration happens at destination host.
When you perform Storage vMotion, the virtual machine files are physically relocated to a destination datastore. The destination host retains the ownership and registration of the virtual machine after Storage vMotion completes.
- Virtual disks and virtual mode RDM pointer files can be relocated to the destination datastore.
- Physical mode RDM pointer files can be relocated to the destination datastore, but physical mode RDM data cannot be migrated to a VMDK disk using Storage vMotion.
- When migrating Physical mode RDM pointer files that are greater than 2TB using Storage vMotion, you must use the vSphere Web Client.
- Physical mode RDM data can be migrated to VMDK disks only via cold migration.
- If using N-Port ID Virtualization (NPIV), Storage vMotion is not supported.
- Storage vMotion of virtual machines using virtual compatibility mode RDMs is supported. However, clustered applications or clustered virtual machine configurations do not support Storage vMotion.
Virtual Machine Hardware Version Guide
[Also read] What is VMware RDM?