I accidentally used the wrong VLAN on a portgroup in vDS while playing with NSX-T.(long story) This caused vCenter to lose access to all the hosts in a cluster.
There is a KB article that goes through a few hoops before we can get the hosts back into vCenter Server., Recovering from a management portgroup VLAN misconfiguration on a vNetwork Distributed Switch (vDS)
To resolve the issue,
As i still had access to vCenter, after configuring the right vlan in vCenter i used net-dvs to manually change the vlan on each vmkernel interface.
Note: net-dvs is not a supported command and can cause the dvswitch to go out of sync.
First, get the port number that the vmkernel interface is connected to, using the command
esxcfg-vmknic -l
Image may be NSFW.
Clik here to view.
From the above command, I wanted to change the vlan for vmk1.
vmk1 is connected to port 21 on the dvswitch.
To change the VLAN of the vmkernel interface, use the command.
net-dvs -v -p vDS_Name
For eg.
net-dvs -v 100 -p 21 MgmtDVS
There is a KB article that goes through a few hoops before we can get the hosts back into vCenter Server., Recovering from a management portgroup VLAN misconfiguration on a vNetwork Distributed Switch (vDS)
To resolve the issue,
As i still had access to vCenter, after configuring the right vlan in vCenter i used net-dvs to manually change the vlan on each vmkernel interface.
Note: net-dvs is not a supported command and can cause the dvswitch to go out of sync.
First, get the port number that the vmkernel interface is connected to, using the command
esxcfg-vmknic -l
Image may be NSFW.
Clik here to view.
From the above command, I wanted to change the vlan for vmk1.
vmk1 is connected to port 21 on the dvswitch.
To change the VLAN of the vmkernel interface, use the command.
net-dvs -v
For eg.
net-dvs -v 100 -p 21 MgmtDVS