Lately I was troubleshooting a PSOD issue on one of our ESXi 5.0 hosts with VMware Support, and they advised me to downgrade the bnx2 driver to the ESXi builtin version (I had a newer HP supplied version installed because it was HP hardware). Later it turned out that this was a wrong advice, but at that time I wondered: How do you do this?
The support guy pointed me to the well known KB article Installing async drivers on VMware ESXi 5.0, 5.1 and 5.5, but the instructions there assume that you have downloaded an Offline bundle of the new driver from somewhere. However, the version of the net-bnx2 package that I was advised to install (2.0.15g.v50.11-5) was not available for download anywhere ...
Method 1: Downloading VIBs from the VMware Online depot using esxcli
Luckily I remembered that the VMware Online Depot includes all VIB packages that ESXi consists of, and any version of them all, so the specific version of the net-bnx2 package that I was looking for is also included, and even better: If you have Internet access from within your host then you can use esxcli commands to install it directly from there!
Here is how you would do it: Enable SSH access on your host, log in to it (e.g. using putty) and run the commands shown below:
esxcli software sources vib list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xmllists all VIB packages that are available in the VMware Online depot. In our example we filter the output for the package name net-bnx2 so that we can easily find the package and version that we are looking for (it's in the fourth line). This command is not really necessary to do the driver downgrade - it just confirms that the required version of the driver is really available in the depot and lists its full version string so that we can copy and paste it into the next command:
esxcli software vib install -n net-bnx2:2.0.15g.v50.11-5vmw.500.0.0.469512 -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xmlThis installs the specific version (2.0.15g.v50.11-5vmw.500.0.0.469512) of our package (net-bnx2) replacing any older, but also (like in our case) any newer version that is already installed. By appending the version string to the package name using a colon (:) as a separator we select specifically this version. If I omitted the version string then the latest available version (2.2.3...) of the package would have been installed.
Okay, so this works great, but I could not really use that method, because our production hosts' management interfaces are on an isolated network with no access to the Internet!
Method 2: Download a VIB package using PowerCLI ImageBuilder
Nevertheless I was able to accomplish the task by using an Internet connected Windows machine that had PowerCLI installed. Here is how you do this: Launch a PowerCLI session using the desktop shortcut and run the following commands:
Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml $vib = Get-EsxSoftwarePackage net-bnx2 $vib | select Name,Version | ft -AutoSize $vib | fl Invoke-WebRequest $vib.SourceUrls -OutFile c:\temp\net-bnx2.vibNotes:
Line 1: Connects the VMware Online depot using the Add-EsxSoftwareDepot cmdlet
Line 2: With Get-EsxSoftwarePackage you retrieve VIB package objects from the depot. In this example it will return an array of all packages that are named net-bnx2.
Line 3: This lists the name and exact version strings of all packages that have been retrieved. We can see here that we want the first element of the array, i.e. $vib.
Line 4: By looking at the properties of the first VIB we can see that there is one named SourceURLs: That is an array of download URLs for the package. I'm not sure why this is of type array, because I have never seen it containing more than one URL.
Line 5: With the Invoke-WebRequest cmdlet we can now download the VIB package and store it in a local file (C:\temp\net-bnx2.vib in this example). Invoke-WebRequest requires Powershell 3.0 at least - if you have an earlier version of Powershell and don't want to upgrade then you can use other (less intuitive) combinations of cmdlets or an external utility like wget.exe to download the file (Google is your friend ;-).
Once you have downloaded the correct VIB file you need to upload it to a datastore of your host (using the datastore browser of the vSphere or Web client), connect to your host using ssh (see Method 1 above) and install it using a command like
esxcli software vib install -v /vmfs/volumes/your-datastore/net-bnx2.vibReboot and that's it!
This post first appeared on the VMware Front Experience Blog and was written by Andreas Peetz. Follow him on Twitter to keep up to date with what he posts.