我的ESXI版本是 6.7 ,网卡是:ASIX AX88179 USB 3.0 to Gigabit Ethernet Adapter,网上查资料可以在https://communities.vmware.com/t5/Flings/ct-p/77这边下载,点过去发现需要什么发邮件来下载,网上找了半天也找不到去哪下载,最后在archive.org网站找到了:https://archive.org/download/flings.vmware.com/Flings/USB%20Network%20Native%20Driver%20for%20ESXi/
下载链接是:https://archive.org/download/flings.vmware.com/Flings/USB%20Network%20Native%20Driver%20for%20ESXi/ESXi670-VMKUSB-NIC-FLING-39203948-offline_bundle-16780994.zip
发现这个archive.org网站还是蛮牛逼的。。。
下载下来解压出来得到个vib文件:VMW_bootbank_vmkusb-nic-fling_2.1-6vmw.670.2.48.39203948.vib
我们开启esxi的ssh功能,帮vib文件上传上去,执行下面命令:
esxcli software vib install -v /vmfs/volumes/data/files/VMW_bootbank_vmkusb-nic-fling_2.1-6vmw.670.2.48.39203948.vib
这里注意下,我们后面文件的路径要使用绝对路径 不然的话esxcli会帮你传入的参数当成url来解析,导致安装失败。
安装没问题的话,会有下面的提示:
Installation Result
Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
Reboot Required: true
VIBs Installed: VMW_bootbank_vmkusb-nic-fling_2.1-6vmw.670.2.48.39203948
VIBs Removed:
VIBs Skipped:
插上USB网卡,重启设备,我们已经能看到我们的USB网卡了
持久化 USB 网卡绑定
当前在 ESXi 中存在一个限制,即 USB 网卡绑定在启动过程中较晚被识别。为了确保设置在重启后得以保留,需要根据您的配置将以下内容添加到 /etc/rc.local.d/rc.local 中。
下面是一个示例,它将物理 USB 网卡(vsub0)绑定到虚拟交换机(vSwitch)及相应端口。
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
if [ "${vusb0_status}" = "Up" ]; then
esxcfg-vswitch -L vusb0 vSwitch0
esxcfg-vswitch -M vusb0 -p "Management Network" vSwitch0
esxcfg-vswitch -M vusb0 -p "VM Network" vSwitch0
fi
重启设备可以看到我们usb网卡正确绑定了:
参考资料:
https://communities.vmware.com/t5/Flings/ct-p/77
https://archive.org/download/flings.vmware.com/Flings/USB%20Network%20Native%20Driver%20for%20ESXi/