This article provides guidance on how to migrate vmkernel networking from a vSphere Distributed Switch to a Virtual Standard Switch.
Sometimes if you have a need to remove an ESXi host from vCenter inventory and then add it back again, you will need to migrate the Management vmkernel adapter to a standard vSwitch.
This is because when you remove an ESXi host from Inventory, that is using a vDS for networking to the Management vmkernel, the act of removing the host from Inventory will also remove the ESXi host from the vDS from a vCenter perspective.
Because of this, you will need to first migrate the Management vmkernel networking to a standard vSwitch, so you can then properly re-adjust the vDS in vCenter after the ESXi host has been removed and re-added.
For this example, assume the following scenario:
STEPS TO ACHIEVE THE MIGRATION OF A Management VMkernel Adapter of an ESXi host from a Virtual Distributed Switch to a Standard Switch
"esxcli network vswitch dvs vmware list"
."esxcfg-vswitch -Q <vmnic> -V <uplink port ID> <dvS-name>"
, where <vmnic> would be vmnic1, in this case, the <uplink port ID> would be the number obtained in step 2) above, and <dvS-name> is the name of the vDS. "esxcli network vswitch standard uplink add -u vmnic1 -v vSwitch0"
"esxcfg-vmknic -l"
), the IP address of the default gateway for the Management vmkernel (Use command "esxcfg-route -l"
), and the VLAN ID presently configured (Use command "esxcfg-vswitch -l"
, make a note of the dvPort number associated with the Management vmkernel interface, and then look in the output of command "net-dvs -l | less"
for the VLAN number configured for that dvPort number associated with the Management vmkernel interface)"esxcli network vswitch standard portgroup add -p "Temp_vmk0" -v vSwitch0"
"esxcli network vswitch standard portgroup set -p "Temp_vmk0" -v NNNN"
(where NNNN is the number obtained in Step 6 above)."esxcli network ip interface remove -i vmk0"
"esxcli network ip interface ipv4 set -i vmk0 -I ###.###.###.### -N 255.255.255.0 -g ###.###.###.### -t static "
(where the entries after "-I" and "-g" are the settings obtained in step 6 above."esxcfg-route -a default ###.###.###.###"
where the entry for "###.###.###.###" is the IP address used for the "-g" entry in step 11 above.
If at any time you do not get the results expected as above, please STOP and log a case with Broadcom Support, Networking team.