Getting a Standalone ESXi Host Ready for VCF Commissioning

Commissioning is not an upgrade, and it is not an image build. It is the moment VCF agrees to take a standalone host. The host that fails that moment is usually wrong in a boring way: the hostname, a vmkernel, an uplink, a VMFS-5 datastore, a certificate, or maintenance mode still enabled. The installer will not fix those. It will refuse the host.

The Challenge

The hosts in question are not in a cluster yet. They are arriving from a rack, a lab, or a previous life that left a vSAN partition and a VMFS-5 volume behind. A script that “just upgrades them” will also upgrade the host that is already managed, because the host list was a spreadsheet and nobody marked the managed ones. That is the outage.

What the Scripts Do

Two POSIX shell scripts, so they run on a jump box or on an ESXi host itself. One copies an offline bundle and upgrades. The other gets a host ready to be commissioned. The ready script’s default is plan. Apply is a different word. A host already in a cluster, already managed by a vCenter, or waiting on a reboot is left alone. If the management vmkernel is on a distributed switch, the script says so and does not touch the host.

Plan prints the table. Apply changes what the table described: build, if a target build is set, then hostname, vmkernels, uplinks, port groups, disks, VMFS-6 datastores, certificate, and maintenance mode. Commissioning rejects a host that is still in maintenance mode, so the last step exits it. A host that ends the table as ready can be commissioned. A host that does not, cannot, and the line says why.

Disk destruction is not implied. Stale vSAN partitions and VMFS-5 datastores are reported in plan. Recreating a VMFS-5 volume as VMFS-6 wipes it, so that path requires apply and an explicit wipe flag. Plan with the wipe flag is rejected. The flag is how you say you meant it.

The upgrade script is the narrower sibling. List shows how the host file was read and changes nothing. Copy places the bundle. Upgrade of one host does a dry run, then starts the update. Upgrade of every host lets each host reboot itself when it is done. Check shows builds, and a host that has reached the target build leaves maintenance mode.

Where It Sits

This is not the custom ISO problem. That one is what the installer can see. This one is what commissioning will accept after the host already boots. Run plan. Read the table. Apply only the hosts that are actually standalone. The managed ones are not a rounding error.

The Results

Plan printed the table. Hosts already in a cluster, already in a vCenter, or waiting on a reboot were left alone. Apply changed only the standalone hosts the table described, and the last step took them out of maintenance mode, because commissioning rejects a host that is still in it. A host that ended the table as ready could be commissioned. A host that did not, could not, and the line said why.

Lessons Learned

The outage is the managed host that was on the spreadsheet and was not marked. Disk destruction is not implied by plan. Recreating VMFS-5 as VMFS-6 wipes the volume, so that path requires apply and an explicit wipe flag. Plan with the wipe flag is rejected on purpose.

Getting Started

Run it beside this. plan is the default. Name only hosts that are not already in a cluster.

sh esx_ready.sh plan esx01.essential.coach
sh esx_ready.sh apply esx01.essential.coach
sh esx_push.sh list
sh esx_push.sh upgrade esx01.essential.coach

Clone esxi-vcf-host-prep. Run esx_ready.sh with no apply word and read the table. Apply only the hosts that are actually standalone. Use esx_push.sh list before you copy a bundle. Do not point either script at a host that is already in a workload domain. The commissioning checklist those hosts have to meet is the VCF 9.1 host-management page linked below.

Conclusion

Commissioning is not an upgrade. It is the moment VCF agrees to take a standalone host. Run plan. Read the table. Leave the managed ones alone.

References

Commissioning is a VCF inventory step, not an upgrade. Managing ESX Hosts in VMware Cloud Foundation says a network pool comes first, commissioned hosts land as unassigned, and VCF does not support stateless ESX. The checklist on Commission ESX Hosts is the bar the prep script is aiming at: hostname equal to the FQDN, forward and reverse DNS, a supported ESX build, healthy hardware, disk partitions deleted, and management on a VMkernel connected to the standard switch. When the host has more than one physical NIC, only one may be connected to that standard switch, and it has to carry management. Hosts that already used an external CA at deployment must keep using an external CA when the domain grows. How that management network is set before the installer runs is in Configure the Network on the ESX Hosts.

The plan-by-default prep script and the offline bundle push are in the repository. Plan with the wipe flag is rejected on purpose.


Repository: github.com/noahfarshad/esxi-vcf-host-prep

Related Stories:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top