Upgrade VMware ESXi 6.5 to 6.7 using the esxcli console tool

I decided to run VMware ESXi on my Online/Scaleway Start-2-L server. Using the online.net installer, you can “only” get ESXi 6.5.0d (64BITS). So here’s how to upgrade to 6.7.

Get VMware ESXi 6.5 ready

Install the ESXi distribution using the online.net wizard. Then connect to the ESXi Web GUI.

First of all, change the root password that was initially configured during installation.

Then enable SSH by browsing to https://my_esxi/ui/#/host/manage/services, selecting the “TSM-SSH” service and changing the “Policy” to “Start and stop with host”. Finally, “Start” the SSH service.

Upgrade to VMware ESXi 6.7

Log in using SSH and check the actual ESXi version:

# vmware -v
VMware ESXi 6.5.0 build-4887370

To avoid the “[Errno 28] No space left on device” issue, the trick is to set up swap on the available datastore. To do so, browse to https://my_esxi/ui/#/host/manage/system/swap. Click “Edit settings” and set the “Datastore” property to “datastore1”. Click “Save” to apply.

Back on the SSH session, we can check for the available upgrades:

# esxcli software sources profile list --depot=https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep '^ESXi-6.7.*standard' | sort -u
ESXi-6.7.0-20180604001-standard   VMware, Inc.  PartnerSupported
ESXi-6.7.0-20190801001s-standard  VMware, Inc.  PartnerSupported
ESXi-6.7.0-20190802001-standard   VMware, Inc.  PartnerSupported
ESXi-6.7.0-8169922-standard       VMware, Inc.  PartnerSupported

Enable access to remote HTTP sites:

# esxcli network firewall ruleset set -e true -r httpClient

Issue an upgrade test to the latest ESXi 6.7 version:

# esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTI
ON/main/vmw-depot-index.xml -p ESXi-6.7.0-20190802001-standard --dry-run
Update Result
   Message: Dryrun only, host not changed. The following installers will be applied: [BootBankInstaller, LockerInstaller]
   Reboot Required: true
   VIBs Installed: (...)

Everything should be OK. So let’s upgrade the ESXi and reboot:

# esxcli software profile update -d https://hostupdate.vmware.com/software/VUM/PRODUCTION
/main/vmw-depot-index.xml -p ESXi-6.7.0-20190802001-standard
Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMW_bootbank_ata-libata-92_3.00.9.2-16vmw.670.0.0.8169922, (...)
   VIBs Removed: VMW_bootbank_ata-libata-92_3.00.9.2-16vmw.650.0.0.4564106, (...)
   VIBs Skipped:

# reboot

Back on the SSH session, the upgrade can’t be verified:

# vmware -v
VMware ESXi 6.7.0 build-14320388

The version can also be verified from the Web GUI. In https://my_esxi/ui/#/host, the version property shows: 6.7.0 Update 3 (Build 14320388).

The datastore1 is located on an SSD drive so I’ll keep it there. But one may rollback to the previous swap configuration after upgrade.


Author: Joel Carnat

@work Technical Architect and SysAdmin ; @home OpenBSD and FOSS, Karate, Kobudō, Jōdō, Bodyweight workout, Photography & Music

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.