Normally people want to migrate from virtual standard switches to distributed switches. I am a huge fan of the distributed switch and feel it should be used everywhere. The distributed switch becomes a challenge when you want to migrate hosts to a new vCenter. I have seen a lot of migrations to new vCenters via detaching the ESXi hosts and connecting to the new vCenter. This process works great assuming you are not using the distributed switch. Removing or working with VM’s on a ghosted VDS is a real challenge. So remove it before you migrate to a new vCenter.
In this multi-article solution I’ll provide some steps to migrate off a VDS to a VSS.
- Article 1: Creating a VSS and migrating the virtual machines
- Article 2: Migrating the host off the VDS
- Article 3: Migrating the host to a new vCenter and back into the distributed switch
Article 2: Migrating the host off the VDS. In the last article we moved all the virtual machines off the VDS to a VSS. We now need to migrate the vMotion and management off the VDS to a VSS. This step will cause interruption to the management of a ESXi host. Virtual machines will not be interrupted but the management / will be. You must have console access to the ESXi host for this to work. Steps at a glance:
- Confirm that a switch port exists for management and vMotion
- Remove vMotion, etc.. from VDS and add to VSS
- Remove management from VDS and add to VSS
- Confirm settings
Confirm that a switch port exists for management and vMotion
Before you begin examine the VSS to confirm that management and vMotion port groups were created correctly by Article 1's script. Once your sure the VLAN settings for the port group are correct then you can move to the next step.
Remove vMotion, etc.. from VDS and add to VSS
Login to the ESXi host via console and ssh. (Comments are preceded with #)
Align you vmk# with vCenter to identify which adapter provides the function (vmk0 management, vmk1 vMotion, vmk2 FT)
Remove management from VDS and add to VSS
Remove management (this stage will interrupt management access to ESXi host – make sure you have console access) You might want to pretype the add command in the console before you execute the remove.
You will need to login to the console go to troubleshooting options -> Enable ESXi Shell
Press Alt-Cntr-F1 to enter shell and login
esxcfg-vmknic -d -v 679
Add management to VSS:
esxcfg-vmknic -a -i 192.168.10.16 -n 255.255.255.0 -p PG-Mgmt
Ping the host to ensure networking has returned to management.
Go to the host in vCenter and select dvs it should provide a remove button.