Error message like "Error getting VMkernel NIC for portgroup ..." appears in the command line output in ESXi.
book
Article ID: 388576
calendar_today
Updated On:
Products
VMware vSphere ESXi
Issue/Introduction
When running commands in ESXi, such as "esxcli network ip interface list" and "esxcfg-vmknic -l", the command line outputs contain like following error messages. Error getting VMkernel NIC for portgroup <Portgroup Name> Error was:Unable to find vmknic for portgroup: <Portgroup Name> netstackInstance: defaultTcpipStack at config location /net/vmkernelnic/child
The previously existing VMkernel adapter (vmkX) may disappear from the GUI.
When ESXi is restarted in this state, the VMkernel adapter disappears from ESXi.
When connected directly to the host, unable to add a new vmkernel port from the GUI, as it is hanging
Environment
VMware vSphere ESXi
Cause
This happens if you previously attempted to add an VMkernel adapter with the same name as an existing one using "esxcli network ip interface add" command. In other words, this occurs after "esxcli network ip interface add" command fails with an "Already exists" error. The issue is believed to be due to an inadequate error handling in esxcli command.
Resolution
Restart ESXi, and if the VMkernel adapter is missing, recreate the new one with the same settings.