Notes of a scripter

Use PowerCLI to List Installed VIBs on ESXi

Recently I upgraded my environment to VMware 7u3c, but I had concerns about the issue with the i40enu VIB. Some of my hosts were running the version of ESXi that were listed as having the renamed VIB. So I really didn’t want to have to mess with downloading the python script, transferring it to the vCenter to run it. So I wrote a small script that will check for the installed VIBs that start with i40e* from a PowerShell/PowerCLI session from all of my hosts.

$VMhosts = Get-VMhost
$report = @()
Foreach ($VMhost in $VMHosts){
    $Line = "" | select Name, VIBs
    $ESXcli = Get-EsxCli -VMHost $VMhost -V2
    $VIBS = ($ESXcli.software.vib.list.Invoke() | Where Name -Like "i40e*").name -join ", "
    $line.Name = $VMhost.name
    $Line.VIBs = $VIBS
    $report += $Line
}
$report | Sort -Property Name

Once the script is ran, it will display the following output so it can be reviewed.

If you were to find the bad VIB, i40enu, you can easily remove it with PowerCLI. After putting the host into maintenance mode you can run the following that will uninstall the VIB.

$VMhost = Get-VMhost "VMhost_Name_Here"
$ESXcli = Get-EsxCli -VMHost $VMhost -V2
$ESXcli.software.vib.remove.Invoke(@{vibname="i40enu"})

Once the above script is ran, the host will need to be rebooted to complete the uninstall of the VIB. Make sure to test in a lab before running in production environment.

-Stuart

Extra Reading:
https://kb.vmware.com/s/article/85982 – vSphere Lifecycle Manager can show non-compliant status after rollup Remediation, new cluster creation or transition from Baseline-managed cluster to Image-managed cluster for few upgrade paths due to i40en/i40enu driver name change. (85982)
https://docs.vmware.com/en/VMware-vSphere/7.0/rn/vsphere-vcenter-server-70u3c-release-notes.html – VMware vCenter Server 7.0 Update 3c Release Notes

Exit mobile version