Unable to remove uplinks from Distributed Switch - "Invalid network policy" "Cannot add portgroup"
search cancel

Unable to remove uplinks from Distributed Switch - "Invalid network policy" "Cannot add portgroup"

book

Article ID: 405728

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

  • In vCenter UI, the operation to remove a vmnic from a DVS fails with the error: "Operations failed, some tasks could not complete."
  • The error  "A specified parameter was not correct" may also be observed. 
  • Hostd.log shows below logs  
info hostd[2100434] [Originator@6876 sub=Hostsvc opID=m8ebdp24-5315867-auto-35xr7-h5:70639722-1d-da-6f5f user=vpxuser:######\######] Invalid NIC order: one of more PNIC specified are not uplinked to vswitch.
info hostd[2100434] [Originator@6876 sub=Hostsvc opID=m8ebdp24-5315867-auto-35xr7-h5:70639722-1d-da-6f5f user=vpxuser:######\######] Invalid NIC teaming policy: invalid NIC order specified.
info hostd[2100434] [Originator@6876 sub=Hostsvc opID=m8ebdp24-5315867-auto-35xr7-h5:70639722-1d-da-6f5f user=vpxuser:######\######] Invalid network policy: invalid NIC teaming policy.
info hostd[2100434] [Originator@6876 sub=Hostsvc.NetworkVmkSimulator opID=#####-5####-auto-####-##:#######-##-##-#### user=vpxuser:#####.####\#######] Cannot add portgroup [<PORTGROUP_name>]: invalid network policy specified:(vim.host.NetworkPolicy) {
-->    security = (vim.host.NetworkPolicy.SecurityPolicy) {
-->    },
-->    nicTeaming = (vim.host.NetworkPolicy.NicTeamingPolicy) {
-->       policy = "loadbalance_srcid",
-->       notifySwitches = true,
-->       rollingOrder = false,
-->       failureCriteria = (vim.host.NetworkPolicy.NicFailureCriteria) {
-->          checkBeacon = false,
-->       },
-->       nicOrder = (vim.host.NetworkPolicy.NicOrderPolicy) {
-->          standbyNic = (string) [
-->             "vmnic#"

 

  • Running the command :  esxcfg-vswitch -l won't show any uplinks assigned to the virtualswitch, while there are uplinks assigned for the portgroup teaming.
Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks   
  vSwitch#             9216                1           128                      1500       <No uplinks on the virtual switch>

  PortGroup Name     VLAN ID    Used Ports                         Uplinks
  ######                        0                   0                                  vmnic#       

Environment

VMware vSphere ESXi 8.0 

Cause

  • A configuration mismatch exists on the portgroup #### where an uplink is defined in the portgroup teaming policy, but the corresponding physical adapter is not assigned to the virtual switch itself.
  • If NetworkSystem.invokeHostTransactionCall is triggered to modify the Distributed Virtual Switch (DVS) while this configuration inconsistency is present, the host daemon (hostd) fails to validate the network state and the change operation fails.

Resolution

To resolve this issue, you must remove the affected portgroup using either the VMware Host Client or the command line.

Remove the Portgroup via the VMware Host Client

  1. Click Networking in the VMware Host Client inventory and select the Port groups tab.
  2. Right-click the portgroup you want to remove and select Remove from the menu.
  3. Click Remove in the confirmation dialog.
  4. Click Refresh to verify the portgroup is removed.

Remove the Portgroup via the Command Line

Run the following command to delete the portgroup: esxcli network vswitch standard portgroup remove --portgroup-name=#### --vswitch-name=####

If the issue persists, contact Broadcom Support and refer this KB.

Additional Information