Note Do not update your existing VIB! The VIB should be removed, followed by a reboot and re-install. Updating the VIB will result on an inability to load the “usbnet” module.
I know the future for ESXi is based on a Linux Free World™ (it’s all FreeBSD now, baby!); but for those of us still rocking a Home Lab based on either ESXi 6.5 or 6.7, having the ability to step-up to the dizzying heights of better than Gigabit Ethernet, and for that matter, with USB based adapters, is quite something. Not to mention the fact that some of those adapters are quite inexpensive!
Some days ago I was contacted by someone based in the Netherlands who was trying to get the RTL8156 based adapters he had recently purchased working on ESXi. You might or might not have read this piece I wrote about USB Ethernet drivers for ESXi. I must confess to having lost interest on much of it, just releasing an update to the drivers as when I had a chance (the thing just worked anyway). However, I couldn’t resist the temptation of trying to get this new adapter working.
The RTL8156 based adapters are CDC_NCM compliant, and in theory, do not require any drivers provided the Linux distribution in use sports one of the latest kernels (4.x and up). Thankfully, Realtek has released a driver supporting their adapters when using older kernels – but not as old as what the ESXi Linux kernel shim represents! Most of the CDC_NCM latest features are not available on ESXi, so without a driver, we would get nowhere.
Having said the above, the latest driver supports any Realtek adapters based on the RTL8152, RTL8153 (Gigabit) and RTL5186 (2.5 Gb), but for the latter, some of the CDC_NCM features are a must. So, how do we square that round hole? Well, I just had to implement the missing functionality myself!
The following devices were tested with these drivers.
Tested by Michel van Toorn
Note: The above adapters were tested, but any adapter based on the RTL8156 chipset will work in the same way. There are plenty of options form StarTech (expensive), UGREEN, etc.
When you USB Ethernet adapter is also a CD-ROM
One of the most bizarre about this new crop of 2.5GbE USB adapters is the fact that, at least on Windows, the device presents itself as a Cd-ROM drive (containing the relevant files) until the driver is installed on the target machine. On Linux, we are supposed to to deploy UDEV rules to the /etc/udev/rules.d to force the adapter to behave. Bummer! There’s no such mechanism on ESXi (or so I thought).
Whilst working on the driver I thought about add the “rules.d” directory with the VIB, but that flaunts the installation rules of VIBs. So, I devised a roundabout way where the rules file was delivered as a map file, and the the /etc/rc.local.d/local.sh file was roped in to create the appropriate folders and “/etc”, then create a symbolic link to the map file as a rules file.
It turns out that the above is not required at all; the CDC_NCM changes I made to the source code (.c file) and the header file (compatibility.h), were enough. I am quite happy with that as I prefer not to change the basic configuration of the system, if at all possible.
Bottom line: the driver just works out of the box without further manual intervention.
I understand that VMware would like to, after more than 10 years embroiled on a lawsuit brought about by Christopher Helwig and the Software Freedom Conservancy (Lawsuit abandoned) would like to distance themselves from those troubles. However, the lack of access to the source code has now put the community at a disadvantage. For us with a Home Lab not wanting to buy fully certified hardware there’s little we can do to enrich the platform.
I remember when the Whitebox HCL was a thing, and the community develop drivers were important.
Hey, VMware! Can we have the replacement to the vmkLinux available without having to pay thousands of dollars for the NDDK (Native Driver Development Kit)? You know the community can come up with some pretty good code, and go on to advocate the use of your wares.
You can download the VIBs using the following links: