Saturday, August 18, 2018

Adding Realtek 8111 driver to vSphere 6.7 image

While reinstalling home lab with vSphere 6.7, I was remembered (the hard way) that my on-board NIC is based on Realtek 8111 chipset which is not included in the default vSphere installation media.

I had to go accept the challenge of finding the drivers and creating a new bootable vSphere ISO. Nothing I haven't done before, but since it is not often I've decided to make it a blog post.

First I needed to find the drivers. Using a bit of google foo I found the blog of a long time vExpert (thank you) which has also a collection of drivers. I've downloaded the net55-r8168 offline bundle . From VMware site I've downloaded offline bundle for vSphere 6.7. Placed both of them in the same folder and opened a PowerCLI prompt.

First, create a new software depot using the two bundles:

1
Add-EsxSoftwareDepot "C:\7_KIT\VMW\net55-r8168-8.045a-napi-offline_bundle.zip", "C:\7_KIT\VMW\VMware-ESXi-6.7.0-8169922-depot.zip"

Next, create a new image profile: see what profiles exist, clone one and change its acceptance level to "community" (because the driver I am about to load is community signed):

1
2
3
Get-EsxImageProfile
New-EsxImageProfile -CloneProfile ESXi-6.7.0-8169922-standard -name ESXi-6.7.0-8169922-standard-RTL8111 -Vendor Razz 
Set-EsxImageProfile -ImageProfile ESXi-6.7.0-8169922-standard-RTL8111 -AcceptanceLevel CommunitySupported

Add the driver to image profile:


1
2
Get-EsxSoftwarePackage | Where {$_.Vendor -eq "Realtek"}
Add-EsxSoftwarePackage -ImageProfile ESXi-6.7.0-8169922-standard-RTL8111 -SoftwarePackage net55-r8168

Lastly, generate the vSphere 6.7 ISO containing the driver:


1
Export-EsxImageProfile -ImageProfile ESXi-6.7.0-8169922-standard-RTL8111 -ExportToIso -filepath C:\7_KIT\VMW\VMware-ESXi-6.7.0-8169922-RTL8111.iso

In one picture, it looks like this:

One more step is needed. Since we have the ISO, we just need to write on a bootable USB. To do this, I've downloaded Rufus, portable version. Run the software, select destination a USB stick (it will be overwritten so better not having any useful data on it), selected the source my new ISO and pressed start.

If during the creation of the bootable stick you are asked to update menu.c32, press YES. After it finishes I've plugged the stick in my physical box and happily installed ESXi.

Update:
File download test reached 800 Mbps, a normal value keeping in mind the connectivity between my laptop and the ESXi host.


//UPDATE 04/04/2020 

Driver not supported in vSphere 7

Unfortunately the driver is not supported anymore in vSphere 7 due to legacy VMKlinux drivers no longer being supported. Trying to add the drivers to custom image will fail with the following error:


PS C:\KIT\VMW> Add-EsxSoftwarePackage -ImageProfile ESXi-7.0.0-15843807-standard-RTL8111 -SoftwarePackage net55-r8168
Add-EsxSoftwarePackage : VIB Realtek_bootbank_net55-r8168_8.045a-napi requires com.vmware.driverAPI-9.2.2.0, but the
requirement cannot be satisfied within the ImageProfile.
At line:1 char:1
+ Add-EsxSoftwarePackage -ImageProfile ESXi-7.0.0-15843807-standard-RTL ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (VMware.ImageBuilder.Types.ImageProfile:ImageProfile) [Add-EsxSoftwarePacka
   ge], Exception
    + FullyQualifiedErrorId : EsxImageProfileValidationError,VMware.ImageBuilder.Commands.AddProfilePackage

Add-EsxSoftwarePackage : VIB Realtek_bootbank_net55-r8168_8.045a-napi requires vmkapi_2_2_0_0, but the requirement
cannot be satisfied within the ImageProfile.
At line:1 char:1
+ Add-EsxSoftwarePackage -ImageProfile ESXi-7.0.0-15843807-standard-RTL ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (VMware.ImageBuilder.Types.ImageProfile:ImageProfile) [Add-EsxSoftwarePacka
   ge], Exception
    + FullyQualifiedErrorId : EsxImageProfileValidationError,VMware.ImageBuilder.Commands.AddProfilePackage


Trying to upgrade to vSphere 7 gives the error, although in a prettier format:


Options are either keep 6.7 and run 7.0 nested or look for another NIC.

//UPDATE 16/04/2020 

I've plugged in a 10 year old Intel CT Gigabit adapter and upgraded to vSphere 7.0.

Needed to remove the Realtek vib first:  esxcli software vib remove -n net55-r8168

Friday, August 3, 2018

vExpert Program "You're in!"

I have the bad habit of waking up and immediately reading e-mails on my phone. This time I was in for a great surprise that put a smile on my face. I got accepted to vExpert program.

I consider it to be both an honor and a responsibility. I know my blogging is not as frequent as I wish to. And together with VMUG co-leaders we are striving to make VMUG meetings fun and interesting. The only thing I can do is to keep on giving back to community and make it better each time and hoping to see more and more people at VMUG Romania meetings.

So, thank you for this amazing ride (so far). And a special thanks to Constantin Ghioc (Titi) and Jorge de la Cruz for determining me to apply to the program.

My profile on vExpert Directory is here .