This guide will help you build a temporary Standard Switch where you will connect vCenter to recover from the network down scenario. Then you can make the necessary changes in the DVS to return to a good state.
Most of the steps are only possible via command line.
Symptoms:
Addition or reconfiguration of network adapters attached to non-ephemeral distributed virtual port groups is not supported.
If vCenter is connected to a Distributed Switch and it loses network access, vCenter is not able to connect to a Distributed Port because it does not have access to the ESXis.
VMware recommends that you configure Ephemeral Ports for Management Network in your environment to avoid this issue from happening again. For more information: Static (non-ephemeral) or ephemeral port binding on a vSphere Distributed Switch (1022312)
***Please note if you have LACP configured on your physical switch you will need to temporarily break the LACP configuration so you can remove a NIC from the vDS to be available for the vCenter to use on the standard switch (unless you have non-LACP NICs available and configured to pass the traffic). If you do not break the LACP configuration before moving the NIC off the vDS this can cause further issues to your environments connectivity***
***Please also ensure before proceeding you have access to the DCUI/iLO/iDRAC for the host you'll be performing the below steps***
Follow this Step-by-Step guide:
esxcli network vswitch dvs vmware list | egrep "Client: vmnic#" -A3
Sample output
esxcli network vswitch dvs vmware list | egrep "Client: vmnic1" -A3
Client: vmnic1
DVPortgroup ID: dvportgroup-5008
In Use: true
Port ID: 12
esxcfg-vswitch -Q vmnic# -V PortID DVSName
Example using vmnic1, Port ID 12 and DVS Name ProdSwitchDVS:
esxcfg-vswitch -Q vmnic1 -V 12 ProdSwitchDVS
esxcli network vswitch standard add --vswitch-name=vSwitchName
esxcli network vswitch standard portgroup add --portgroup-name=PortgroupName --vswitch-name=vSwitchName
esxcli network vswitch standard uplink add --uplink-name=vmnic --vswitch-name=vSwitchName
You have now successfully recovered vCenter’s network connectivity and the environment should be up and running.
Static (non-ephemeral) or ephemeral port binding on a vSphere Distributed Switch (1022312)
Configuring vSwitch or vNetwork Distributed Switch from the command line in ESXi/ESX (1008127)
Impact/Risks:
There should be at least 2 vmnics used for the Management Network because in one of the steps we will remove one vmnic from the DVS Management Portgroup so that we can use it for the Standard Switch that we will create temporarily.
NOTE: If the vmnics are in an LACP configuration, that will need to be broken on the physical switch to avoid downtime. Follow this KB Enable EtherChannel / Link Aggregation Control Protocol (LACP) in ESXi/vCenter (broadcom.com) for steps on how to work with an LACP configuration.
If you do not have 2 vmnics in the ESXi, it is recommended that you follow these steps via DCUI Shell. Otherwise, you will lose access to SSH when you run the remove vmnic command and won’t be able to continue with the process.