vSphere 6

How to update an ESXi 6.0 host from commandline

The process of updating an ESXi 6.0 host from commandline is a very painless operation.  Especially if you have a standalone host and don’t have access to VUM for updates, this procedure works well for me to get the latest updates, and then apply the update.  Let’s take a look at how to update an ESXi 6.0 host from commandline.

First things first, we need to place the host in maintenance mode.  From the vSphere client, simply right-click the host and select Enter Maintenance Mode.

vm6update01

  • After successfully going into maintenance mode, you will see this designated in vSphere client

vm6update02

 

Next, we issue a series of commands to successfully update the host:

esxcli network firewall ruleset set -e true -r httpClient

esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep 6.0.0-2015

esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.0.0-20150404001-standard

The second command above adds the grep command to narrow down on the updates that we want to display.  If you don’t grep for a specific version, you will see a huge list of updates which can get confusing if you are trying to parse through and choose the correct one.  The above commands are executed in successive order and results will look similar to below:

vm6update03
vm6update04

You will see the note above if you scroll up in the commandline results that the update completed successfully, but the system needs to be rebooted for the changes to be effective.  After you see that message you are good to issue the reboot command.

After the host reboots, verify the new version of the host:

  • Old version number

vm6update05

  • New version number

vm6update06

The final step in the process is to exit maintenance mode on the host.  Simply right click again on the host and choose Exit Maintenance Mode

vm6update07

 

Final Thoughts

So far I have never ran into an issue updating standalone hosts this way.  The update process has always been rock solid.  Let me know your thoughts in comments section if you guys have any other tips to share on the standalone update process from commandline.

Subscribe to VirtualizationHowto via Email 🔔

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

5 Comments

    1. Jason,

      Sure is…you can use esxcli in an ssh session – esxcli system maintenanceMode….or you can use powercli – Set-VMHost -VMHost Host -State “Maintenance”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.