Check ESXi hardware compatibility for every host with one PowerCLI script

ESXi hardware compatibility HTML report: summary cards and Needs attention list

Before every ESXi upgrade the same question comes back: is all the hardware in these hosts still supported on the version we want to go to? Checking ESXi hardware compatibility by hand means opening the Broadcom Compatibility Guide, looking up the server model, the CPU, every NIC, every HBA and, for vSAN, every disk, and doing that for every host. On a few clusters that is an afternoon of copying PCI IDs.

I wrote a PowerCLI script that does it for me. Get-EsxiHardwareCompatibility.ps1 reads the hardware of every host from vCenter, looks every component up in the Broadcom Compatibility Guide and tells you per component whether it is supported on the ESXi range you give it, for example 9.0 up to 9.1.1. Since version 2.1 it also compares the driver and firmware each device runs with what the guide lists for every release in that range. You get a table in PowerShell, a CSV for Excel and an HTML report you can attach to the change.

The guide stays the source of truth. However, the guide often supports a device only with a specific driver and firmware version. The script now compares driver and firmware versions too, but ESXi doesn’t report every firmware and vendors write versions differently. So open the guide link of every row you depend on before you upgrade, certainly where the script says Check or Unknown.

Why a script for ESXi hardware compatibility

vSphere Lifecycle Manager can run a hardware compatibility check, but it checks a cluster against the image you set on it. When I take over an environment or plan an upgrade over several versions, I want a broader answer first, before I touch any image: is the server, its CPU and every network and storage controller listed for the releases I am aiming for, on every host in vCenter, in one report I can hand to the customer.

So that is what this script gives you: an ESXi hardware compatibility report for the whole vCenter. It only reads and changes nothing in vCenter or on the hosts.

What the ESXi hardware compatibility check covers

One row per component per host. The Component column says what the row is:

ComponentWhatGuide sectionMatched on
ServerServer modelSystems / ServersExact model name, then the host’s CPU series
CPUProcessorCPU SeriesExact CPUID signature (family, model, stepping)
PCIEthernet, FC, InfiniBand, RAID, SAS, SATA, NVMe controllersIO DevicesVID / DID / SVID / SSID
vSAN controllerStorage controllers of vSAN hostsvSAN I/O ControllerVID / DID / SVID / SSID
vSAN NVMeNVMe drives of vSAN hostsvSAN SSDVID / DID / SVID / SSID
vSAN diskLocal SAS/SATA SSDs and HDDs of vSAN hostsvSAN SSD / HDDModel number

The script only adds vSAN rows for hosts in a cluster with vSAN enabled. A local disk outside vSAN does not need to be in the guide. With -VsanCheck Always you can check them anyway, for example before you enable vSAN on a cluster.

Nested ESXi hosts in a lab get NotApplicable for their virtual NICs and disks, because those are never in the guide. However, the script still checks the CPU of a nested host, because the CPUID of the physical CPU passes through.

Run the ESXi hardware compatibility check

You need PowerShell 7 (or Windows PowerShell 5.1), the VCF.PowerCLI module, a vCenter account with read access, and HTTPS access to compatibilityguide.broadcom.com from the machine where you run it.

Install-Module VCF.PowerCLI -Scope CurrentUser

