💾 Archived View for gmi.runtimeterror.dev › upgrading-standalone-vsphere-host-with-esxcli › index.gm… captured on 2024-05-10 at 10:50:02. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
2022-10-15
You may have heard that there's a new vSphere release out in the wild - vSphere 8, which just reached Initial Availability this week [1]. Upgrading the vCenter in my single-host homelab is a very straightforward task, and using the included Lifecycle Manager would make quick work of patching a cluster of hosts... but things get a little trickier with a single host. I could write the installer ISO to a USB drive, boot the host off of that, and go through the install interactively, but what if physical access to the host is kind of inconvenient?
[1] vSphere 8, which just reached Initial Availability this week
The other option for upgrading a host is using the `esxcli` command to apply an update from an offline bundle. It's a pretty easy solution (and can even be done remotely, such as when connected to my homelab [2] via the Tailscale node running on my Quartz64 ESXi-ARM host [3]) *but I always forget the commands.*
[3] Tailscale node running on my Quartz64 ESXi-ARM host
So here's quick note on how I upgraded my lone ESXi to the new ESXi 8 IA release so that maybe I'll remember how to do it next time and won't have to go Neeva [4]'ing for the answer again.
Downloading the Offline Bundle from VMware Customer Connect [5] yields a file named `VMware-ESXi-8.0-20513097-depot.zip`.
I've found that the easiest way to do this it to copy it to a datastore which is accessible from the host.
Image: Offline bundle stored on the local datastore
The host will need to be in maintenance mode in order to apply the upgrade, and since it's a standalone host it won't enter maintenance mode until all of its VMs have been stopped. This can be easily accomplished through the ESXi embedded host client.
I can do that by SSH'ing to the host and running:
esxcli system maintenanceMode set -e true
And can confirm that it happened with:
esxcli system maintenanceMode get Enabled
Because this is an *upgrade* from one major release to another rather than a simple *update*, I need to know the name of the profile which will be applied. I can identify that with:
esxcli software sources profile list -d /vmfs/volumes/nuchost-local/_Patches/VMware-ESXi-8.0-20513097-depot.zip Name Vendor Acceptance Level Creation Time Modification Time ---------------------------- ------------ ---------------- ------------------- ----------------- ESXi-8.0.0-20513097-standard VMware, Inc. PartnerSupported 2022-09-23T18:59:28 2022-09-23T18:59:28 ESXi-8.0.0-20513097-no-tools VMware, Inc. PartnerSupported 2022-09-23T18:59:28 2022-09-23T18:59:28
<-- note -->
When using the `esxcli` command to install software/updates, it's important to use absolute paths rather than relative paths. Otherwise you'll get errors and wind up chasing your tail for a while.
<-- /note -->
In this case, I'll use the `ESXi-8.0.0-20513097-standard` profile.
Now for the moment of truth:
esxcli software profile update -d /vmfs/volumes/nuchost-local/_Patches/VMware-ESXi-8.0-20513097-depot.zip -p ESXi-8.0.0-20513097-standard
When it finishes (successfully), it leaves a little message that the update won't be complete until the host is rebooted, so I'll go ahead and do that as well:
reboot
And then wait (oh-so-patiently) for the host to come back up.
Once the reboot is complete, log in to the host client to verify the upgrade was successful. You can then exit maintenance mode and start powering on the VMs again.
The upgrade process took me about 20 minutes from start to finish, and now I'm ready to get on with exploring what's new in vSphere 8 [6]!
---
Enabling FIPS Compliance Fixes Aria Lifecycle 8.14
Quick Salt State to Deploy Netdata
Tailscale Feature Highlight: SSH, Serve, and Funnel
---