Home > VMware, VMware ESXi > Upgrading from ESXi 5.5 to ESXi 6.x via SSH and esxcli

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

Screen Shot 2015 04 18 at 7 53 21 PM 

 

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

Screen Shot 2015 04 18 at 7 55 09 PM

 

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

Screen Shot 2015 04 18 at 7 57 45 PM

 

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.

Screen Shot 2015 04 18 at 8 04 11 PM

 

6. Once the update has been installed and prompts you to reboot, run the following command to restart:

reboot

Screen Shot 2015 04 18 at 8 05 13 PM

 

7. After your ESXi host restarts, connect via SSH and run the following command to exit maintenance mode:

vim-cmd /hostsvc/maintenance_mode_exit

Screen Shot 2015 04 18 at 8 25 22 PM

 

At this point, your ESXi host should be upgraded to ESXi 6.x.

Screen Shot 2015 04 18 at 8 17 14 PM

Categories: VMware, VMware ESXi
  1. Bertrand
    April 21, 2015 at 12:19 pm

    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 ?

  2. Ben
    April 21, 2015 at 9:06 pm

    @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!

    • August 12, 2015 at 7:41 am

      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

  3. hatingfruit
    April 27, 2015 at 1:41 am

    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

  4. y.man
    June 26, 2015 at 9:01 am

    Thank you! It works.

  5. August 14, 2015 at 3:52 pm

    Very, very helpful. Thank you very much, I could upgrade my Microserver over Internet, perfect. I appreciate your work.

  6. MT
    September 2, 2015 at 8:15 pm

    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!

  7. loving_veggies
    December 23, 2015 at 5:25 am

    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!!!

  8. Markus K.
    January 9, 2016 at 1:50 pm

    Thanks for your guide, it worked all fine!

  9. January 18, 2016 at 3:21 pm

    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”

  10. D3v
    June 11, 2016 at 6:02 am

    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.

  11. D3v
    June 11, 2016 at 6:37 am

    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!!

  12. Tyler J
    August 8, 2016 at 8:04 pm

    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).

  13. NSP
    February 16, 2017 at 10:28 am

    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.. 🙂 🙂

  14. Miep
    March 24, 2017 at 1:19 pm

    Kudo’s this works great!

  1. No trackbacks yet.

Leave a comment