Migrating VMware VMs from old VMware Infrastructure to new

I was part of a big migration project for a customer who has different types of VMware VMs:

  1. Regular VMs with just VMDK
  2. VMs with Physical mode RDMs
  3. VMs with Physical mode RDMs for Microsoft Clustering

These VMs had to be migrated from exiting vSphere 6.5 environment to new vSphere 7.x/8.x environment.

Note: Both the old and new infrastructure was having the same storage presented, however customer wanted to use different datastores for migration (in the destination). RDMs didn’t matter here cause it was anyways part of the same storage. And the end goal for RDMs was to converted to VMDK (for VMs with Physical mode RDMs) and Shared VMDK (for VMs with Physical mode RDMs for Microsoft Clustering)

In this blog I have written two methods to migrate VMs either using VMware flings- Cross vCenter Workload Migration Utility and Advanced Cross vCenter vMotion (built into vCenter)

We can also use method like presenting a common shared storage between both the environment and unregister VM in source and register in destination and migrate to actual end datastore.

Migration & Conversion Steps

Prerequisites for migration of VMs

  • Prepare the list the of VMs to be migrated in different waves
  • Prepare the swing host with standard switch and required port groups
  • Swing host should have access to shared storage to onboard VMs
  • Downtime of VMs might be required in various scenarios:
    • While moving the VMs to swing host, if live vMotion cannot be performed
    • Because of EVC mode features the VM might need cold migration in destination
    • VMs with physical mode RDM with Windows Failover Clustering
    • To upgrade VMware Tools or Virtual Hardware version to latest
  • Prepare clustered VMDK datastore in 7.0 environment with all the requirements met as per document mentioned here:

https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.wsfc.doc/GUID-97B054E2-2EB0-4E10-855B-521A38776F39.html

  • Both source and destination vCenter Server/ESXi hosts must be in same network or routable network.
  • Destination vCenter should have all the required virtual port groups created with appropriate VLAN etc.
  • Appropriate credentials for ESXi hosts, vCenter Servers & VMs etc.
  • It is always recommended to ensure the VMs which are being migrated has full backup for the latest date.
  • For any VM migration with RDM or RDM with Windows Clustering before migration/conversion or remove of RDM, it’s always recommended to take screenshot of the RDM disk settings – specially the SCSI Controller.
  • Deploy Cross vCenter Workload Migration Utility (flings) either in source or destination vCenter infrastructure (if we are going with this option instead of Advanced Cross vCenter vMotion option built in in 7.x)
  • Register both the vCenter (Source and Destination) in the cross vCenter migration utility.
  • For Advanced Cross vCenter vMotion option source vSphere (vCenter and ESXi) instances should be 6.5 or greater and Enterprise Plus Licensing for ESXi host.
  • Ports to be opened between source and destination vCenter Server 8000, 443 and 902.


Migration of VM with only VMDKs (No RDMs)

Swing host approach:

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • vMotion the identified VMs to the swing host
  • Disconnect the swing host in vCenter 6.5 infrastructure.
  • Connect the swing host in vCenter 7.0 infrastructure.
  • Perform both vMotion and storage vMotion to destination 7.x ESXi host and datastore.
  • Verify the VM and application layer for functionality.

Cross vCenter Workload Migration Utility (flings):

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • Access the Cross vCenter Workload Migration Utility UI.
  • Click on Migrate tab and select the source and target site.
  • Select the other details like source datacenter, Virtual Machines(s), Placement Target, Target Datastore and Network Mapping.
  • Initiate the migration and monitor the task for completion.
  • Verify the VM and application layer for functionality.

 Advanced Cross vCenter vMotion:

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • Make sure the source vCenter Server 6.5 is saved in vCenter Server 7 (this is to select the source vCenter Server during Import VMs option)
  • Right click the target cluster in vCenter Server 7 and select Import VMs option.
  • Select the VMs that needs to be migrated from vCenter Server 6.5 infrastructure.
  • Select the destination parameters like compute resource, storage, folder, network, vMotion priority and click on finish.
  • Once migration is completed, verify the VM and application layer for functionality.

Migration of VM with Physical Mode RDMs without Microsoft Clustering

Swing host approach:

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • vMotion the identified VMs to the swing host
  • Disconnect the swing host in vCenter 6.5 infrastructure.
  • Connect the swing host in vCenter 7.0 infrastructure.
  • If downtime is approved, then shutdown the VM and perform both vMotion and storage vMotion (change the disk format to thick/thin disk) to destination 7.x ESXi host and datastore.
  • Verify if the physical mode RDM is converted to VMDK in edit settings of the VM.
  • Power on the VM, check VM and application layer for functionality.

Note: We can also remove the physical mode RDM from VM and attach it back as virtual mode RDM and perform migration & conversion without downtime. (Experimental)

Cross vCenter Workload Migration Utility (flings):

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • If downtime is approved, then shutdown the VM and remove the physical mode RDM by noting down or taking screenshot of the RDM settings (do not delete from datastore, just remove the RDM)
  • Access the Cross vCenter Workload Migration Utility UI.
  • Click on Migrate tab and select the source and target site.
  • Select the other details like source datacenter, Virtual Machines(s), Placement Target, Target Datastore and Network Mapping.
  • Initiate the migration and monitor the task for completion.
  • Attach the RDM back to VM with the same settings noted down earlier.
  • Perform storage vMotion (change the disk format to thick/thin disk) to another datastore in 7.x infrastructure.
  • Verify if the physical mode RDM is converted to VMDK in edit settings of the VM.
  • Power on the VM, check the VM and application layer for functionality.

