Today we had an issue with one of our older vSphere ESXi hosts which is version 5.5. The vSphere environment which holds these ESXi hosts is version 6.5. This should not be a problem in general but we did encounter some kind of error on the hosts which were being upgraded to version 6.5 through Update Manager.

Upgrade Manager gave us some error about conflicting VIB’s that are still present on the ESXi hosts but conflicting with the newer image. Instead of removing those automatically Update Manager crashes and basically tells you to fix it yourself. So that is what we did! We found out that the following two VIB’s were providing us these errors:

Because the hosts were already decommissioned and out of any production environment, we just deleted them from the command line with the following two commands:

I found this process quite tedious to be honest, especially because I had to do this on 10 hosts. So I figured, isn’t this possible through PowerCLI? Well good news, ofcourse it is! It took me some time to figure it out because most of the examples on the internet didn’t work for me. In one example that I found Luc Dekens used the following script:

I integrated these constructs in my script but this didn’t work at all, all I received was the following:

Digging some more inside this method I noticed that it wanted me to give it a single argument with all parameters. I found this while entering:

So after some more digging and looking around on the internet I made this script to help me delete the faulty VIB’s:

The result of this script is:

So I went ahead and changed the “dry-run” argument to $false and it removed the VIB’s from the ESXi hosts.

I thought it would be useful to share this in this post because it took me quite some time to make it work, especially because there is not a lot of documentation around that worked for me or is still accurate. I am still not sure why the script that Luc made doesn’t work for me, but now that I made the one above it doesn’t matter anymore.

2 Comments

    1. Hi Dominik,

      Thank you for noticing it. I changed it. It was only the argument definition though, so no functionality was impaired. Since it was consistent throughout the script. But for esthetic purposes I changed it into
      $esxcliRemoveVibArgs.

Leave a Reply

Your email address will not be published. Required fields are marked *