- Esxcli Software Vib List
- Esxcli Software Sources Profile List Sort
- Esxcli Software Sources Profile List Proxy
A few months back, we discussed how to upgrade ESXi hosts using VMware Update Manager. However, if you do not employ VUM, hosts can also be upgraded via ESXCLi commands using an online repository.
Step 5 – Install the patch. This is where we use the esxcli software vib command to install the patch. This step warrants some more detail. The esxcli software vib command takes on two installation parameters these being update and install. May 17, 2019 This appears to be a somewhat recent problem, and when searching for an answer, a lot of posts reference solutions or VMWare KB's that don't help (enabling swap, checking inodes, etc.). This problem appeared somewhere between ESXi-6.7.0-1-standard (Build 11675023) and ESXi-6.7.0-1-standard (Build 13473784). When updating via.
Run this command to see the VMware online depot and list all profiles. Esxcli software sources profile list-d. Esxcli software profile update-p ESXi-6.7.0. Determine which image profiles are available in the depot. Esxcli -server= software sources profile list -depot=You can specify a proxy server by using the -proxyoption. Update the existing image profile to include the VIBs or install new VIBs. When you upgrade or update a host, the esxcli software profile update or esxcli software profile install command applies a later version (major or minor) of a full image profile onto the host. After this operation and a reboot, the host can join a vCenter Server environment of the same or later version.
In this tutorial, we will upgrade an ESXi host from 6.0 to 6.5 using VMware Online Depot. In addition, I will discuss how to differentiate image profiles within the depot. If you are unfamiliar with the VMware Online Depot, it’s an online repository that provides access to a set of VIBs and image profiles.
Esxcli Software Vib List
Let’s start with that overview on image profiles and how to distinguish them in the online depot. This information could have easily been a post in itself, but if you are new to image profiles and the online depot, it may prove beneficial to be all in one place. If you already know the deal, feel free to skip ahead.
- Image Profiles – An image profile is a set of VIBs grouped to make a full installation of ESXi. VMware issues a collection of these image profiles with each update release of ESXi. Typically, you will see between two to four variations for each patch or update. The collections consist of a standard image profile and a no-tools image profile. The no-tools profile does not include VMware Tools, is usually lighter, has less memory overhead, and PXE boots quicker.
- Naming Format for Image Profile – ESXi-<ABC>-<YYYYMMRRSSS>[s]
A = Major ESXi Version; B = Minor ESXi Version; YYYY = Release Year; MM = Release Month; RR = Release Code; SSS = Release Sequence; s = Flag for Security Only Image Profile
- Example of Image Profiles for ESXi-6.5
- ESXi-6.5.0-4564106-standard | Includes all patches (GA release of ESXi 6.5.0)
- ESXi-6.5.0-20170404001-standard | Includes all patches (ESXi 6.5d)
- ESXi-6.5.0-20170404001-no-tools | Contains all patches; no VMware Tools (ESXi 6.5d)
- ESXi-6.5.0-20170301001s-standard | Contains security patches only
- ESXi-5.5.0-20170301001s-no-tools | Contains security patches only; no VMware Tools
For more information on image profiles, check out this VMware KB.
For VMware ESXi versioning, check out this Patch Tracker.
Now that’s out of the way, let’s get started with the update!
Put Host in Maintenance Mode
If you have virtual machines running on the specified host, ensure they are migrated off or shutdown.
Next, enable SSH and connect to the host. Once logged onto the host, run the vim-cmdhostsvc/maintenance_mode_enter command to put the host in maintenance mode.
Esxcli Software Sources Profile List Sort
Enable Firewall Ruleset
After the ESXi host has successfully entered maintenance mode, run the firewall command to enable the httpClient.
esxcli network firewall ruleset set -e true -r httpClient
Select and Update Image Profile
With the firewall ports open for http requests, we’ll run the esxcli software command to browse image profiles available in the depot. The command will also search for strings containing ESXi 6.5 to narrow down the results.
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i ESXi-6.5
Most likely, a handful of results will be returned. Refer to the examples in the beginning of this article for image profile descriptions.
In this scenario, we will be upgrading our host to ESXi 6.5d. To do so, run the software profile update command selecting the 6.5d profile.
Esxcli Software Sources Profile List Proxy
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.5.0-20170404001-standard
Disable Ruleset
After the update is complete, disable the httpClient on the firewall.
esxcli network firewall ruleset set -e false -r httpClient
Reboot
Run the reboot command to finish out the process.
Reboot
![Esxcli software sources profile list -d Esxcli software sources profile list -d](https://4.bp.blogspot.com/-GHnBW_o066s/UcR7Jey502I/AAAAAAAAGiU/WnO-ARzBDpQ/s400/esxcli-list-profile-3.png)
This appears to be a somewhat recent problem, and when searching for an answer, a lot of posts reference solutions or VMWare KB's that don't help (enabling swap, checking inodes, etc.).
This problem appeared somewhere between ESXi-6.7.0-20190104001-standard (Build 11675023) and ESXi-6.7.0-20190404001-standard (Build 13473784). When updating via CLI, you get the following error message:
TinkerTry is the only place where I've seen the (for me) correct solution posted: https://tinkertry.com/easy-update-to-latest-esxi#apr-14-2019-update. Basically, update
VMware_locker_tools-light_10.3.5.10430147-12986307.vib
(see commands below or in TinkerTry) and everything seems to work fine. I also enabled swap on my datastore, but this didn't seem to help. However, if locker tools vib doesn't help, it may be a combination of both.EDIT/UPDATE: I ran into this again upgrading to ESXi-6.7.0-20200403001-standard - The fix was the same, but I had to upgrade to an even newer version of VMware_locker_tools-light. To find the latest version, use the following:
You can add a 'grep -v Downgrade' to get only relevant versions. Replace the version number in the wget, and install like normal. The current latest version is VMware_locker_tools-light_11.0.5.15389592-15843807.vib
</Update>
For my own later reference, here's the quick steps guide to upgrading ESXi. If you aren't familiar with this process, please read more (https://tinkertry.com is a good source) before attempting an update and fully understand the process.
- Suspend all guests
- Enter Maintenance Mode
- Reboot
- Start SSH Service
- List available updates:
esxcli software sources profile list --depot=https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | sort
The latest update should be near the bottom, but may not be the very bottom! * - Apply the latest version:
esxcli software profile update -p ESXi-6.7.0-20190504001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
<- Replace the version after -p with the version you found via the above list - Reboot again
- Exit Maintenance Mode
- Restart guests
* If, like me, your DNS server lives on your ESXi box, you can `echo 'nameserver 1.1.1.1' > /etc/resolv.conf` to temporarily use an external DNS during the upgrade process.