How-To
How To Update an ESXi Host to ESXi 6.5 Using the Command Line
It's not as daunting as it may appear.
To take advantage of new and updated features in vSphere 6.5, I recently needed to update one of my lab systems from ESXi 6.0 to ESXi 6.5. As the system was co-located, I decided to update it from the command line using vSphere update bundle, rather than an ISO image burned on a DVD. In this article, I'll outline the steps I took.
First, I checked the VMware HCL to see if the system (a Dell R610) was certified for vSphere 6.5; it wasn't. This didn't really concern me too much, because it takes vendors a while to certify their systems, and an older system like an R610 was probably pretty far down their list. I did know, however, that the R610 uses popular commodity hardware, so I felt confident that vSphere 6.5 would most likely install and run on it without any issues.
I downloaded the "VMware vSphere Hypervisor (ESXi) Offline Bundle" zip file (Figure 1) to my desktop, and then uploaded the zip file to the ESXi server which I needed to update using Win-SCP. I then uploaded the offline bundle on an SSD-backed datastore on the server called "/vmfs/volumes/MySSDR610."
Updating the System
After uploading the offline bundle to the ESXi host, I connected to the ESXi host using PuTTY, an SSH client, and verified the version of ESXi that the system was running by issuing the following esxcli command:
esxcli system version get
This confirmed that the system was running ESXi 6.0.
I then updated the system using these esxcli commands:
esxcli software profile update -p ESXi-6.5.0-4564106-standard -d
vmfs/volumes/MySSDR610/VMware-ESXi-6.5.0-4564106-depot.zip
After waiting about 10 minutes, I received a message in PuTTY indicating that the system was updated and needed to be rebooted.
I rebooted the system after placing the system in maintenance mode. I accomplished this from the command line by using following commands:
esxcli system maintenanceMode set --enable true
esxcli system shutdown reboot --reason="updated to 6.5"
After allowing the system a few minutes to complete the reboot process, I reconnected to the system using SSH. After running the command below, I noticed that it had indeed updated to ESXi 6.5.
esxcli system version get
The VMware Host Client
As ESXi 6.5 comes standard with the VMware Host Client (
Figure 2), I was able to point my Web browser to the ESXi system and log in as root. I could then use my browser to inspect and manage my system and take it out of maintenance mode.
By default, the timeout value for the VMware Host Client is set to 15 minutes. As I will be contacting  this server from a Web browser in a secure location, I wanted to change the timeout to two hours. To do this, I selected the triangle to the right of the user login identifier located on the top right of the Web page, selected "Settings," then "Application timeout" and selected a timeout value of two hours (Figure 3).
The Host Client has limited capabilities, one of which is the lack of ability to sort the VMs to identify which ones are currently powered on. I overcame this obstacle by sorting by Host CPU usage in descending order (Figure 4), since doing so sorts the VMs that are powered on and consuming CPU at the top of the list.
Command Performance
It took me a little over a half an hour to download the bits and update my system to vSphere 6.5 using the command line. ESXi hosts can be updated through other means, but since I had limited access to the system, using the command line and esxcli commands in my case was a good way for me to update my system.
About the Author
Tom Fenton has a wealth of hands-on IT experience gained over the past 30 years in a variety of technologies, with the past 20 years focusing on virtualization and storage. He previously worked as a Technical Marketing Manager for ControlUp. He also previously worked at VMware in Staff and Senior level positions. He has also worked as a Senior Validation Engineer with The Taneja Group, where he headed the Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on X @vDoppler.