In a previous post I wrote about how to update ESXi 6.5 using Command Line. It’s 6.7 time now, so here is the article explaining how to upgrade ESXi from 6.5 to 6.7 with the command line (esxcli). This method works either the ESXi server is standalone or added to a vCenter Server (I will use no component of vCenter Server).
As a prerequisite, I placed the ESXi 6.5 server in maintenance mode.
Upgrade ESXi from 6.5 to 6.7 with Command Line – Check ESXi Version
To find the current version of ESXi, after I connected with PuTTY to the server, I ran this command:
esxcli system version get
This shows me the current version, which in my case is ESXi 6.5.0 build 6765664 (ESXi 6.5 U1 Express Patch 4). My target is to update this ESXi server to ESXi 6.7 Express Patch 5 (build 10764712). For a list of all releases and build numbers you can check VMware KB.
By default, ESXi firewall blocks httpClient. I check if this is the case with this command:
esxcli network firewall ruleset list | grep httpClient
If it returns “true”, then the firewall is open, else we need to open it with the next command.
To allow httpClient traffic to pass through the firewall, I ran:
esxcli network firewall ruleset set -e true -r httpClient
To get a list of available versions from VMware site, I used this command to filter for ESXi 6.7.0:
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-6.7.0
My target release is listed as available under the name “ESXi-6.7.0-20181104001-standard”. This name is important, as I will need it later for the update command.
Upgrade ESXi from 6.5 to 6.7 with Command Line – Upgrade ESXi version
It’s now time to run the update command:
esxcli software profile update -p ESXi-6.7.0-20181104001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
Please note I used in the command the ESXi version previously copied (ESXi-6.7.0-20181104001-standard).
The update will take few minutes to download and install the required packages. There is no update progress on the screen, in the end you will see a long list of updated vibs.
As best practice, we need to disable the firewall rule we previously enabled:
esxcli network firewall ruleset set -e false -r httpClient
A reboot is required. Reboot the ESXi server and wait for it to be back available.
Upgrade ESXi from 6.5 to 6.7 with Command Line – Verify ESXi Version
Now that the ESXi server is powered on, I connected back to SSH and re-ran the version command:
esxcli system version get
As expected, I see the my target version ESXi 6.7.0 build 10764712.
Enjoy! Happy VM managing 🙂