Update VMWare ESXi Server via CLI

This article is a summary of William Lam's "A Pretty Cool Method of Upgrading to ESXi 5.1" which can be found here.

Overall, this is a simple method of upgrading or updating VMWare ESXi versions without the need of a boot cd or without the need to sit in front of the server. This is a three step process:

esxcli network firewall ruleset set -e true -r httpClient # Open the firewall port to allow web access to httpClient

# List the available software versions (you probably want to use grep to find a specific version...) This list is long and not in chronological order. If you are sitting behind a proxy, use the --proxy parameter

esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml # list all available versions

esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep 6.5 # version with grep if you know what you are looking for

# WARNING: The next line does the update/upgrade. It will take some time so be patient.

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

This is it. You will have to reboot.

NOTE: you might have to use the additional switch –ok-to-remove if esxcli requires you to confirm temoval of old packages.