I recently set out to recreate my vCenter installation since I was still running on Windows Server 2003 R2 64-bit and wanted to the set it up on Windows Server 2008 R2. The problem here was that my Management Network was attached to a dvSwitch (Distributed Virtual Switch). I’ll briefly outline the process of how I removed each host (3 hosts in total) from vCenter, attaching the host to the brand new vCenter installation with only about 10 minutes total virtual machine (VM) downtime. This can actually be done with no downtime if planned properly and aware of the possible hiccups.
The new environment is now up and running, and after refining the process (poking around a lot), it only takes about 10 minutes to move each host. This was done on vSphere 5 (moving from vSphere 5 to Update 1).
I won’t go into specific detail on each process as I’m assuming you have some familiarity with what you’re doing, and the processes are well documented in the vSphere documentation and blogs all around the Internet.
My configuration consists of:
– 3 hosts
– 4 NICs per host (2x Management Network and Internal, 1x Perimeter Network, 1x Test Network)
– 2 vCenter Servers (1x old, 1x new) both running virtually on the hosts to be moved
I took on 1 host at a time trying to get the process right.
NOTE: When migrating the host containing the vCenter VM(s), make sure that they are on a vSwitch that has physical network access to the same network as the dvSwitch. Also make sure that the Windows Firewall, if using Windows for vCenter, is either off or set to allow all traffic for Domain, Private, and Public inbound traffic. Remember to re-enable to firewall when done.
Step 1. Identify and recreate the dvSwitches on the target environment. This is also a good time to remove or consolidate port groups that have been created due to sprawl.
Step 2. Manually remove NICs associated with dvSwitches on vCenter (old) EXCEPT for the management network, attach them to vSwitches that are local to the host and update vNICs on any affected VMs. If your vCenter is attached to one of these networks, you may have to log on to the host directly to make changes.
NOTE: Hosts cannot see dvSwitches that they have not been added to or have been removed from in vCenter, so losing vCenter (new) access while migrating vCenter’s host may cause headaches if not planned for properly.
Your current situation should be: NICs assigned to vSwitches on the host with the exception of the Management Network. All VMs should still be reachable.
Step 3. Physically on the server or via KVM, iLO, etc, using the ESXi interface (NOT the vSphere client), log in and select Restore Standard Switch. This will only affect the management network, which is exactly what you want. This will remove all NICs associated with the management network from the dvSwitch placing them on a vSwitch. There should be no interruption in your connection. Again, update any vNICs on affected VMs if your management network NICs were also associated with a VM network.
Step 4. You can now go into vCenter (old) and remove the host from the dvSwitch. This is required because you cannot cleanly remove a host from vCenter while it is attached to a dvSwitch. (Home > Inventory > Networking > select dvSwitch > select Hosts tab > right-click host and choose Remove…). If you have any problems removing the host due to ports still being attached, you can force it – see Step 4a. After removing the host from all dvSwitches, you should now be able to remove the host from vCenter.
Step 4a. If you encounter a scenario that prevents you from either removing the host from the dvSwitch or removing the host from vCenter, you can remedy this by logging on to the host directly using the vSphere client. After doing so, on the host’s summary tab, scroll to the bottom and select Disassociate host from vCenter Server.
Step 5. Add host to vCenter (new).
Step 6. Migrate NICs and VMs to the new dvSwitches on the new vCenter.
Rinse and repeat as necessary.
I hope this helps someone out since I ran into a few of the mentioned gotcha’s while doing this. Server 1 was a nightmare, Server 2 was a bad dream, Server 3 took me 10 minutes.
Any suggestions / comments to make this process easier?