How To Upgrade VMware ESXi Via Command Line

  1. Make sure SSH is enabled on the host.
  2. Put the host in maintenance mode.
  3. Enable firewall rule for web traffic.
esxcli network firewall ruleset set -e true -r httpClient
  1. Check the current ESXi build and version.
esxcli system version get
  1. Check you internet connection.
vmkping 8.8.8.8
  1. List all available profiles in the VMware online repo.
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

filter the list with grep:

esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i ESXi-6.7.*standard
  1. Apply the selected profile from the VMware online repo.
esxcli software profile update -p <profile-name> -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
  1. Reboot the host.

Troubleshooting

esxcli software vib remove -n <VIB name>