powercli

Conquering ESXi upgrades with conflicting VIBs using PowerCLI

Today, I ran into an issue where I was upgrading ESXi 6.0 servers to 6.5 Update 1 using an HPE custom ISO.   Here’s another example of how PowerCLI can make you more productive.

Conflicting VIBs problem

While working with a customer on a vSphere 6.0 to 6.5 upgrade, I prepared everything as it should be.  I got the latest custom ISO from HPE for ESXi 6.0 Update 1, created a VUM baseline, and attached it to the clusters in question.  Upon scanning the ESXi hosst with VMware Update Manager, I received a warning that the HPE custom ISO was incompatible.

esxi upgrade conflicting vibs

Note that there aren’t actually four conflicting VIBS.  It repeated the problematic modules twice.  There’s actually only two.

Basically, these conflicting modules should be removed prior to upgrading the ESXi hosts.

Removing conflicting VIBs the manual way

There’s nothing special about how to remove them via ESXCLI.  You need the name of the conflicting module, and enable SSH on the ESXi hosts.  Then, run the following command:

esxcli software vib remove –vibname conflicting-vib-name

In the case above, they are named scsi-qla2xxx and scsi-lpfc820.

Watch for indications if the server needs to be rebooted when you run the command.  If so, reboot the servers before proceeding with the upgrade.

Removing conflicting VIBs the PowerCLI way

It’s even easier with PowerCLI to remove these conflicting VIBs.  You don’t have to enable SSH on all your ESXi hosts.  First, make a text file with the names of each conflicting VIB name, with one name per line.

Next, run the following commands after connecting to your vCenter server via PowerCLI:

$modules = gc c:\scripts\modulesnames.txt
$modules
scsi-qla2xxx
scsi-lpfc820

$esxi = get-vmhost "esxihost.domain.com"
$esxcli = get-esxcli -V2 -VMhost $esxi
$modules | foreach-object{$esxcli.software.vib.remove.Invoke(@{"vibname" = "$_"})}

You could obviously make a variable of all your ESXi hosts and do them all at once, but you might not want to leave your ESXi hosts sitting there waiting for a reboot for a while.  It’s your call how to handle that part, but this is how you can remove conflicting VIBs at a basic level.

Hope this helps!