Adding an ESXi host to a distributed switch fails with error: "Cannot complete a vSphere Distributed Switch Operation for one or more host members"
search cancel

Adding an ESXi host to a distributed switch fails with error: "Cannot complete a vSphere Distributed Switch Operation for one or more host members"

book

Article ID: 437956

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • Adding ESXi host to a distributed switch fails with error: "Cannot complete a vSphere Distributed Switch Operation for one or more host members"
  • Following alert observed for the respective host on NSX:
    "Waiting to connect to managers" and " Heart beating between NSX management node and host is down"
  • Reviewing NSX configuration on the affected host shows stale entries of vmkernel adapters:


Environment

VMware NSX

Cause

When registering with the NSX Management plane, the host runs command 'localcli network ip interface list'  to retrieve its own vmk information. This command will fail with error "Cannot find portset associated with the connection point" if a vmk contains a stale reference to an NVDS that no longer exists on the host.
 
Example:
[root@host:~] localcli network ip interface list
Errors:
Cannot find portset associated with the connection point 
[root@host:~]

Resolution

Identify and remove the stale NVDS references on any vmks.

  • On the ESXi host, run command   esxcfg-vmknic -l and compare the output with host networking information in vCenter
  • Note the vmk# (name) of any interface that does not match what is in vCenter and should show 'false' under the Enabled column.
  • Run command esxcli network ip interface remove --interface-name=<vmk#>  // using the name(s) of noted stale vmk's instead of vmk#
  • Reboot the host
  • In the NSX Manager UI, select the host and configure it for NSX again. Expect to still see 48% progress for several minutes.

You will be able to successfully add the host to the distributed switch after the NSX error is resolved.