How to Install a VMware VIB file

Save to My DOJO

How to Install a VMware VIB file

In our previous post, we covered what is a VMware VIB and the various acceptance levels you will see. Now we will deep dive into the stuff you’ll need to know to work with them. They’re not used daily but if you know how to use them, they’ll make your life easier, especially when it comes to upgrades. We’ll cover installing them, removing them and upgrading an ESXI host. It’s true, you don’t need Update Manager for this!

Installing a VIB

So you’ve been approached by a third party vendor and they’ve given you a VIB. You’ll want to determine if the VIB will require a reboot. Often times they will. Sometimes with CIM providers that are sent from either Dell or HP for instance they don’t need a reboot. Just double check because it can take significantly more time to get these updates deployed if you have to do rolling reboots across your environment. The quickest way to check is often the documentation provided with the VIB. This is often found on the applicable vendor’s website.

First to verify what VIBs you have installed, you need to enable SSH on your ESXi host if it is not already enabled.

Once you’ve SSH’d in, find out what VIBs are installed by running the following command:

esxcli software vib list

We do this to verify that the VIB we’re trying to install isn’t already installed. If you try to install a VIB that’s already installed, you won’t hurt anything though, it’ll warn you.

Next, you’ll want to get the VIB moved into to your environment. The easiest method is to simply use the Web Client and upload the file to a datastore. I prefer to use a shared datastore here, so that way I don’t have to copy the file to each individual host (if clustered). If each host sees the storage, it makes the deployment a lot easier. You will only really need to run the same line on each server so it makes CTRL-C, CTRL-V much easier and less problematic. It’s a lot easier this way! Once you’ve determined the best place to put it, you have to run the following command to install it:

 esxcli software vib install -d “/vmfs/volumes/Datastore/DirectoryName/PatchName.zip“

That’s It! Easy right? However, let’s also quickly cover the basic maintenance tasks involved in working with VIBs.

Updating a VIB

Before you decide to update an ESXi host, it is always best to put the host in maintenance mode. You can run the command as follows:

vim-cmd hostsvc/maintenance_mode_enter

NOTE: You could additionally do this from the UI as well!

Occasionally you’ll need to update a VIB. You will have to run the esxcli command with some additional switches:

esxcli software vib update -d “/vmfs/volumes/Datastore/DirectoryName/PatchName.zip”

My examples here show .zip files, but you can also point any of the above to actual .vib files. More and more I have seen them packaged as zip files, but you can point to the vib itself as well from my experience.

Once the VIB update is complete you can remove the host from maintenance mode by running the following:

vim-cmd hostsvc/maintenance_mode_exit

Upgrading an ESXi Host

While we’re talking abot updating VIBs, I wanted to quickly mention the host update process, because this is likely the situation you’ll be working through when you start upgrading VIBs anyway…

Like VIBs, it’s actually quite simple to upgrade an ESXi host to the most recent patch level. I’ve heard where people just want to get it done and not setup Update Manager to do it. This is exactly how I do it in my homelab for upgrades and it works wonderfully. I’ve got vCenter running in nested lab, so I could use Update Manager, but it’s just as easy to go this way sometimes.

In order to update, I’ll show you a few one liners that work great.

First open up the firewall:

esxcli network firewall ruleset set -e true -r httpClient

Next: before you decide to run one of the commands below (I’ve included a couple versions of the most popular 6.7 builds.) You might consider doing a dry run. You can add –dry-run to the end of the commands to see what it will do without making any changes. You’ll see what VIBs are going to be removed, updated or installed.

ESXi670-201811001 11/09/2018 10764712

esxcli software profile update -p ESXi-6.7.0-20181104001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

ESXi 6.7 GA ESXi 6.7 GA 4/17/2018 8169922

esxcli software profile update -p ESXi-6.7.0-8169922-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

and that’s it! You’ll be up to the specified patch level quickly and easily!

To finish, you’ll want to restrict the firewall again.

esxcli network firewall ruleset set -e false -r httpClient

Wrap Up

To wrap up, I have shown you how to manipulate and install VIBs via the command line on your ESXi hosts. It’s a really easy process and quite simple to do. Again, I’d always recommend using the –dry-run switch at the end to verify what it will do before you actually go through with it. In the event you have an issue, ESXi can revert back to the old build if you boot into recovery mode at boot. I’ve had to do that in the past when I got overzealous and my third party vendors were not quite there with support on the new version!

How about you? Have you had as good of luck as I have with this method, and working with VIBs in general? Let me know in the comments section below!

Thanks for reading!

[the_ad id=”4738″][thrive_leads id=’18673′]

Altaro VM Backup
Share this post

Not a DOJO Member yet?

Join thousands of other IT pros and receive a weekly roundup email with the latest content & updates!

Leave a comment

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