Upgrading from ESXi 6.5 to ESXi 6.7 via SSH and esxcliFollowing VMwares release of ESXi 6.7, I upgraded my ESXi 6.5 server to ESXi 6.7 using SSH and esxcli. For those interested, see below the jump for the details of the process I used.

After yesterdays upgrade ESXi 6.x to 6.7 via ISO, which is the easiest method, today well explore two other ones of upgrade ESXi 6.x to 6.7 via CLI. One of the methods will use directly the Internet so youll need an Internet connection on the host youll want to upgrade. The second method will use an offline bundle, but free users does not have an access to this download. So unless your organization has a paid version of ESXi and vSphere (and I hope so), you cannot as free ESXi user, download the VMware-ESXi-6.7.0-8169922-depot.zip file from VMware.But lets start with the method which upgrades ESXi 6.x to 6.7 via CLI and uses the VMware OnLine depot. Its freely accessible without a paid license of any VMware product. I think that VMware does this in purpose just to make things a little bit more difficult -:).The process is fairly similar to what weve already done for 6.0 to 6.5 upgrade, but lets recap this for new users and new folks who learning about VMware virtualization technology.Upgrade ESXi 6.x to 6.7 via CLI  from VMware OnLine depotStep 0:Enable swap on local datastore  connect to your ESXi host via HTML5 host client by typing https://IP_or_FQDN/ui and going to the Manage > System > Swap > Edit Settings > Drop Down and Select your local datastore.>Note: If you dont do that, youll end up with an installation error saying Failed updating the bootloader: Execution of command /usr/lib/vmware/bootloader-installer/install-bootloader failed: non-zero code returned . return code: 1Step 1:Connect to your ESXi host via host client and enable SSH (if you havent already done yet), then enter a maintenance mode and enable one firewall rule for web traffic (disabled by default) with this command:

esxcli network firewall ruleset set -e true -r httpClient

Step 2: Enter this command to list all available profiles. We filter only those which are relevant to our case  upgrade to ESXi 6.7*********************************************************************Shop for vSphere licenses at VMware Store:

https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i ESXi-6.7Youll see two profiles. We pick the ESXi-6.7.0-8169922-standard one for our situation.Step 3: The upgrade  Execute this command which will use the profile to upgrade the ESXi 6.x host>Note: The -p stands for profile and the -d stands for depot.And you should see the message saying that the upgrade was successful.Reboot the host to complete the upgrade process and you are done.Upgrade ESXi 6.x to 6.7 via CLI  via Offline BundleThe offline bundle is a file which is available for paid customers only. Free ESXi users do not have an access to this download.Step 0: The same as for the method above. You have to enable swap on the local datastore.Step 1: After downloading the VMware-ESXi-6.7.0-8169922-depot.zip file, place it (upload it) to a datastore which is visible by your ESXi host. Best would be a local datastore, if this host has some. If not, it can also be a shared datastore too.Put your host into maintenance mode, enable SSH if you havent done yet.Step 2: Execute this command to upgrade your ESXi 6.x to 6.7

Where your_datastore is the name of the datastore where you have uploaded the Offline bundle file.After checking that your upgrade was successful, reboot your host. You should see a message saying that the upgrade completed successfully.Wrap Up:As you can see, both methods are similar where the first one uses VMware Online depot (accessible to anyone) and the second one supports environments without an Internet access. Both methods are supported upgrade methods.You can use those upgrade possibilities if you do not use VMware vCenter server. However If you have vCenter server license, its pretty much easier to use VMware Update Manager (VUM) whcih is the tool to conduct those upgrades, especially for clustered environments. Well do a post on that next. Stay tuned.

VMware ESXi Command Line Tools for Getting Version and Profile Info The ESXi esxcli command line tool provides really great commands to determine the specific system version of your current ESXi server as well as the current profile if you want that information as well.To get the specific version of the ESXi server, use the following command:esxcli system version getTo get the ESXi Image Profile, use the following command:esxcli software profile getRunning the ESXCLI commands to get the ESXi system version and Image Profile Upgrade to VMware vSphere ESXi 6.7 Update 2 with Command Line The process to upgrade to VMware vsphere ESXi 6.7 Update 2 with Command Line is very straightforward. This is accomplished with a few commands. The first thing that needs to be done is to allow the ESXi host out to the Internet to pull down the required patches. To do that, use the following command:esxcli network firewall ruleset set -e true -r httpClientNow you will want to place the host into maintenance mode. You can do this from the command line with the following commands:vim-cmd /hostsvc/maintenance_mode_entervimsh -n -e /hostsvc/maintenance_mode_exitOnce you have the Image Profile for the ESXi version you want to upgrade/update to and the host is in maintenace mode, it is simply a matter of running the command for the upgrade. This is accomplished by running the following esxcli command:esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-6.7.0-20190402001-standard As a side note, if you want to search for or see the available Image Profiles with the esxcli command, you can use the following:esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-6.7.0This will search for and display the image profiles available for 6.7.0 versions which can be a good way to see what is available if you dont have access to query the latest image profiles by another means. Wrapping Up Upgrading a VMware ESXi host from the command line is easily accomplished and provides a really great and easy way to upgrade ESXi hosts to a specific Image Profile. This is especially useful if you have a standalone ESXi host or need to upgrade a host to a specific version. Using the above commands it is a simple matter of deciding on the Image Profile, allowing HTTP connectivity, placing the host in maintenance mode, and then running the update.