This guide will help you build a temporary Standard Switch (vSS) where you will connect vCenter VM to recover from a port disconnection/network down scenario.
When vCenter is online again, you can make the necessary changes in the distributed switch (vDS) and reconnect vCenter there.
Most of the steps are only possible via command line.
Addition or reconfiguration of network adapters attached to non-ephemeral distributed virtual port groups is not supported.
If vCenter to host communication is lost, VMs will not be able to be reconfigured to static (also known as non-ephemeral) port groups on the vDS because vCenter is unavailable to give the VM a port binding.
VMware recommends that you configure an Ephemeral Port Binding dvportgroup for your VC's management network in your environment to avoid this issue from happening again.
For more information, see: Static (non-ephemeral) or ephemeral port binding on a vSphere Distributed Switch.
***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; in order to be available for the vCenter VM 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 environment's connectivity***
***Before proceeding, please also ensure you have access to the DCUI/iLO/iDRAC for the host you'll be performing the below steps***
esxcli network vswitch dvs vmware list
Sample output:
Name: vDSName
VDS ID: ########
Class: vswitch
Num Ports: ####
Used Ports: ##
Configured Ports: ##
MTU: 9000/1500
CDP Status: listen
Beacon Timeout: -/+#
Uplinks: vmnic#, vmnic#
VMware Branded: true
DVPort:
Client: vmnic#
DVPortgroup ID: dvportgroup-###
In Use: true
Port ID: ##
esxcfg-vswitch -Q vmnic# -V PortID# vDSName
Example using vmnic1, Port ID 12 and vDS Name ProdSwitchvDS:esxcfg-vswitch -Q vmnic1 -V 12 ProdSwitchvDS
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
Configuring vSwitch or vNetwork Distributed Switch from the command line in ESXi
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 vDS Management Portgroup so that we can use it for the Standard Switch that will be 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 for steps on how to work with an LACP configuration.
If you have less than 2 vmnics in the vDS, 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.