Goal : We need to migrate 200 Windows XP/Windows server 2003 VM’s from one vCenter (say vCenterA vSphere 4.0) to another vCenter (vCenterB vSphere 5.0)
Part 1 ( one Script):
We are in a situation to migrate around 200 XP/windows 2003 VM’s from one vCenter (say vCenterA vSphere 4.0) to another vCenter (vCenterB vSphere 5.0) in another geographical location. Our game plan of Part 1would be moving all the VMs to the transport LUN (shared datastore between source & destination vCenter hosts (DatastoreB)) (Say RPA lun which is enables access to the source & the destination vCenter hosts ). Once confirmed all the VM’s are moved to the transport LUN we will be power off the VM & unregistering all the 200 VM’s from the source vCenter (vCenterA vSphere 4.0).
Part 2 (another Script):
All the unregistered VM’s in the RPA LUN (say (DatastoreB))) We will be registering it to the hosts in the specific cluster (say Cluster_1) in the destination vCenter (vCenterB vSphere 5.0). Once confirmed all the 200 VM’s are registered in the destination vCenter, We will be changing the VM network for all the VM’s to different DHCP VLAN (VLAN say VLAN 15).
Once confirmed all the VMs are assigned with the new VM network (VLAN 15), We will be powering on all the VM’s in the specific interval (say sleep time 10 Seconds).
Once all the VM’s are powered on we need to upgrade the VMware tools to the current version (Tools Version 8389) and reboot all the VM’s. Once the VM’s are powered on we will be shutting down all the VM’s to upgrade the VM hardware version (say 4VM 4.0 or 7.0) to the current version (VM hardware version 8.0).
Once confirmed all the VM hardware’s are upgraded to the current version we will be powering on all the 200 VM’s sequentially (say in sleep interval 10 sec) & reboot it if the hardware upgrade requires reboot.
Finally we have to ipconfig/release & renew at the guest OS level.