This guide explains how to build a temporary Standard Switch (vSS) to connect the vCenter VM for recovery from a port disconnection or network outage. Once vCenter is back online, necessary changes can be made in the distributed switch (vDS) to reconnect vCenter. This also serves as a supplement to migrate a vCenter from a vSS to a vDS.
Additional Symptoms Reported
|
|
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 by Broadcom recommends to configure an Ephemeral Port Binding dvportgroup for the vCenter's management network in the environment to avoid this issue from happening again.
For more information, see: Static (non-ephemeral) or ephemeral port binding on a vSphere Distributed Switch.
Note: if LACP is configured on the physical switch, the LACP configuration will need to be temporarily broken to remove a NIC from the vDS; in order to be available for the vCenter VM to use on the standard switch (unless non-LACP NICs are available and configured to pass the traffic). If the LACP configuration is not broken before moving the NIC off the vDS, this can cause further issues to the environment's connectivity.
This will require engagement from network team managing upstream switches to change the port config. Refer to Enable EtherChannel / Link Aggregation Control Protocol (LACP) in ESXi/vCenter for steps on how to work with an LACP configuration.
Before proceeding, ensure access to the DCUI/iLO/iDRAC for the host where the below steps will be performed.
There should be at least 2 vmnics used for the Management Network because one of the steps will remove one vmnic from the vDS Management Portgroup so that it can be used for the Standard Switch that will be created temporarily. If there are fewer than 2 vmnics in the vDS, it is recommended to follow these steps via the DCUI Shell. Otherwise, access to SSH will be lost when running the remove vmnic command, preventing continuation of the process.
Note: Most of the steps are only possible via command line.
Port ID#, vmnic#, and vDSName where the vmnic to be removed is connected to the vDS.esxcli network vswitch dvs vmware listSample output:
Name: vDSName
VDS ID: ######## Class: vswitch Num Ports: #### Used Ports: ##
Configured Ports: ##
MTU: 9000/1500
CDP Status: listen
Beacon Timeout: -/+#
Uplinks: vmnicX, vmnicX
VMware Branded: true
DVPort:
Client: vmnicX
DVPortgroup ID: dvportgroup-###
In Use: true
Port ID: ##esxcfg-vswitch -Q <vmnicX> -V <PortIDX> <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>esxcli network vswitch standard portgroup set --portgroup-name=<PortgroupName> --vlan-id <VLAN>First, connect vCenter's virtual machine to the new Standard Switch Portgroup. This will help to regain network access to vCenter. This will also allow the ESXi hosts to connect back to vCenter Server, and management of the infrastructure will be possible again.
Virtual Machines.Save.Confirm that everything appears correct in the vCenter Inventory, navigate to the VDS and utilize the add manage hosts wizard to migrate vCenter and uplink/s back to the vDS and restore the configuration to its state prior to the outage.
Restore the vmnic back to the vDS by following these steps:
Edit Settings.Network Adapter 1 to the Management Distributed Switch Portgroup.OK.Networking tab.Add and Manage Hosts.Manage host networking and click Next.Attached hosts....OK.Next.Manage physical adapters list, select the vmnic and click Assign uplink.Assigned Adapter and click OK.Next.Next in Manage VMkernel adapters.Next in Migrate VM networking.Finish.The temporary Standard Switch created to recover vCenter's network connectivity can now be deleted.
Hosts and Clusters Tab.Configure tab.Virtual Switches under Networking.....Remove.Yes in the warning that pops up.