# Is all hardware supported on ESXi 9.0 up to 9.1.1?
$r = .\Get-EsxiHardwareCompatibility.ps1 -VCenter vc01.example.com -MinEsxiVersion 9.0 -MaxEsxiVersion 9.1.1 `
        -HtmlPath '%USERPROFILE%\Reports\{env}-hardware-{date}.html'

At the end the script prints a summary per component and status. This is a demo inventory of five Dell hosts: three PowerEdge R650 in a vSAN cluster and two older R640 in a second cluster. The guide results are real lookups I did on 23 November 2026:

Target ESXi range: ESXi 9.0 to ESXi 9.1.1
WARNING: Nothing in this report is listed for ESXi 9.1.1 in the Compatibility Guide, so that release could not be checked. Is the version right, or is it not in the guide yet?
Releases checked: ESXi 9.0, ESXi 9.1
Comparing drivers and firmware with the Compatibility Guide detail pages ...
42 rows, 5 host(s), 14 Compatibility Guide lookup(s).
  CPU, Supported                 5
  PCI, NotSupported              6
  PCI, Supported                 17
  Server, Supported              5
  vSAN controller, Supported     3
  vSAN disk, Supported           6
Driver and firmware (26 rows):
  Driver OK                      11
  Driver Update                  9
  Firmware Check                 6
  Firmware NoData                5
  Firmware OK                    9
  Firmware Unknown               6

What the ESXi hardware compatibility run tells you

Three things stand out. First of all, the warning: on the day I ran it, the guide listed ESXi 9.0 and 9.1 but nothing for 9.1.1 yet. The script tells you that instead of silently marking everything as supported. Second, six PCI rows are not supported on 9.x. Third, nine rows need another driver. I come back to that in the next section. To see which ones, filter the output to what needs attention, one line per unique device:

$r | Where-Object Status -notin 'Supported', 'NotApplicable' |
    Sort-Object Component, Name, VID, DID, SVID, SSID -Unique |
    Format-List Name, Status, MissingReleases, Driver
Name            : Broadcom / LSI MegaRAID SAS-3 3008 [Fury]
Status          : NotSupported
MissingReleases : ESXi 9.0, ESXi 9.1
Driver          : lsi_mr3

Name            : Intel(R) Ethernet Controller X540-AT2
Status          : NotSupported
MissingReleases : ESXi 9.0, ESXi 9.1
Driver          : ixgben

Name            : QLogic Corp. NetXtreme II BCM57810 10 Gigabit Ethernet
Status          : NotSupported
MissingReleases : ESXi 9.0, ESXi 9.1
Driver          : qfle3

So the R640 server and its Skylake CPU are fine on 9.0 and 9.1, but the PERC H330 Mini, the X540/I350 rNDC and the QLogic 57810 stop at ESXi 8.0 U3 (the X540 even at 7.0 U3). Those hosts need new cards before they can go to 9.x. That is exactly the kind of finding you want before the upgrade weekend, not during it. And if the fix turns out to be a new system board instead of a new card, back up the ESXi TPM recovery key first.

Driver and firmware per release

A device in the guide is not the full story. Broadcom supports a NIC or HBA on a release with specific driver versions and firmware, and those lists differ per release. Since version 2.1 the script checks that too. For every NIC, storage controller and vSAN disk that is in the guide, it reads from the host:

  • the driver version of the loaded VMkernel module (esxcli system module get);
  • the firmware, where ESXi reports it: NICs, Fibre Channel HBAs, NVMe drives and the revision of SAS/SATA disks.

Then it opens the guide’s detail page of the matching entry and compares both with what the guide lists for each release in your range. To see what to do, filter on the rows that need an update or a check:

$r | Where-Object { $_.DriverStatus -eq 'Update' -or $_.FirmwareStatus -in 'Check', 'Unknown' } |
    Sort-Object Name, DriverVersion, Firmware -Unique |
    Format-List Name, DriverVersion, DriverCheck, Firmware, FirmwareStatus, FirmwareCheck
Name           : Broadcom / LSI Fusion-MPT 12GSAS/PCIe Secure SAS38xx
DriverVersion  : 35.00.00.00-1vmw.800.1.0.22380479
DriverCheck    : ESXi 9.0: needs lsi_msgpt35 34.00.00.00-1vmw; ESXi 9.1: needs lsi_msgpt35 40.00.00.00-1OEM (newest of 4 listed)
Firmware       :
FirmwareStatus : Unknown
FirmwareCheck  : ESXi 9.0: guide lists 33.15.00.00, 24.15.14.00; ESXi 9.1: guide lists 40.15.12.00, 39.15.11.00, 33.15.00.00 (+1 more)

Name           : Broadcom BCM57414 NetXtreme-E 10Gb/25Gb RDMA Ethernet Controller
DriverVersion  : 230.0.155.0-1OEM.800.1.0.20613240
DriverCheck    : ESXi 9.0: needs bnxtnet 239.1.149.0-1OEM (newest of 7 listed); ESXi 9.1: needs bnxtnet 239.1.149.0-1OEM (newest of 6 listed)
Firmware       : 230.0.155.0/pkg 23.31.18.10
FirmwareStatus : OK
FirmwareCheck  : ESXi 9.0, ESXi 9.1: OK

Name           : Intel(R) Ethernet Controller X710 for 10GbE SFP+
DriverVersion  : 2.8.4.0-1OEM.800.1.0.20143090
DriverCheck    : ESXi 9.0, ESXi 9.1: OK
Firmware       : 9.20 0x8000d8c5 23.0.8
FirmwareStatus : Check
FirmwareCheck  : ESXi 9.0, ESXi 9.1: guide lists 23.0.0

How to read the driver check

The driver and firmware lists come from the real guide entries; the running versions are demo values. How I read this:

  • BCM57414: the running bnxtnet driver is not listed for 9.x. DriverCheck tells you which version to put in your vLCM image.
  • HBA355i: lsi_msgpt35 is an inbox driver. ESXi 9.0 comes with its own build (34.00.00.00-1vmw), so for 9.0 the “update” happens with the upgrade itself. For 9.1 the newest listed driver is an async OEM driver. The controller firmware is Unknown because ESXi doesn’t report it for SAS and RAID controllers: check it in the iDRAC.
  • X710: the driver is fine, but the firmware is Check. ESXi reports the NVM version and the Dell package version together, and the guide lists Dell’s package version 23.0.0. So 23.0.8 is close, but not what the guide lists. Exactly the kind of row to open on the guide page.

DriverStatus is OK, Update, Unknown (the host did not report a version) or NoData (the guide lists no driver for that release). FirmwareStatus is OK, Check, Unknown or NoData. Neither of them changes Status: a device can be Supported on 9.0 and still need another driver.

The ESXi hardware compatibility report in HTML has its own “Driver and firmware” section, with one line per device and running version, and two extra summary cards:

Driver and firmware section: which driver each device needs per ESXi release

If you only want the hardware check, -SkipDriverCheck turns all of this off: no extra esxcli calls and no guide detail pages.

The HTML report

With -HtmlPath you get one self-contained HTML file, with no external scripts or fonts, so you can mail it or attach it to a change. It starts with the target range, the warnings of the run, summary cards per status (plus drivers to update and firmware to check) and a “Needs attention” table with one line per unique component, the hosts that have it and a link to the guide page.

Summary cards and the Needs attention list of the ESXi hardware compatibility HTML report

Below that there is one section per host. The report expands hosts with a problem and collapses the others. Every row shows the PCI IDs, the driver in use, the releases in range, the missing releases, the driver and firmware check and the guide entry it matched:

Per-host view of the report: three PCI devices on a PowerEdge R640 that stop at ESXi 8.0 U3

In addition, there is a filter box that searches host, device name, IDs, driver, firmware and releases, and the report follows the light or dark setting of your browser.

ESXi hardware compatibility status values

StatusMeaning
SupportedThe guide lists it for every ESXi release in the range
PartialThe guide lists it for some releases in the range; MissingReleases says which
NotSupportedThe guide has it, but for no release in the range
FoundNo range given: SupportedReleases lists all releases
NotFoundNo matching entry. Open the link and search by hand
NotApplicableVirtual hardware, never in the guide
LookupFailedThe guide could not be reached; Message has the error

“Every release in the range” means every release in that range that the guide lists for at least one component in the report. The guide has no separate list of ESXi releases, so that is the best the script can do, and it warns when the lowest or highest version of your range is listed for nothing.

How the lookups work

The script uses the same web API as the guide’s own web pages (POST /compguide/programs/viewResults). William Lam documented that API, and the PCI and vSAN SSD lookups are based on his functions. It is not an official, documented API, so Broadcom can change it. If every row suddenly shows LookupFailed or NotFound, that is the first thing to suspect.

A few details that matter when you read the results:

  • PCI devices first: the script searches on all four IDs. Many guide entries leave the subdevice ID empty (meaning any), so when the exact search finds nothing, the script searches again without it. HclMatch then says WithoutSSID, and you should check on the guide page that the model is right. In the demo the I350 ports and the QLogic 57810 matched that way.
  • CPU: the script matches the exact CPUID signature the host reports, for example 0x000606A6 for Ice Lake. Several CPU series share one signature (Gold 6300 and Platinum 8300 are both Ice Lake), so the script narrows down on the model number: a Gold 6338 becomes the “6300” series.
  • Server: the guide lists a server once per CPU series. The script keeps only the entries with the host’s CPU series, so a server can be Partial when the model is supported on 9.1 with one CPU generation but not with yours.
  • vSAN disks: the script searches by model number. ESXi often reports an OEM suffix: the demo hosts report MZILT960HBHQ0D3 where the guide says MZILT960HBHQ-00007. When the full number finds nothing, the script tries again without the last three characters and HclMatch says Keyword.

Driver and firmware lookups

  • Driver and firmware come from the detail page of the matching entry (POST /compguide/programs/viewDetails). It lists per release the driver name and version and the firmware. The host reports the full driver build (2.8.4.0-1OEM.800.1.0.20143090) and the guide only the version (2.8.4.0-1OEM), so the script compares on that prefix. A card like the BCM57414 has several drivers in the guide (bnxtnet and bnxtroce); the script only compares the one the host uses.
  • One lookup per unique component. The script looks up the same NIC in twenty hosts only once, so even a large cluster costs few requests. The demo needed 14 lookups for 42 rows.

What it does not check

Be honest with yourself about what a green report means:

  • Firmware of RAID/SAS controllers and the server BIOS. ESXi doesn’t report the controller firmware (Unknown), and the BIOS version is shown but not compared. Use the iDRAC, iLO or the hardware support manager in vLCM.
  • Driver features and restrictions. A guide entry can limit a driver to some features, such as RDMA, or add notes. The script compares versions only.
  • GPUs and accelerators. They have their own guide sections, so the script skips them by default. -DeviceClass Display, 3D at least lists them.
  • SAN arrays, local disks outside vSAN, USB and SD boot devices. Arrays are in the Storage/SAN section per model and firmware.
  • vSAN ReadyNode, ESA/OSA tier and memory tiering. The guide entry shows the tier of a vSAN disk, but the script does not check that it fits your vSAN architecture.

VCF: credentials from SDDC Manager

In VCF environments, I don’t want to type the vCenter SSO password. Instead, with -UseSddcCredentials the script reads it from the SDDC Manager vault (that account needs the ADMIN role). It also uses the shared environment config of my PowerCLI repository, one JSON file per environment, so a run per customer or lab becomes one line:

.\Get-EsxiHardwareCompatibility.ps1 -Environment lab1 -UseSddcCredentials -MinEsxiVersion 9.0 -MaxEsxiVersion 9.1.1 `
    -HtmlPath '%USERPROFILE%\Reports\{env}-hardware-{date}.html' -CsvPath '%USERPROFILE%\Reports\{env}-hardware-{date}.csv'

