In this blog, we will focus our attention on downgrading a vib/device driver from an ESXi host.
Lets run a code to find out our current network drivers loaded
[root@sfo-m01-esxi-01:~]
1 2 3 4 5 6 7 8 |
for a in $(esxcfg-scsidevs -a |awk '{print $2}') ; do aa=$(vmkload_mod -s $a |grep -i -A 1 $a | awk -F "/" '{print $6}'); ab=$(vmkload_mod -s $a |grep -i -A 1 $a | grep Version | sed 's/Version//g'); echo "Driver: $aa"; echo "Version $ab"; echo -e "\033[0;31m"-----------------------------------------"\033[0m" done |
Driver: lsi_mr3
Version : 7.713.07.00-1OEM.670.0.0.8169922
Driver: vmw_ahci
Version : 2.0.7-2vmw.670.3.143.17700523
Driver: vmw_ahci
Version : 2.0.7-2vmw.670.3.143.17700523
Driver: iscsi_vmk
Version : Built on: Mar 3 2021
Driver: vmkusb
Version : 0.1-1vmw.670.3.143.17700523
[ [root@sfo-m01-esxi-01:~]
Lets run a code to find out if our installed nic firmware and drivers are compatible.
1 2 3 4 5 6 7 8 9 |
for b in vmkchdev -l | grep vmhba | awk '{print $5}'; do bb=$(vmkchdev -l | grep $b | awk '{print $2}' | awk -F ":" '{print $1}'); bc=$(vmkchdev -l | grep $b | awk '{print $2}' | awk -F ":" '{print $2}'); bd=$(vmkchdev -l | grep $b | awk '{print $3}' | awk -F ":" '{print $1}'); be=$(vmkchdev -l | grep $b | awk '{print $3}' | awk -F ":" '{print $2}'); echo -e "\033[0;31mHCL Link $b\033[0m" echo http://partnerweb.vmware.com/comp_guide2/search.php?deviceCategory=io\&VID=$bb\&DID=$bc\&SVID=$bd\&SSID=$be\&details=1; done |
HCL Link vmhba1
http://partnerweb.vmware.com/comp_guide2/search.php?deviceCategory=io&VID=8086&DID=a1d2&SVID=1028&SSID=0716&details=1
HCL Link vmhba32
http://partnerweb.vmware.com/comp_guide2/search.php?deviceCategory=io&VID=8086&DID=a1af&SVID=1028&SSID=0716&details=1
HCL Link vmhba2
http://partnerweb.vmware.com/comp_guide2/search.php?deviceCategory=io&VID=8086&DID=a182&SVID=1028&SSID=0716&details=1
HCL Link vmhba0
http://partnerweb.vmware.com/comp_guide2/search.php?deviceCategory=io&VID=1000&DID=0016&SVID=1028&SSID=1fcd&details=1
ESXCLI command used to Verify VIBs from ESXi host.
esxcli software vib list
ESXCLI command used to Add VIBs from ESXi host.
1. To Install, run the command
esxcli software vib install -d “/vmfs/volumes/Datastore/DirectoryName/PatchName.zip“
ESXCLI command used to Remove VIBs from ESXi host.
- Uninstall the current or upgraded driver > reboot the host > Install the downgrade driver
OR - You may also install the downgrade driver directly using esxcli software vib install command. This will remove the upgraded driver itself.
Let’s see how to perform downgrades of vib using both methods. You may decide which one you would like to choose. You may also install drivers using Baselines in Lifecycle Manager, which will be covered in later posts.
Method 1 : Uninstall the current or upgraded driver > reboot the host > Install the downgrade driver
- Put the ESXi host in Maintenance Mode.
- SSH the ESXi host
- Run this command to uninstall the driver: “esxcli software vib remove -n <vib_name>“
- Reboot the host
- Run this command to install the driver: “esxcli software vib remove install -d /vmfs/volume/datastore/vib.zip“
- Reboot the host
- Run this command to ensure the version of downgrade driver installed in step 5: “esxcli software vib get -n <vib-name>“
Method 2: Directly Install the Downgraded driver without uninstalling the current driver.
Let’s take an example of installing a downgraded version 4.1.9.0 vib named “qlnativefc”
- Put the ESXi host in Maintenance Mode and SSH into it.
- Run this command to check the current version of the driver to be replaced: “esxcli software vib list | grep <vib_name>” or “esxcli software vib get -n <vib-name>“
- Install the downgraded version of the driver directly and you will see the upgraded version being removed: “esxcli software vib remove install -d /vmfs/volume/datastore/vib.zip”
- Reboot the host
- Run this command to ensure the version of the replaced driver: “esxcli software vib get -n <vib-name>“
ESXCLI command used to Update VIBs from ESXi host.
Let’s take an example of upgrading a qlogic driver
1 2 |
localcli software vib update -v "/var/Intel-i40en_1.14.2.0-1OEM.670.0.0.8169922-offline_bundle-18391104/vib20/i40en/INT_bootbank_i40en_1.14.2.0-1OEM.670.0.0.8169922.vib" |
To install the driver using Update Manager
Go to VMware Update Manager
- Got to “Manage”-> “Settings” -> “download setting” , click “Edit” for “Download resources”Click “add” button to add OEM resource
- Create a baseline and attach the baseline to host.
- The scan result will show hosts compliance result with the baseline.
- You can stage the host or remediate it immediately.