Update host without Update Manager by using esxcli

This blog post describes how to update respectively install VIBs on hosts without using VMware Update Manager (VUM). Instead of VUM we will use esxcli. esxcli software is a really powerful framework which you can use to keep your hosts up-to-date, install and remove bundles. The commands below are using real repositories and vSphere Installation Bundles (VIBs). These examples should work fine for ESXi 5.x. Do not forget to set maintenance mode before updating a host.

  • First, enable http-Client in local firewall to allow access to internet resources
    esxcli network firewall ruleset set -e true -r httpClient
  • If you are unsure, if the ruleset is enabled or not, run the this command and remember the result to switch back at the end
    esxcli network firewall ruleset list -r httpClient
  • Query installed VIBs on the local host
    esxcli software vib list
  • List VIBs that can be updated out of the default VMware repository
    esxcli software sources vib list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml |grep -i update
  • or list VIBs that belong to a specific build-number
    esxcli software sources vib list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml |grep 2143827
  • Update the base-image
    esxcli software vib update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml --vibname esx-base
  • Update vmware tools package
    esxcli software vib update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml --vibname tools-light
  • Do these steps for the VIBs you want to install. After the installation you see the previous version (removed) and the just installed version. You can also see if you have to reboot the host.
  • Looking for still available VIBs for installation e.g.:
    esxcli software sources vib list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml |grep -i update |grep 550
  • You can also check a whole profile. A profile is more or less just a set of VIBs. In this example looking for 5.5-profiles
    esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml |grep 5.5
  • Check the content of a profile. Unfortunately these images are named after dates instead of built-numbers.
    esxcli software sources profile get -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
  • To compare installed versions to a profile
    esxcli software profile validate -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
  • To install a whole profile
    esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
  • To check Update process, check the log-file: /var/log/esxupdate.log
  • Finally, do not forget to disable http-Client in local firewall, if it was enabled at the beginning.
    esxcli network firewall ruleset set -e false -r httpClient

Some words for HP VIBs
These days there are strange behavours when updating HP VIBs. So I could not update the VIB for HP-AMS using the command to update all HP VIBs on the host:

esxcli software vib update -d http://vibsdepot.hp.com/index.xml

I got an [VibDownloadError]-error. Coping the vib locally and running the command to install VIBs, previous copied to local disk

esxcli software vib update --viburl /tmp/hp-vib/hp-ams-550.10.0.1-07.1198610.vib

works fine. After this, esxcli software vib update -d http://vibsdepot.hp.com/index.xml works without any problems.

4 responses to “Update host without Update Manager by using esxcli”

  1. Netzien says:

    your css sucks

    • woifgaung says:

      Thanks for comment! Unfortunately you are right, hyperlinks are shown as black boxes. I changes the theme of my block right now, so it should be better for reading.

  2. Abbers says:

    A big BIG thank you for printing the command I needed to update the necessary VIB from the ESX host’s shell:

    “esxcli software vib update –viburl /tmp/hp-ams-550.10.0.1-07.1198610.vib”

    I had already downloaded the VIB elsewhere, but as I did not have vCenter Update Manager installed on my vCenter server, I had to install the VIB manually but I could not find the necessary command to do so until I found this page.

Leave a Reply

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