The script never stores or prints a password. Without the vault it takes -Credential, a user or an Export-Clixml credential file from the config, or asks with Get-Credential. And if you are offline, -SkipHclLookup gives you just the hardware inventory with all PCI IDs, which you can then check by hand.

A shout-out to William Lam

This script stands on the shoulders of William Lam. His post on programmatically accessing the Broadcom Compatibility Guide showed how the guide’s web API works, and his Check-BroadcomCompatIoDevice and Check-BroadcomCompatVsanSsdDevice functions were the starting point for the PCI and vSAN SSD lookups. Thanks, William. If you work with VMware and don’t follow williamlam.com yet, you should.

Wrap-up

  • Get-EsxiHardwareCompatibility.ps1 checks server, CPU, NICs, HBAs, storage controllers and vSAN disks of every host against the Broadcom Compatibility Guide for the ESXi range you give it.
  • Since version 2.1 it also tells you per release which driver you need and whether your firmware is one the guide lists.
  • It only reads, and it looks up every unique component once.
  • Watch the range warning: a release the guide doesn’t list yet can’t be checked.
  • WithoutSSID and Keyword matches are good hints, not proof: check the model on the guide page.
  • Check and Unknown on firmware mean: open the guide page. Vendors write firmware versions differently, and ESXi doesn’t report every firmware.

Once the hardware is green, my ESX ISO Builder CE builds an unattended installer ISO per host for the new version.

References

ESX ISO Builder CE: one unattended installer ISO per host, from a CSV

ESX ISO Builder CE logo
ESX ISO Builder CE logo

Installing ESX by hand is fine once. On the fourth host you start making typos: a wrong VLAN, a wrong IP, NTP forgotten, the self-signed certificate still on localhost.localdomain, and then the VCF Installer refuses the host. A kickstart file fixes that, but getting a kickstart file into the installer is the annoying part. You need a PXE setup, a web server the installer can reach, or you rebuild the ISO by hand for every host. That’s why I wrote ESX ISO Builder.

I’ve now published it as a community edition: ESX ISO Builder CE. It’s a container with a web UI. You give it a CSV with your hosts and a profile per hardware type, and it builds one bootable, fully unattended installer ISO per host. You mount that ISO as virtual media through the iDRAC, or through a GL.iNet Comet KVM on a mini PC, boot, and walk away. The host comes up with its static IP, VLAN, FQDN, DNS, NTP and a certificate that matches its name.

The code is on my GitHub: gertvangorp/ESX-ISO-Builder-CE. MIT license.

Read this first. The generated kickstart wipes all local disks of the host it boots (clearpart --alldrives): the boot disk, the vSAN disks, the NVMe tier device. That’s what you want for a clean vSAN ESA claim, and it’s exactly what you don’t want on a host with data you still need. It’s a community project, not supported by Broadcom, and some options in the example profiles are not supported on production hardware.

How it works

 CSV + profiles.yaml ──► KS.CFG per host ──► <host>-<version>.iso (BIOS + UEFI) ──► download / virtual media URL

Three things go in:

  • An inventory: a CSV with one row per host. Name, FQDN, IP, mask, gateway, VLAN, DNS, NTP, boot disk, ESX version, BMC address.
  • A profile per hardware type in profiles.yaml: the boot disk model, which vmnic carries management, advanced and kernel settings, extra lines for /etc/vmware/config, firstboot commands.
  • The base ISO: the ESX installer ISO you download from the Broadcom support portal yourself (or a vendor or custom image). No Broadcom bits are in the repo.

The effective setting for a host is defaults ← profile ← CSV cell. A non-empty CSV cell always wins. So the profile says “Dell R640 boots from DELLBOSS VD on vmnic1″, and you only override it for the one host that’s different.

Out comes a file like esx01-9.1.1.0.25714478.iso: the original ISO with a KS.CFG and patched BOOT.CFG files added. The version is in the name, so you can see at a glance what’s on a host.

The Hosts tab of ESX ISO Builder CE with the demo Dell R640 inventory
The Hosts tab with the demo Dell R640 inventory.

No extract, no rebuild

The classic way to customise an ESX ISO is: extract it, add the kickstart, edit boot.cfg, then rebuild it with mkisofs or genisoimage and the right El Torito flags for BIOS and UEFI. That works until Broadcom changes something in the ISO layout and your flags are wrong.

I didn’t want that. The builder uses xorriso to copy the original image and replay its own boot records (-boot_image any replay). It only maps three files into the new image: KS.CFG, /BOOT.CFG and /EFI/BOOT/BOOT.CFG. Whatever the original ISO does to boot on BIOS and UEFI, the new one does the same.

In both boot.cfg files the kernelopt line gets ks=cdrom:/KS.CFG, plus a few extra options I’ll come back to. After the build the tool reads the KS.CFG back out of the new ISO and compares it, and it checks that both the BIOS and the UEFI boot entries are still there. If either check fails, you get an error instead of an ISO that doesn’t boot.

What’s in the kickstart

You can preview the kickstart for every host in the UI (the KS button) before you build anything. For a demo R640 host it starts like this:

# boot.cfg kernelopt += netdevice=vmnic1 ip=10.0.10.11 netmask=255.255.255.0 gateway=10.0.10.1 nameserver=10.0.0.53 vlanid=10 ks=cdrom:/KS.CFG
vmaccepteula
rootpw --iscrypted <sha512-hash-of-ESXI_ROOT_PASSWORD>

clearpart --alldrives --overwritevmfs
install --firstdisk="DELLBOSS VD" --overwritevmfs --ignoreprereqwarnings

network --bootproto=static --device=vmnic1 --vlanid=10 --ip=10.0.10.11 --netmask=255.255.255.0 --gateway=10.0.10.1 --hostname=demo-r640-01.lab.example.com --nameserver="10.0.0.53,10.0.0.54" --addvmportgroup=0

reboot

A few details that cost me time to get right:

  • No clear-text root password in the ISO. The password sits in .env on the builder and is hashed with SHA-512 at build time. Only the hash goes in (rootpw --iscrypted).
  • No --overwritevsan. You’d expect it on a vSAN host, but the installer aborts with “disk … is not claimed by vSAN” when the boot disk itself is not a vSAN disk, like a Dell BOSS. clearpart --alldrives already wipes the vSAN disks, so the flag isn’t needed.
  • --firstdisk wants the full model string. FIKWOT FN955 1TB matches, FIKWOT doesn’t. When a host has several identical disks, use disk:<device id> in the CSV to point at one exact device.
  • The installer itself needs a network before it reads the kickstart. Without help it tries DHCP and sits on “Could not bring up network (Did not get an IP Address from DHCP server)” on a management VLAN without DHCP. The builder adds the same static IP, mask, gateway, DNS and VLAN as boot options in boot.cfg (netdevice=, ip=, vlanid=, …), so there’s no DHCP wait at all.

First boot: the settings kickstart can’t do

