VMware Cloud Community
RichLA
Contributor
Contributor

esxcli swiscsi 'Failed to add nic'

Hi,

I'm having difficulty binding multiple nics to  the software iscsi hba, have tried the process on two 4.1 ESXi servers  and i keep getting the same error 'failed to add nic'.  I've seen KB1009450 and ensured my config is correct but the error remains.

swiscsi initiator is enabled, port groups are set to overide switch nic teaming failover, port groups are set one active vmnic and one unused.  I've even tried seperate vswitch.  A list adapters returns no nics bound to hba.

Switch Name      Num Ports   Used Ports  Configured Ports  MTU     Uplinks
vSwitch3         128         5           128               1500    xsigo_vnic1033,xsigo_vnic2033

  PortGroup Name        VLAN ID  Used Ports  Uplinks
  iSCSI2                0        1           xsigo_vnic2033
  iSCSI1                0        1           xsigo_vnic1033

~ # esxcfg-vmknic -l
Interface  Port Group/DVPort   IP Family IP Address                              Netmask         Broadcast       MAC Address       MTU     TSO MSS   Enabled Type
vmk0       Management Network  IPv4          STATIC
vmk1       vMotion             IPv4     
vmk2       iSCSI1              IPv4    
vmk3       iSCSI2              IPv4    

~ # esxcfg-swiscsi -q
Software iSCSI is enabled

~ # esxcli swiscsi nic add -n vmk2 -d vmhba33
Errors:
Failed to add nic.

~ # esxcli swiscsi nic add -n vmk3 -d vmhba33
Errors:
Failed to add nic.
~ # esxcli swiscsi nic list -d vmhba33

Errors:
No nics found for this adapter.

vmhba33 is correct for the SW iSCSI hba.

Any ideas, result is the same on second server and using seperate vswitches?

0 Kudos
5 Replies
Chamon
Commander
Commander

Is the host in Lockdown Mode? 

0 Kudos
tietzjd25
Enthusiast
Enthusiast

I am seeing the same issue at a client.

I tried to remove the nic from MPIO and re-add it and still gives the same error.

I also know we reconfigured this Nics a few times.

ESXi 4.1

Joe Tietz VCAP-DCD Solutions Architect
0 Kudos
tietzjd25
Enthusiast
Enthusiast

Here you go in the Release notes of U1 for vShpere 4.1

Cannot configure iSCSI over NIC with long logical-device names
Running the command esxcli swiscsi nic add -nfrom a vSphere Command-Line Interface (vCLI) interface does not configure iSCSI operation over a VMkernel NIC whose logical-device name exceeds 8 characters. Third-party NIC drivers that use vmnic and vmknic names that contain more than 8 characters cannot work with iSCSI port binding feature in ESXi hosts and might display exception error messages in the remote command line interface. Commands such as esxcli swiscsi nic list, esxcli swiscsi nic add, esxcli swiscsi vmnic list from the vCLI interface fail because they are unable to handle long vmnic names created by the third-party drivers.

Workaround: The third-party NIC driver needs to restrict their vmnic names to less than or equal to 8 bytes to be compatible with iSCSI port binding requirement.
Note: If the driver is not used for iSCSI port binding, the driver can still use up to names of 32 bytes. This will also work with iSCSI without the port binding feature.

Joe Tietz VCAP-DCD Solutions Architect
0 Kudos
AndreTheGiant
Immortal
Immortal

Welcome to the community.

I've got a similar problem because there was also a Broadcom card with TOE and the software iSCSI interface wasn't numbered in the right way.

By changing the IQN name the number was fixed.

Be sure that vmhba33 is the software iSCSI and not the TOE card.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
0 Kudos
RichLA
Contributor
Contributor

Thanks for the suggestions.  I think the snippet from the release notes tietzjd25 posted looks promising.  Will get our Xsigo admin to reduce the length of the vmnic label and see if that remedies the issue.

Once again many thanks.

0 Kudos