ESXi 7.0 with USB Ethernet Adapters

I spent some time tinkering with a home router setup over the last couple of days – now its running OPNSense and several other VM’s in an ultra small form factor machine. The goal was to migrate some services, notably those of the Omada / TP-Link wireless mesh network to the same machine.  The struggle, which i initially attributed to comcast – because why not – was the WAN port on the OPNSense / PFsense router vm not picking up an IP address without juggling USB dongles / modem resets etc.  The answer to the issue can be found here in great detail.  Apparently, ESXi does not (for obvious reasons) exactly support USB NICS – so we simply add a small script to rc.local which polls the boot process until the USB NIC is available.  Interestingly,  this restores functionality, but the nic does not appear in any network diagrams within the ESXi web interface.

Persisting USB NIC Bindings

Currently there is a limitation in ESXi where USB NIC bindings are picked up much later in the boot process and to ensure settings are preserved upon a reboot, the following needs to be added to /etc/rc.local.d/local.sh based on your configurations.

1
2
3
4
5
6
7
8
9
10
vusb0_status=$(esxcli network nic get -n vusb0 | grep 'Link Status' | awk '{print $NF}')
count=0
while [[ $count -lt 20 && "${vusb0_status}" != "Up" ]]
do
sleep 10
count=$(( $count + 1 ))
vusb0_status=$(esxcli network nic get -n vusb0 | grep 'Link Status' | awk '{print $NF}')
done

esxcfg-vswitch -R

Note: The vusbX vmkernel interface may not show up in either ESXi Embedded Host Client and/or vSphere HTML5 UI, this does not mean there is an issue. ESXi was never designed to support USB-based NICs for Management Network and the UI may not properly detect these devices when using the UI. It is recommended to use the ESXi Shell for any operations requiring configuration of vusbX devices.

Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Comments

Leave a Reply