VMware ESXi 7.0
VMware ESXi 8.0
VMware NSX
This is caused by incorrect method of removing NSX VIBs
The following workaround requires a reboot of the ESXi host.
Best used when the host is in maintenance mode, and the cluster can tolerate one node down for vSAN/Storage array.
Remove LACP configuration from the uplink switch ports that will be assigned to the standard switch (ESXi standard switch does not support LACP).
Access the host console/DCUI.
Switch to Shell: Press Alt+F2.
Log in as the root user.
Run the following command:rm -f /etc/vmware/dvsdata.db
Reboot the host.
Log in again to Shell as the root user through the host console.
Run the net-dvs command.
If the error message no longer appears, continue with the steps below.
Run the following command to add a new standard switch:esxcli network vswitch standard add --vswitch-name=vSwitch0
Use esxcli network nic list to view available vmnics.
Example: vmnic0 is used.
Add the uplink to the standard switch:esxcli network vswitch standard uplink add --uplink-name=vmnic0 --vswitch-name=vSwitch0
Create a portgroup for the management network:esxcli network vswitch standard portgroup add --portgroup-name=management --vswitch-name=vSwitch0
If the management network is on a VLAN, set the VLAN ID:esxcli network vswitch standard portgroup set --portgroup-name=management --vlan-id <VLAN-ID>
Remove the vmk0 interface:esxcli network ip interface remove --interface-name=vmk0
(Note: vmk0 is typically used for management.)
Re-add the vmk0 interface to the management portgroup:esxcli network ip interface add --interface-name=vmk0 --portgroup-name=management
Set the static IP for vmk0:esxcli network ip interface ipv4 set --interface-name=vmk0 --ipv4=<ipaddress> --netmask=<netmask> --gateway=<gatewayip> --type=static
If necessary, add an interface tag:esxcli network ip interface tag add --interface-name=vmk0 --tagname=Management
Test management interface connectivity by pinging from and to another ESXi host.
If pings to the other ESXi host succeed but not the other way around, check the default route:
List existing routes: esxcli network ip route ipv4 list
Add default route if necessary: esxcfg-route -a default <default-gateway-ip>
Use vCenter UI to locate the ESXi host.
Go to Configure > Networking > Virtual Switches.
Remove any stale distributed switches.
Disconnect the host and remove it from inventory in vCenter.
Re-add the host to the cluster.
Go to Networking and add the required vDS to the host.
Ensure at least one uplink for vSwitch0 to maintain management interface connectivity.
If moving the management network back to a vDS, do the following:
Select the desired vDS from the host Virtual Switches view.
Use Migration Networking for the selected vDS.
Assign the portgroup used for management in the vDS to VMK0.
Verify management network connectivity.
Re-assign the remaining uplinks from vSwitch0 to the desired vDS.
After completing the workaround, the ESXi host should be functional again.