Kickstart sets the disk, password and network. Everything else runs in %firstboot:

  • FQDN and DNS search domain
  • NTP, verified afterwards, with a fallback to /etc/ntp.conf if esxcli didn’t stick during firstboot
  • SSH only if the profile says so (off by default: VCF 9.x doesn’t need it)
  • advanced settings, kernel settings and /etc/vmware/config lines from the profile
  • NVMe memory tiering, if you filled in TierDisk
  • a new self-signed certificate with CN = FQDN (/sbin/generate-certificates), because VCF validates that
  • /sbin/auto-backup.sh and a reboot when a setting needs one

The output goes to /var/log/esx-firstboot.log and to syslog. The file doesn’t always survive the final reboot, syslog does:

grep esx-firstboot /var/log/syslog.log | tail -50

One big catch: ESX does not run %firstboot on UEFI Secure Boot hosts. You’ll find this line in /var/log/kickstart.log:

SecureBoot is enabled, skipping execution of scripts in /var/lib/vmware/firstboot

So on Secure Boot hosts you get the install and the network, but no NTPnd no profile settings. Set use_firstboot: false in the profile for those hosts and apply the settings afterwards. That’s why the builder has an Ansible inventory export: per host it lists the IP, FQDN, BMC address, ISO URL and SHA-256, and also every post-install setting (NTP, DNS search, advanced and kernel settings, /etc/vmware/config lines, tiering) so your own automation can pick them up.

A quick check to see whether firstboot ran: esxcli system settings advanced list -o /UserVars/SuppressShellWarning shows 1 when it did.

NVMe memory tiering, without guessing

If you put the serial of the NVMe tier device in the TierDisk column, firstboot sets up memory tiering. On ESX 9.1 and later that’s esxcli memtier enable (in maintenance mode, no reboot). On ESXi 8.0 U3 and ESX 9.0 it uses the older tierdevice method, active after a reboot.

The script only uses a disk when exactly one local disk matches and that disk has no partitions. The boot disk always has partitions, so it can never be picked by accident. Zero or several matches, and it logs that and does nothing. A wrong tier device is not something you want a script to guess.

Profiles: Dell R640 and Minisforum MS-A2

The repo comes with two example profiles, for the hardware I use.

Dell PowerEdge R640: boot from the BOSS-S1 (DELLBOSS VD), management on vmnic1, iDRAC9 for virtual media. Short and boring, which is what a server profile should be.

Minisforum MS-A2 (Ryzen 9 9955HX, Zen 5) is my homelab. It collects every tweak that box needs:

SettingWhy
kernel entropySources=2RDRAND instead of the slow Zen 4/5 RDSEED (high CPU, Out of entropy in vmkernel.log)
cpuid.7.ebx = "-------------0------------------"Masks RDSEED from the VMs too
monitor_control.disable_apichv = "TRUE"Needed with NVMe memory tiering on Ryzen
cpuid.brandstring = "AMD EPYC Ryzen 9 9955HX"Passes the NSX Edge CPU check on consumer Ryzen
i40en LLDP=0,…X710 firmware LLDP agent off, one value per port, counted on the host
/Net/TcpipDefLROEnabled 0, /Net/UseHwTSO 0X710 hardware LRO/TSO off for vSAN ESA

I wrote about the i40en LLDP line before, in my post on the X710 and LLDP in vCenter. The value needs one entry per i40en port, and a wrong count can stop the driver from loading. So the profile counts the ports on the host with awk instead of hard-coding 0,0. The entropy and LRO/TSO settings come from William Lam’s posts, linked below. None of the MS-A2 tweaks are supported by Broadcom. They’re for a homelab.

Add your own hardware by copying a profile and changing it in the Profiles tab. Changes are picked up on the next preview or build, no restart needed.

Getting the ISO to the host

Every built ISO gets a URL under /media/, which you can download or hand to the BMC as virtual media. In my setup that’s two different things:

  • Dell R640: the iDRAC9, which mounts the ISO straight from the URL.
  • Minisforum MS-A2: a mini PC has no BMC of its own, so each node has a GL.iNet Comet KVM on it. The Comet gives you the remote console and virtual media, so you can mount the same per-host ISO there and boot from it, just like on the iDRAC. I wrote about that setup in Making the Minisforum MS-A2 datacenter-ready: out-of-band management without iDRAC. That’s why the MS-A2 profile has bmc_type: comet and the CSV has the Comet’s FQDN in BmcAddress.

The iDRAC9 gave me two quirks:

  • iDRAC9 reads the ISO slowly over HTTPS: lots of small range requests, with TLS on the iDRAC’s own CPU. Over plain HTTP it’s much faster.
  • iDRAC9 does not answer a Basic auth challenge on plain HTTP. You see one HEAD … 401 in the builder log and an InsertMedia error “Unable to locate the ISO or IMG image file” in the iDRAC.

