VMware ESXCLI ESXi Upgrade

The ESXCLI upgrade allows you to save time by skipping the hassle of logging into “My VMware” to download the ESXi ISO and apply patches directly from the VMware Online Depot to your server.

I routinely check VMware ESXi Patch Tracker to know when it’s time to update and build number I need.

Before we get started let’s turn on maintenance mode, or make sure to gracefully shut down all Virtual Machines. Once we have enabled maintenance mode lets also enable SSH to start the upgrade.


Instructions

Open the SSH session to your ESXi server and follow these instructions.

You will need to allow outbound HTTP Requests in the firewall configuration by pasting the lines below into your SSH session and pressing enter:

esxcli network firewall ruleset set -e true -r httpClient

The Image Profile will need to be downloaded using HTTPS and run patch script to apply update by pasting the line below into your SSH session and pressing enter.  Can take some time finish.

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

Next, you will need to disallow outbound HTTP Requests in the firewall configuration by pasting the line below into your SSH session and pressing enter:

esxcli network firewall ruleset set -e false -r httpClient

After you have disallowed outbound HTTP Requests, it’s safe to close out your SSH session and disable it. Remember to turn off maintenance mode after successfully rebooting your server for the upgrade.

Leave a Reply