Upgrading from ESXi 6.7 to ESXi 7.0 via SSH and esxcli
Following VMware’s release of ESXi 7.0, I upgraded my ESXi 6.7 server to ESXi 7.0 using SSH and esxcli. For those interested, see below the jump for the details of the process I used.
To upgrade from ESXi 6.7 to 7.0 using esxcli:
1. Shut down all VMs running on your ESXi host machine.
2. Enable SSH on your ESXi host machine if this service is not already turned on.
3. Connect via SSH and run the following command to enter maintenance mode:
vim-cmd /hostsvc/maintenance_mode_enter
4. After putting ESXi into maintenance mode, run the following command to set the correct firewall rules for the httpClient:
esxcli network firewall ruleset set -e true -r httpClient
5. Next, run the following command to list the ESXi 7.0 updates available. You want the latest one that ends in “-standard” for your version of VMware.
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-7.0.0
6. Once you’ve identified the correct version of VMware (as of 4-19-2020, this is ESXi-7.0.0-15843807-standard), run the following command to download and install the update.
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0.0-15843807-standard
Note: It is very important that you run esxcli software profile update here. Running esxcli software profile install may overwrite drivers that your ESXi host needs.
7. Once the update has been installed and prompts you to reboot, run the following command to restart:
reboot
8. After your ESXi host restarts, connect via SSH and run the following command to exit maintenance mode:
vim-cmd /hostsvc/maintenance_mode_exit
At this point, your ESXi host should be upgraded to ESXi 7.0.0.
You forgot the reverse of #4
That worked like a charm. It was way easier than trawling through the docs for the juicy bits. Thanks so much for the awesome post.
I’m trying to follow your guide. I’m on version 6.7.0 Update 3 (Build 15160138) right now.
I have followed until step 5, where I’ve made a minor change, looking for version 7.0.1 as it seems to be the latest.
I find the version to install must be “ESXi-7.0U1d-17551050-standard”.
Following step 6 according to the result of 5 gives me the following error:
esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-7.0U1d-17551050-standard
Got no data from process: LANG=en_US.UTF-8 /usr/lib/vmware/esxcli-software profile.update -d “https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml” -p “ESXi-7.0U1d-17551050-standard”.
I’m very confused? I have tried a number of times over several days with the same result. I have followed all your steps until above.
Do I need to open something in my hardware firewall? HTTPS is open obviously as step 5 works.
Thanks!