The fix for both is an optional second listener: media-only, plain HTTP, which serves nothing but /media/*.iso and /healthz. With MEDIA_HTTP_ALLOW you allow your BMC subnet without a login. Everything else still needs the UI or the media account. Restrict that port to the BMC subnet in your firewall as well.

If the iDRAC gives a Redfish 400 QueryNotSupported when you use the builder by FQDN but it works by IP, that’s the iDRAC Host Header Check. Set the DNS iDRAC name and a static DNS domain under iDRAC Settings → Network → Common.

Setting up ESX ISO Builder

You need a Docker host on the management network. Run it outside the clusters you’re rebuilding, so you don’t saw off the branch you’re sitting on.

git clone https://github.com/gertvangorp/ESX-ISO-Builder-CE.git && cd ESX-ISO-Builder-CE
cp .env.example .env && chmod 600 .env && vi .env
mkdir -p data/iso certs && sudo chown -R 10001:10001 data
docker compose up -d --build

In .env you set the ESX root password (or a ready-made hash from openssl passwd -6), the UI login, a separate read-only media login and PUBLIC_URL. Nothing is hard-coded in the repo, and .env belongs in your password manager, not in a Git repo.

Then open https://<host>:8443/. It serves plain HTTP until you put a certificate in certs/server.crt and certs/server.key. The container runs read-only, as a non-root user, with all capabilities dropped.

On the first start you get two demo inventories (an R640 and an MS-A2 cluster, on example.com) and the example profiles.yaml. Replace them with your own hosts.

  1. ISO library: upload the ESX installer ISO, or copy it to data/iso/. The file name must contain the version you use in the CSV, for example ESX-9.1.1.0.25714478-custom.iso.
  2. Hosts: import your CSV or add hosts one by one. The host editor validates while you type: gateway in the subnet, no duplicate IPs or names, and a live DNS check for the A and PTR record. VCF needs both, and it’s nicer to see a red line here than an error in the VCF Installer an hour later.
The ESX ISO Builder CE host editor with live validation and DNS check
The host editor with live validation. The demo FQDN doesn’t resolve, so the DNS check shows it right away.
  1. KS: preview the kickstart for a host.
  2. Build one host or Build all enabled. With Build with you can build the whole inventory against another ESX version for one run, without touching the CSV.
  3. Mount the ISO as virtual media on the iDRAC or the Comet, boot from it once, and wait.

To find the boot disk model or a tier disk serial, run this on a host or in the installer console (Alt+F1, root, empty password):

esxcli storage core device list | grep -E '^(t10|naa|eui|mpx)|Model:'

Backup and the API

The Backup tab saves profiles.yaml, every inventory and the build manifests. Before every change the tool takes a restore point by itself, and a restore runs as a dry run first. The ISOs and .env are not in the backup.

Everything in the UI is also in the REST API (OpenAPI at /api/docs), with the same login. Calls that change something need the header X-Builder: 1. To pull a backup off the box every night:

curl -u admin -H 'X-Builder: 1' https://esx-builder.example.com:8443/api/backup -o esx-builder-backup.zip

Wrap-up

  • One CSV row and one profile per hardware type give you one unattended installer ISO per host, with static IP, VLAN, FQDN, DNS, NTP and a certificate that matches the name.
  • xorriso replays the original BIOS and UEFI boot records, so there’s no extract and rebuild that breaks when the ISO layout changes.
  • The installer gets its static network as boot options: no DHCP needed on the management VLAN.
  • %firstboot doesn’t run on Secure Boot hosts. Use use_firstboot: false there and take the settings from the Ansible inventory export.
  • The kickstart wipes every local disk. Check the inventory before you boot an ISO.

Try it, break it, and open an issue on GitHub if something doesn’t work on your hardware: gertvangorp/ESX-ISO-Builder-CE.

References

Back up your ESXi TPM recovery key before the motherboard gets swapped

Dell PowerEdge R640 TPM 2.0 module (Nuvoton NPCT650) on the system board

If your ESXi host has a TPM 2.0 chip, its configuration is sealed to that chip. Replace the motherboard without the ESXi TPM recovery key, and the host greets you with a purple screen and a reinstall. That goes for any server with a TPM 2.0 device: Dell, HPE, Lenovo, Cisco or a homelab box.

I learned this at a customer. A system board in one of their Dell PowerEdge R640 hosts was replaced, and nobody had backed up the TPM recovery keys. I didn’t think about it either: a new board also means a new TPM, and the old one takes the key to the ESXi configuration with it. Without the recovery key there is no way to unlock that configuration on the new TPM, and we couldn’t recover it. We ended up reinstalling the host. This post covers the three parts you need: configure the TPM correctly (with a Dell R640 as the example), back up the recovery key of every host, and restore a host after the TPM or motherboard is replaced.

What the TPM actually protects

Since ESXi 7.0 U2 the host configuration is encrypted (secure ESXi configuration). When the host has a working TPM 2.0, the encryption key is sealed in the TPM. Check it on any host:

esxcli system settings encryption get
   Mode: TPM
   Require Executables Only From Installed VIBs: false
   Require Secure Boot: false

Mode: TPM means the key lives in the TPM. Mode: NONE means the host has no usable TPM and the key is stored in the bootbank instead.

With TPM mode on, ESXi generates a recovery key. That key is the only way to unlock the configuration when the TPM is no longer the same chip.

Why a board swap is the dangerous one

On most servers the TPM 2.0 is a small plug-in module on the system board, or built into the board firmware. Physically you can often take that module out, but the TPM is cryptographically bound to the motherboard. You can’t move the existing module to another board and expect ESXi to carry on as before.

There are two different scenarios:

  • Replacing only the TPM module. Whether that is possible depends on the vendor and the board design. Many TPM modules are specific to a motherboard generation and need firmware configuration. ESXi sees a different TPM.
  • Replacing the entire motherboard. The new board has a different TPM identity, with a new Endorsement Key. ESXi detects a different TPM, and the TPM-backed configuration needs the recovery key.

In both cases ESXi can no longer unseal its configuration with the TPM it had.

Dell PowerEdge R640 TPM 2.0 module (Nuvoton NPCT650) on the system board
The TPM 2.0 plug-in module on a Dell R640 system board. It is cryptographically bound to the board, so a new board means a new TPM identity.

Broadcom KB 316424 lists the hardware changes that can bite you:

  • system board / motherboard replacement
  • CMOS battery replacement
  • CPU or RAM replacement

The KB is clear about the worst case: if the recovery key was never saved and the motherboard is replaced, the host needs a full ESXi reinstall. A configuration backup alone is not enough.

Step 1: configure the TPM

Whatever the vendor, ESXi needs the same things from the BIOS: UEFI boot, Secure Boot, the TPM 2.0 enabled and set to SHA-256. ESXi supports TPM 2.0 only with SHA-256. If the BIOS uses SHA-1, vCenter shows the alarm “TPM 2.0 device detected but a connection cannot be established” (Dell KB 000193231). Intel TXT is optional but often enabled together with the TPM.

The menu names differ per vendor. On a Dell R640, in System Setup (F2 at boot):

  1. Check that the boot mode is UEFI and Secure Boot is enabled.
  2. System BIOS > System Security > TPM Security: On. Save and reboot.
  3. System BIOS > System Security > TPM Advanced Settings > TPM2 Algorithm Selection: SHA256.
  4. System BIOS > System Security > Intel TXT: On. Save and reboot.

If the host is already in vCenter with the TPM alarm, Dell advises to remove it from vCenter before you change these settings and add it again afterwards.

On a Dell you can also do this from the iDRAC with racadm. Attribute names can differ between BIOS versions, so list them first:

racadm get BIOS.SysSecurity
racadm get BIOS.BiosBootSettings.BootMode

Then set the values you need and create a BIOS job that applies them at the next power cycle:

racadm set BIOS.SysSecurity.TpmSecurity On
racadm set BIOS.SysSecurity.IntelTxt On
racadm jobqueue create BIOS.Setup.1-1 -r pwrcycle -s TIME_NOW

After the reboot, check on the host that ESXi sees the TPM:

esxcli hardware trustedboot get
esxcli system settings encryption get

In vCenter the host should show as Passed under Cluster > Monitor > Security.

Step 2: back up the ESXi TPM recovery key of every host

On one host it’s one command:

esxcli system settings encryption recovery list
Recovery ID                             Key
--------------------------------------  ---
{3B5C1E52-...}                          2290-...

Save the Recovery ID together with the key. The ID tells you which key belongs to which host when you have a list of them.

Doing that over SSH on every host is not something you want to repeat. So I wrote a small PowerCLI script that does it for all hosts in one or more clusters through vCenter. It only reads, it changes nothing:

.\Get-TpmRecoveryKey.ps1 -VCenter vc01.corp.local -Cluster CL-MGMT-01 | Format-Table
VMHost           Cluster    EncryptionMode RecoveryId   Key       Status  Message
------           -------    -------------- ----------   ---       ------  -------
esx01.corp.local CL-MGMT-01 TPM            {3B5C...}    2290-...  OK
esx02.corp.local CL-MGMT-01 NONE                                  NoKey   No recovery key (TPM configuration encryption not active?)
esx03.corp.local CL-MGMT-01                                       Skipped Host is NotResponding

Hosts that are disconnected, have no key or fail are in the output too, with the reason. A host with NONE is worth a look: that usually means the TPM is off in the BIOS or set to SHA-1.

On VCF you don’t need to type the vCenter password. With -UseSddcCredentials the script reads the vCenter SSO account from the SDDC Manager vault, so you only log in to SDDC Manager:

.\Get-TpmRecoveryKey.ps1 -VCenter vc01.corp.local -SddcManager sddc01.corp.local -UseSddcCredentials

Add -CsvPath if you want a CSV. The script is on my GitHub: Get-TpmRecoveryKey.

The output contains secrets. Put the keys in your password manager or vault, and delete the CSV from disk afterwards. A recovery key in a file share next to the hosts it unlocks is not a backup, it’s a risk.

When do you run it? After you enable TPM mode on new hosts, after a reinstall, and before you log a hardware call with your vendor.

Step 3: before the technician comes in

When you know a board swap is coming, prepare the host (KB 316424):

  1. Put the host in maintenance mode.
  2. Run the script (or esxcli system settings encryption recovery list) and check that the key is in your vault.
  3. Sync and back up the configuration:
vim-cmd /hostsvc/firmware/sync_config
vim-cmd /hostsvc/firmware/backup_config
  1. Power off the host and let the technician do the swap.

The new board comes with a new TPM. Run through Step 1 again: a replacement board does not always come with the BIOS settings you had, so check the TPM, SHA-256 and Secure Boot settings before you boot ESXi.

Step 4: restore ESXi with the TPM recovery key

  1. Power on the host and open the remote console (iDRAC, iLO, XClarity, CIMC, …).
  2. At the ESXi boot screen press Shift+O (the letter O, not zero).
  3. Leave the existing bootUUID=... alone. Add a space and then the key:
bootUUID=<existing UUID> encryptionRecoveryKey=<your recovery key>
  1. Press Enter. The host decrypts its configuration and boots.

The key is long. If your remote console supports pasting text (on Dell, iDRAC9 with a Datacenter license), paste it instead of typing it.

Watch out for one thing: if you press Shift+O more than once, it’s easy to end up with a trailing “O” on the bootUUID. Then the configuration can’t be saved after the recovery and the host asks for the key on every boot (KB 410638). Check the boot options with bootOption -poC if that happens.

Once the host is up, SSH to it and seal the configuration to the new TPM, then save it:

esxcli system settings encryption set --mode=TPM
/sbin/auto-backup.sh

The output of auto-backup.sh should show the bootbank being saved and esx.conf being encrypted with a key ID. Reboot once without the recovery key to be sure it sticks.

Finally, run the script again. The new TPM means a new recovery key, and your vault now holds the old one.

vCenter attestation after the swap

vCenter remembers the Endorsement Key of the old TPM. After the swap it sees a different EK, shows a TPM endorsement key mismatch alarm and attestation goes to Failed. KB 440352 describes this for ESXi 8.x, including a PSOD when the old keys stay in the vCenter database.

The light fix is to disconnect and reconnect the host in vCenter (or remove it and add it again) so it learns the new EK, and then clear the alarm. If that doesn’t do it, KB 440352 has a procedure that clears the stored keys directly in the vCenter database. That is a database edit: take a snapshot of the vCenter appliance first, and open a case with Broadcom if you are not comfortable with it.

Wrap-up

  • With a TPM 2.0, ESXi seals its configuration to that chip. This is not specific to one vendor: on any server a new TPM module or a new board means a different TPM identity.
  • Configure the BIOS for ESXi: UEFI, Secure Boot, TPM 2.0 on, SHA-256. On a Dell R640 that is TPM Security On, SHA256 and Intel TXT On.
  • Back up the recovery key of every host and keep it in a vault, not in a CSV on a share. My Get-TpmRecoveryKey script does that for whole clusters.
  • After the swap: Shift+O, encryptionRecoveryKey=, then esxcli system settings encryption set --mode=TPM and /sbin/auto-backup.sh.
  • Back up the new key afterwards, and fix the attestation in vCenter.

References

Making the Minisforum MS-A2 datacenter-ready: out-of-band management without iDRAC

GL.iNet Comet (GL-RM1): USB 2.0, HDMI in, USB-C keyboard/mouse, USB-C power and Ethernet

The Minisforum MS-A2 is a great ESXi node for a home lab: small, quiet, plenty of cores and room for three NVMe disks. What it lacks is the one thing every real datacenter server has: a BMC. There is no iDRAC, no iLO and no IPMI, so when a host hangs on a purple screen, needs a BIOS change or a fresh ESXi install, you have to walk to the rack with a monitor and a keyboard.

In my V-LAB the MS-A2 hosts sit next to a Dell R640 that I can fully manage over iDRAC. I wanted the same experience for the mini PCs. The answer turned out to be two cheap, off-the-shelf devices per host:

  • a GL.iNet Comet KVM-over-IP for screen, keyboard, mouse and virtual media
  • a HomeWizard Energy Socket for remote power on, off and power cycle, with power metering as a bonus

This post shows how I set them up, how they fit in the management network, and how I use them together as a poor man’s iDRAC.

The building blocks

An iDRAC does two jobs: it gives you the console and it controls power. I split those jobs over two devices.

GL.iNet Comet (GL-RM1) is a small hardware KVM-over-IP box. It captures the HDMI output of the host and emulates a keyboard and mouse over USB-C, so the MS-A2 just sees a monitor and a keyboard. It runs a lightweight Linux, is reachable from any browser, and has a Virtual Media feature that stores ISO files on its internal eMMC and presents them to the host as a USB drive. That last part is what makes remote ESXi installs possible. GL.iNet also sells a PoE version (GL-RM1PE), which saves a power adapter per host. (cnx-software review)

GL.iNet Comet (GL-RM1): USB 2.0, HDMI in, USB-C keyboard/mouse, USB-C power and Ethernet
GL.iNet Comet (GL-RM1). Product photo: © GL.iNet.

GL.iNet offers an ATX power board and a “Fingerbot” for power control, but the ATX board needs a front-panel header on an ATX motherboard. The MS-A2 has no such header exposed, so power has to come from somewhere else.

HomeWizard Energy Socket (HWE-SKT) is a Wi-Fi smart plug that measures power and can be switched. It has a documented local REST API: GET /api/v1/state returns the relay state, PUT /api/v1/state with {"power_on": false} switches it. No cloud is needed for that, which makes it scriptable from PowerShell, Ansible or a cron job. (HomeWizard API docs)

HomeWizard Energy Socket (HWE-SKT)
HomeWizard Energy Socket (HWE-SKT). Product photo: © HomeWizard.
iDRAC functionMS-A2 replacement
Virtual console (video, keyboard, mouse)GL.iNet Comet, HDMI + USB-C
BIOS accessGL.iNet Comet
Virtual media / ISO mountComet Virtual Media
Power on / off / cycleHomeWizard Energy Socket + BIOS “power on after AC loss”
Power consumptionHomeWizard Energy Socket (W and kWh)
Graceful shutdownESXi / vCenter (esxcli, PowerCLI)

Network design: management network and isolated IoT Wi-Fi

In my lab the Comets and the HomeWizard sockets sit on the same network as the ESXi management interfaces (vmk0). That keeps it simple: no extra VLAN, no extra routing, and the jump host that manages vCenter can reach them too. But a KVM with BIOS access and a plug that can kill a host are as powerful as an iDRAC, so they still get fixed addresses, DNS names and no exposure to the internet.

Each MS-A2 gets a console path and a power path, reachable only from the admin side Admin workstation UniFi UDM VPN or admin subnet ESXi management network Shared with vmk0 GL.iNet Comet Console, BIOS, virtual media Powered by PoE, not the host HomeWizard Energy Socket Power on/off, metering Local API, switch lock Minisforum MS-A2 (ESXi) BIOS: power on after AC loss Ethernet Firewall to isolated IoT Wi-Fi HDMI + USB-C AC power
OOB layout per MS-A2 host.

The Comet carries the console and the socket carries the power; neither depends on the host it manages. In my lab the Comets sit on the ESXi management network, while the sockets live on an isolated IoT Wi-Fi subnet that only the admin side may reach.

  • Management network. The Comets connect over Ethernet to an access port in the ESXi management VLAN, next to the vmk0 interfaces of the hosts.
  • Wi-Fi for the sockets. The HomeWizard sockets are Wi-Fi only. They live on a dedicated, secured IoT Wi-Fi network with its own subnet and client isolation, so the sockets cannot talk to each other or to anything else on their own. The firewall only allows the admin subnet / jump host to reach them on the local API (HTTP, port 80); the sockets themselves cannot initiate connections into the management network.
  • Static IPs + DNS. DHCP reservations or static IPs, with A and PTR records on v-lab-dc, so scripts use names instead of IPs.
  • Separate power for the Comet. Never power the Comet from a USB port on the MS-A2 it manages, and never from the HomeWizard socket of that same host. Otherwise you lose the console exactly when you cut power. Use PoE (GL-RM1PE) or an always-on USB adapter.

Naming scheme

Example naming scheme (adapt to your own lab):

HostKVMPower socket
ms-a2-01.mgmt.v-lab.bems-a2-01-kvm.mgmt.v-lab.bems-a2-01-pdu.mgmt.v-lab.be
ms-a2-02.mgmt.v-lab.bems-a2-02-kvm.mgmt.v-lab.bems-a2-02-pdu.mgmt.v-lab.be
ms-a2-03.mgmt.v-lab.bems-a2-03-kvm.mgmt.v-lab.bems-a2-03-pdu.mgmt.v-lab.be

Step 1: Configure the GL.iNet Comet per host

Cabling

  1. HDMI cable from the MS-A2 HDMI port to the Comet HDMI input.
  2. USB-C cable from the Comet to a USB port on the MS-A2. This carries keyboard, mouse and the virtual media drive.
  3. Ethernet from the Comet to an access port in the OOB VLAN (in my lab: the ESXi management VLAN).
  4. Power from PoE or a separate, always-on USB adapter (see the network section).

First login and hardening

  1. Browse to http://glkvm.local or the IP from your DHCP server, and set the admin password. (GL.iNet: local access)
  2. Upgrade the firmware before anything else. (GL.iNet: firmware upgrade)
  3. Set a static IP and a hostname that matches your DNS record. (GL.iNet: static IP, hostname)
  4. Disable the GL.iNet cloud service if you only want local or VPN access. (GL.iNet: disable cloud)
  5. Remote access from outside the house: I use the VPN server on my UniFi Dream Machine (UDM). Once connected, the Comets and the HomeWizard sockets are reachable exactly as from inside the lab, through the same firewall rules. No extra agent on the Comet and no cloud. If you don’t have a VPN gateway, the Comet also has built-in Tailscale/ZeroTier/NetBird apps. Never port-forward the KVM. (GL.iNet: Tailscale)
  6. The web UI uses a self-signed certificate, so expect a browser warning. (GL.iNet: privacy error)

Replacing the Comet’s self-signed certificate with one issued by v-lab-dc gets its own blog post. Link to follow.

Test the console

Reboot the MS-A2 and press DEL during POST. You should see the BIOS in the Comet console and be able to navigate it. If the screen stays black during POST, set the EDID in the Comet settings. (GL.iNet: EDID)

Comet remote console showing the ESXi DCUI of an MS-A2, with the virtual keyboard open below it
The Comet remote console on v-lab-esx04: the ESXi 9.1 DCUI of an MS-A2, with the virtual keyboard enabled for keys like F2, F12 and Ctrl+Alt+Del that a browser would otherwise catch.

Virtual media for ESXi

  1. In the Comet UI open Virtual Media and upload the ESXi ISO (or a custom ISO with a kickstart file).
  2. Click Mount To Remote → Image mounting, select the ISO and Mount Image.
  3. Reboot the host, open the boot menu and pick Glinet Flash Drive as the boot device.
Comet Virtual Media page with the custom ESXi 9.1.1 ISO uploaded and ready to mount
Virtual Media on one of my Comets: a custom ESXi 9.1.1 ISO (1.35 GB) stored on the eMMC, ready for Mount To Remote.

(GL.iNet: install OS remotely)

The ISO is stored on the Comet’s eMMC, so you upload it once and reuse it for every rebuild. Reviewers report that virtual media is not fast, so expect an ESXi install to take a bit longer than from a local USB stick.

Step 2: Configure the MS-A2 BIOS to power on after AC loss

A smart plug can only cut and restore mains power. That becomes a real “power on” button only if the MS-A2 boots by itself when power returns. Out of the box most mini PCs stay off after an AC loss.

  1. Open the Comet console, reboot the host and press DEL to enter the BIOS.
  2. Go to Advanced → AMD CBS → FCH Common Options → Ac Power Loss Options.
  3. Set Ac Loss Control to Always On (not Always Off or Last State). With Last State, a host you shut down cleanly would stay off when you switch the plug back on.
  4. Save, exit, and test: switch the plug off, wait 10 seconds, switch it on. The host must boot without touching it.
MS-A2 BIOS: Advanced, AMD CBS, FCH Common Options, Ac Loss Control set to Always On
The MS-A2 BIOS through the Comet console: Ac Loss Control set to Always On.

While you are in the BIOS, it is a good moment to also check the boot order (local NVMe first, USB second) so a mounted ISO does not hijack every reboot.

Step 3: Configure the HomeWizard Energy Socket as a remote PDU

Setup

  1. Add the socket in the HomeWizard Energy app and join it to the isolated IoT Wi-Fi.
  2. In the app, open the socket’s settings and enable the Local API.
  3. Give it a DHCP reservation and a DNS name (ms-a2-01-pdu.mgmt.v-lab.be).
  4. Plug the MS-A2 power brick into the socket. Nothing else on that socket, and certainly not the Comet.

Talking to it

The local API is plain HTTP and JSON on the socket itself. (HomeWizard API: state)

PDU=ms-a2-01-pdu.mgmt.v-lab.be

# state: relay on/off, switch lock, LED brightness
curl -s http://$PDU/api/v1/state

# live power draw of the host
curl -s http://$PDU/api/v1/data

# power on
curl http://$PDU/api/v1/state \
   -X PUT \
   -H "Content-Type: application/json" \
   -d '{"power_on": true}'

# power off
curl http://$PDU/api/v1/state \
   -X PUT \
   -H "Content-Type: application/json" \
   -d '{"power_on": false}'

The same in PowerShell, which fits nicely next to PowerCLI:

function Set-HostPower {
    param([string]$Pdu, [ValidateSet('On','Off','Cycle')][string]$Action, [int]$Wait = 15)
    $uri = "http://$Pdu/api/v1/state"
    $ct  = 'application/json'
    switch ($Action) {
        'On'    { Invoke-RestMethod $uri -Method Put -ContentType $ct -Body '{"power_on": true}' }
        'Off'   { Invoke-RestMethod $uri -Method Put -ContentType $ct -Body '{"power_on": false, "switch_lock": false}' }
        'Cycle' { Set-HostPower $Pdu Off; Start-Sleep $Wait; Set-HostPower $Pdu On }
    }
}

Set-HostPower -Pdu ms-a2-01-pdu.mgmt.v-lab.be -Action Cycle

Protect against accidents with switch_lock

The socket has a switch_lock flag. When it is true, the socket cannot be switched off, not from the app and not from the physical button. I set it on every host socket during normal operation, so a mis-tap in the app cannot pull the plug on a running vSAN node. The Off function above clears the lock in the same call, so only a deliberate script action can cut power.

curl http://$PDU/api/v1/state \
   -X PUT \
   -H "Content-Type: application/json" \
   -d '{"switch_lock": true}'

Optional: fully local

The /api/v1/system endpoint can turn off all cloud communication. The catch: the app stops working with that socket and it receives no firmware updates anymore, until you re-enable it or factory reset. (HomeWizard API: system)

Note: the Energy Socket is switched with the v1 API (/api/v1/state). It is plain HTTP without authentication, which is why the sockets sit on an isolated IoT network that only the admin side can reach.

Step 4: Put it all together

The golden rule: the smart plug is the last resort, not the shutdown button. Cutting power on a running ESXi host is a crash, and on a vSAN node that means resyncs. Always try a clean shutdown first and use the plug only to finish the job or to recover a hung host.

Planned power-off

  1. Put the host in maintenance mode (vSAN: Ensure accessibility).
  2. Shut it down from vCenter, PowerCLI or esxcli.
  3. Watch the power draw on the socket drop to standby level (about 2 W). That is your signal the host is really off.
  4. Switch the socket off.

Power-on

  1. Switch the socket on. Thanks to the BIOS setting the host boots.
  2. Watch POST in the Comet console if you like.
  3. Wait for the host to answer in vCenter, then exit maintenance mode.

Hung host (PSOD, frozen)

  1. Check the Comet console first and take a screenshot of the PSOD for the logs.
  2. Power-cycle with the socket.
  3. Watch the boot in the console.

A PowerCLI sketch of the planned path, reusing Set-HostPower from step 3:

$esx = 'ms-a2-01.mgmt.v-lab.be'
$pdu = 'ms-a2-01-pdu.mgmt.v-lab.be'

Set-VMHost -VMHost $esx -State Maintenance -VsanDataMigrationMode EnsureAccessibility
Stop-VMHost -VMHost $esx -Confirm:$false

# wait until the host draws standby power only (about 2 W when off)
do {
    Start-Sleep 10
    $w = (Invoke-RestMethod "http://$pdu/api/v1/data").active_power_w
    Write-Host "Power draw: $w W"
} while ($w -gt 5)

Set-HostPower -Pdu $pdu -Action Off

A powered-off MS-A2 draws about 2 W on the socket. The script waits until the draw drops below 5 W, which leaves some margin above that standby level.

Without vCenter, on the host itself:

esxcli system maintenanceMode set -e true -m ensureObjectAccessibility
esxcli system shutdown poweroff -r "planned power-off via OOB"

Remote rebuild with kickstart

This is where the two devices really pay off. Mount an ESXi ISO that carries my MS-A2 kickstart file in the Comet virtual media, power-cycle the host with the socket, choose the GL.iNet flash drive in the boot menu, and the host reinstalls itself onto the first NVMe disk while I watch from the couch. Unmount the ISO afterwards so the next reboot boots from NVMe again.

Alternative: one GL.iNet Comet X for up to four hosts

If you run three or four MS-A2s, there is now a second option: the GL.iNet Comet X (GL-RM4PE). It is basically four Comets in one box. It has 4 HDMI inputs and 4 USB-C device ports, so one unit gives the console, keyboard, mouse and virtual media for four hosts behind a single IP address.

What changes compared to one Comet per host:

Comet (GL-RM1) per hostComet X (GL-RM4PE)
Hosts per device14
Video4K@30 FPS4K@30 FPS, plus 1 HDMI out for a local monitor
Virtual media storageeMMC 32 GBeMMC 64 GB, shared by all four hosts
PowerUSB-C (PoE on the GL-RM1PE)PoE 802.3af/at, with USB-C 5V as backup when PoE drops
Network1 GbE1 GbE
Extras–3.69″ touchscreen with IP and session status, local USB keyboard/mouse, 10″ and 19″ rack brackets included
Price (BE, 20 Nov 2026)€109,99 each, so €439,96 for four€297,51

Why I would consider it:

  • Cheaper from three hosts on. Four single Comets cost about €140 more than one Comet X.
  • PoE built in, with a fallback. That fits my rule from the network section: the KVM must never get its power from the host it manages. With PoE plus a USB-C backup adapter it even survives a switch reboot.
  • One ISO library. Upload the ESXi kickstart ISO once to the 64 GB eMMC and use it for every host.
  • Less cabling and fewer IPs. One Ethernet port and one DNS name (for example ms-a2-kvm.mgmt.v-lab.be) instead of one per host.

What to keep in mind:

  • One box, one failure domain. If the Comet X hangs or needs a firmware upgrade, you lose the console of all four hosts at the same time. With one Comet per host, a failure hits one host only.
  • It has to reach every host. Four HDMI and four USB-C cables from one box means the hosts must sit close together, which is the case in a small rack but not if your nodes are spread around the house.
  • Power control stays the same. The Comet X can drive four ATX boards or Fingerbots, but just like with the single Comet the MS-A2 has no front-panel header for the ATX board. The HomeWizard socket per host stays the power path, and the BIOS “power on after AC loss” setting from step 2 is still required.

(GL.iNet: Comet X GL-RM4PE)

How close does it get to an iDRAC?

Close enough for a lab, but it is not a BMC. The gaps you should know about:

TopiciDRAC / iLOComet + HomeWizard
Power controlSoft and hard, via the boardHard cut only; soft shutdown must come from ESXi
Power-onNativeRelies on the BIOS “power on after AC loss” setting
Hardware health (fans, temps, DIMMs)Yes, with alertsNo
Redfish / IPMI APIYesNo; two separate REST/web APIs
vSphere / VCF integrationHost power management, hardware healthNone
Virtual media speedGoodSlower; fine for ESXi, slow for big ISOs
NetworkWired, dedicated portComet wired, socket Wi-Fi only
SecurityMature, AD/LDAP login, signed firmwareLocal accounts, self-signed UI, IoT-grade

Cost per host: one GL.iNet Comet plus one HomeWizard Energy Socket. Prices move a lot, so I compare them on the Tweakers Pricewatch before buying.

Where to buy: the GL.iNet Comet on Amazon.de (€109,99) and the HomeWizard Energy Socket in the HomeWizard shop (€27,95), prices on 20 October 2026. That is about €138 per host. With four hosts, a single GL.iNet Comet X (€297,51 in the GL.iNet EU shop, 20 November 2026) plus four sockets brings that down to about €102 per host.

For a modest amount per host, every MS-A2 gets a console, virtual media, remote power and a power meter.

Wrap-up

With a GL.iNet Comet and a HomeWizard Energy Socket per host, the MS-A2s behave a lot more like the R640 in the same lab: I can reach the BIOS, reinstall ESXi from virtual media, and power hosts off and on without leaving my desk. The one BIOS setting and the switch_lock habit are what make it safe and reliable.

Ideas for a follow-up post:

  • A CA-signed certificate from v-lab-dc on the GL.iNet Comet, replacing its self-signed one.
  • A small web page to power on, off and cycle the HomeWizard sockets per host.
  • One PowerShell module that wraps both devices per host (Get-OobHost, Restart-OobHost).
  • Power-draw graphs per host from the HomeWizard API in Grafana or VCF Operations.
  • Fully unattended rebuild: ISO mount, power cycle and kickstart in one script.

Sources