Upgrading Standalone ESXi Via esxcli

I spent a lot of time struggling with the simple issue of upgrading my ESXI from virtually no experience. First, I started out by looking for ways to upgrade. What I found was that it was supposed to be relatively easy to use the vSphere vCenter server application to download and apply updates.

So I went ahead and set that VM up on my ESXI host. However, if you want to perform ESXi updates you need to have two physical hosts so that the VM hosting the vCenter server can be migrated over to it during in order to facilitate the ESXi upgrade. After all, since it’s a VM living on your ESXi host, it would be unavailable when ESXi goes down for the upgrade.

Once I explored this option fully I backed up and researched how to update ESXi without vCenter server. Finally, I found what I was looking for: command line tools to upgrade the host.

esxcli software profile update -p PACKAGE-NAME -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

This was nice an all, but I kept getting failures with the message: “Got no data from process”

Not helpful.

Thinking that it was a download failure, I manually downloaded a depot update from https://customerconnect.vmware.com/patch/.

Copying the file to my working directory I tried to execute using the zip as the path, but I kept getting errors here too.

Finally I took a look at my zip file and realized that it was several hundred megabytes short of what it should be, so I copied the file to my datastore where I knew I had more space and ran the update again.

This proved successful so I decided to try the latest update and pull from the depot again. After rebooting I changed my working directory to the datastore and ran the command again.

Moral of the story

Make sure you have enough disk space before you attempt your upgrades 😀

TL;DR

Place ESXi host in maintenence mode

Enable SSH

SSH into host and check profile version

esxcli software profile get

Enable host firewall rule to allow web traffic

esxcli network firewall ruleset set -e true -r httpClient

Change working directory to one that has enough space for your downloads

List online depot profiles available

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

Select the package you want to install and replace it in the following command

esxcli software profile update -p <PACKAGE-NAME> -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

If you receive a successful response, reboot and validate the profile version. SSH may have been re-disabled on reboot for security purposes so you can login to the web console and check there.

reboot

esxcli software profile get

References

https://docs.macstadium.com/docs/update-standalone-esxi-host-via-online-bundle

https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.esxi.upgrade.doc/GUID-E51C5DB6-F28E-42E8-ACA4-0EBDD11DF55D.html#GUID-E51C5DB6-F28E-42E8-ACA4-0EBDD11DF55D

Agent[31]

Agent[31] is a Cyber Pyscho. He might be doing home network, cybersecurity, or surfing the cyberwebs. Reach into his cybernet and glean some (hopefully) useful information.