Upgrading from ESXi 5.5 to ESXi 6.x via SSH and esxcli
In the wake of VMware’s release of ESXi 6.0, I upgraded my ESXi 5.5 server to ESXi 6 using the install ISO file. However, it is also possible to perform the upgrade from 5.5 to 6.0 via SSH and esxcli. For more details, see below the jump.
To upgrade from ESXi 5.5 to 6.0 using esxcli:
1. Shut down all VMs running on your ESXi host machine.
2. Connect via SSH and run the following command to enter maintenance mode:
vim-cmd /hostsvc/maintenance_mode_enter
3. 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
4. Next, run the following command to list the ESXi 6.x 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-6
5. Once you’ve identified the correct version of VMware (as of 4-18-2015, this is ESXi-6.0.0-20150404001-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-6.0.0-20150404001-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.
6. Once the update has been installed and prompts you to reboot, run the following command to restart:
reboot
7. 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 6.x.
Hello
the “esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-6″ command show nothing for me
i can acces the source with my browser. Any idea ?
@Bertrand had the same problem. was related to not being able to do a lookup. fixed it by running “esxcli network ip dns server add -s “. Hope this helps!
On one of my ESXi host at home, it works without any issue. But on the 3 ESXi hosts at work, the command just hangs (it’s showing nothing and i can’t even do a ctrl-c to cancel it, i need to kill the process).
I checked network config and it’s ok. I checked the httpClient rule and it is ok. I’m a bit lost.
PS: i can still ping hostupdate.vmware.com from the hosts where it doesn’t work.
PS2: i have no proxy
Also if you are behind a firewall/proxy you can add –proxy http://my.proxy.server:8080 to the command as well:
esxcli software sources profile list -d \ https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml \
–proxy http://proxy.company.com:8080 | grep ESXi-6
Thank you! It works.
Very, very helpful. Thank you very much, I could upgrade my Microserver over Internet, perfect. I appreciate your work.
Supper! It solves my problem with storage sensor for LSI 9260-8i Raid Controller. Installing ESX 6.0 from ISO was not showing this sensor any more. With this update way it works!
Excellent!! Thanks for posting this, I updated my first host using a new flash drive with the ESXi 6 installer, and my second host stopped booting from USB for some reason. Started the elgoog searching and came upon this. It worked wonders!! Thanks!!!
Thanks for your guide, it worked all fine!
Same issue here with the “list” command not showing any entries… Changed the “grep” part a bit and it works fine, so doesn’t seem to be network related…
# esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i “ESXi-6.0.0-2016”
i just did this and after the reboot command waiting till i could ping the host and now I cant ssh or connect the host to vcenter.
It is working now weird it took 1 hour, i noticed ports 443 did not work but 902 worked. Now all of the sudden 443 works and i can connect to it!!
Very nice. As a note, the dates are in YYYY-MM-DD-XXX format.
Eg, for this:
ESXi-6.0.0-20160804001-standard
The date breaks down to this:
2016 – August – 4th – 001 (I assume this could be incremented to 002 or higher if there is a need).
Thanks this helped me a lot! I am complete VMWware newbie with zero training (yes it would be so nice to have some.. but..) All went according to plan upgrading from 5.5 to 6.0. On another note, if brilliant people like this stopped sharing all their info my job would be impossible some days.. 🙂 🙂
Kudo’s this works great!