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

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