Repair disconnected vCenter Server when no ephemeral portgroup is available

Repair disconnected vCenter Server when no ephemeral portgroup is available

The problem

I had the issue with a crashed vCenter Server which was configured on an non-ephemeral portgroup and was disconnected. As the vCenter Server was down, and the portgroup was a non-ephemeral one, no new ports could be allocated. In that particular case a new standard vSwitch has to be created, vCenter needs to be connected to the VSS for the boot process, until it can be reconnected to the vDS again.

 

The solution

Here is the procedure I used in this situation:

  1. Verify that the vCenter is down and the NIC is not connected to the portgroup
  2. Connect via ssh to the host (e.g. using PuTTY). Note that if ssh is not enabled on the host, it has to be enabled first.
  3. Create a new vSwitch to be used to temporarily connect the vCenter

esxcfg-vswitch -a vSwitch0

  1. Create a new PortGroup

esxcfg-vswitch -A VMNetwork vSwitch0

  1. List the vSwitches and vDS to get the ID of the vmnic to remove from vDS

[root@hostname:~] esxcfg-vswitch -l

Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch0         11776       1           128               1500

PortGroup Name        VLAN ID  Used Ports  Uplinks
VMNetwork            1      0

DVS Name         Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vDSname   11776       12          512               9000    vmnic0,vmnic2

DVPort ID           In Use      Client
42                  1           vmnic0
43                  1           vmnic2
5                   1           vmk0
18                  1           vmk1
8                   1           vmk2
  1. Remove vmnic0 from the vDS:

esxcfg-vswitch -Q vmnic0 -V 42 vDSname

  1. Add vmnic0 to vSwitch0:

esxcli network vswitch standard uplink add --uplink-name=vmnic0 --vswitch-name=vSwitch0

  1. Start vCenter Server in the host client
  2. Once the vCenter is up, clean up the temporary configuration:

– Connect the vCenter to the Portgroup on the vDS again. Note that to avoid this issue in future, the portgroup for the vCenter should be ephemeral.
– Reconnect vmnic0 to the vDS
– Remove the temporary VSS (vSwitch0) and the portgroup

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.