Advanced Cross vCenter vMotion:

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • If downtime is approved, then shutdown the VM and remove the physical mode RDM by noting down or taking screenshot of the RDM settings (do not delete from datastore, just remove the RDM)
  • Make sure the source vCenter Server 6.5 is saved in vCenter Server 7 (this is to select the source vCenter Server during Import VMs option)
  • Right click the target cluster in vCenter Server 7 and select Import VMs option.
  • Select the VMs that needs to be migrated from vCenter Server 6.5 infrastructure.
  • Select the destination parameters like compute resource, storage, folder, network, vMotion priority and click on finish.
  • Once migration is completed, attach the RDM back to VM with the same settings noted down earlier.
  • Perform storage vMotion (change the disk format to thick/thin disk) to another datastore in 7.x infrastructure.
  • Verify if the physical mode RDM is converted to VMDK in edit settings of the VM.
  • Power on the VM, check the VM and application layer for functionality.

Migration of VM with Physical Mode RDMs and with Microsoft Clustering

Swing host approach:

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • Shutdown the Cluster service within the windows operating system and power off the VMs.
  • Remove the shared RDM disk from all the nodes expect the primary node. Make sure to take a note of the RDM disk settings before removing. (do not delete from datastore, just remove the RDM)
  • vMotion the identified VMs to the swing host
  • Disconnect the swing host in vCenter 6.5 infrastructure.
  • Connect the swing host in vCenter 7.0 infrastructure.
  • Verify the destination datastore in vSphere 7 infrastructure is enabled with clustered VMDK.
  • Perform vMotion & Storage vMotion of the primary VM, make sure to choose “Thick Provision Eager Zeroed” (Configure per disk option) for all the RDM disk and destination datastore should be clustered VMDK. For non-RMD disks you can choose regular datastore.
  • Perform vMotion & Storage vMotion of all the secondary nodes part of windows cluster.
  • Go to edit settings of all the secondary nodes and attach the existing converted shared disks from the primary node VM folder. (Use the same SCSI controller details)
  • Review the disk for all the nodes to make sure all are on VMFS datastore and the SCSI controller details are correct.
  • Power on all the nodes and validate the cluster within Windows is online, also the disk and nodes are online.
  • Try to failover to see if the clustering functionality works fine.

Cross vCenter Workload Migration Utility (flings):

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • Shutdown the Cluster service within the windows operating system and power off the VMs.
  • Remove the shared RDM disk from all the nodes. Make sure to take a note of the RDM disk settings before removing. (do not delete from datastore, just remove the RDM)
  • Access the Cross vCenter Workload Migration Utility UI.
  • Click on Migrate tab and select the source and target site.
  • Select the other details like source datacenter, Virtual Machines(s), Placement Target, Target Datastore and Network Mapping.
  • Initiate the migration and monitor the task for completion.
  • Attach the shared RDM only to the primary node, making sure of the same SCSI controller details.
  • Verify the destination datastore in vSphere 7 infrastructure is enabled with clustered VMDK.
  • Perform vMotion & Storage vMotion of the primary VM, make sure to choose “Thick Provision Eager Zeroed” (Configure per disk option) for all the RDM disk and destination datastore should be clustered VMDK. For non-RMD disks you can choose regular datastore.
  • Perform vMotion & Storage vMotion of all the secondary nodes part of windows cluster.
  • Go to edit settings of all the secondary nodes and attach the existing converted shared disks from the primary node VM folder. (Use the same SCSI controller details)
  • Review the disk for all the nodes to make sure all are on VMFS datastore and the SCSI controller details are correct.
  • Power on all the nodes and validate the cluster within Windows is online, also the disk and nodes are online.
  • Try to failover to see if the clustering functionality works fine.

Advanced Cross vCenter vMotion:

  • Precheck on the identified VMs to be migrated to vCenter 7 infrastructure.
  • Shutdown the Cluster service within the windows operating system and power off the VMs.
  • Remove the shared RDM disk from all the nodes. Make sure to take a note of the RDM disk settings before removing. (do not delete from datastore, just remove the RDM)
  • Make sure the source vCenter Server 6.5 is saved in vCenter Server 7 (this is to select the source vCenter Server during Import VMs option)
  • Right click the target cluster in vCenter Server 7 and select Import VMs option.
  • Select the VMs that needs to be migrated from vCenter Server 6.5 infrastructure.
  • Select the destination parameters like compute resource, storage, folder, network, vMotion priority and click on finish.
  • Once migration is completed, attach the shared RDM only to the primary node, making sure of the same SCSI controller details.
  • Verify the destination datastore in vSphere 7 infrastructure is enabled with clustered VMDK.
  • Perform vMotion & Storage vMotion of the primary VM, make sure to choose “Thick Provision Eager Zeroed” (Configure per disk option) for all the RDM disk and destination datastore should be clustered VMDK. For non-RMD disks you can choose regular datastore.
  • Perform vMotion & Storage vMotion of all the secondary nodes part of windows cluster.
  • Go to edit settings of all the secondary nodes and attach the existing converted shared disks from the primary node VM folder. (Use the same SCSI controller details)
  • Review the disk for all the nodes to make sure all are on VMFS datastore and the SCSI controller details are correct.
  • Power on all the nodes and validate the cluster within Windows is online, also the disk and nodes are online.
  • Try to failover to see if the clustering functionality works fine.