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

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

Why the principal datastore matters in VCF (especially with FC and NFS)

The principal datastore you pick for a VCF cluster on Fibre Channel or NFS stays special for the life of that cluster, and SDDC Manager will remind you of that the moment you try to get rid of it.

Principal datastore per VCF cluster: example output of Get-VCFPrimaryDatastore with domain, cluster, primary datastore name and type FC (names anonymised)
Which datastore does SDDC Manager consider primary? (example, names anonymised)

With vSAN you hardly think about it: the vSAN datastore is the principal datastore and that’s it. However, since VCF 9 opened the door properly to external principal storage, I see more and more clusters running on VMFS over Fibre Channel or on NFS. As a result, arrays get replaced, LUNs get migrated, and sooner or later someone wants to clean up that very first datastore.

This post shows why that datastore matters, what you can do about it in VCF 9.0 and 9.1, and a small PowerShell script to see which datastore SDDC Manager considers primary for every cluster.

What the principal datastore actually is

SDDC Manager keeps track of one datastore per cluster as the primary datastore. It stores the name, the type (VSAN, VMFS_FC, NFS, …) and the vCenter MoRef of that datastore in its own inventory. You can add as many supplemental datastores as you like afterwards, but SDDC Manager keeps pointing at that one primary datastore.

However, it is not just a label, because SDDC Manager validates it during workflows. For example, adding a host to a cluster runs a “Validate cluster primary datastore” check, and if SDDC Manager can no longer find a valid primary datastore, the host addition fails (see KB 444862 for VCF 9.0 and KB 392768 for 5.x).

You can delete it, but SDDC Manager won’t like it

With FC or NFS, the principal datastore is just a LUN or an export that you selected at deploy time. Storage teams like to clean up, migrate arrays and retire old volumes. So sooner or later someone asks: “Can we remove that first datastore? Everything is on the new one now.”

Technically, yes. Nothing stops you from unmounting and deleting that FC LUN in vCenter. But SDDC Manager still references it as the primary datastore of the cluster, so its inventory is now out of sync. From that moment Day-N operations such as adding hosts start to fail. Therefore, first move the primary role, and only then clean up.

VCF 9.0: changing the principal datastore needs a KB

In VCF 9.0 there is no button and no supported public API to change the primary datastore. The 9.0 ClusterUpdateSpec in the SDDC Manager API simply has no field for it.

What you do have is Broadcom KB 452458, “Change the Primary Datastore of a Cluster in SDDC Manager”. In short:

  1. Look up the MoRef ID of the new VMFS datastore in the vCenter MOB.
  2. Export the domain details from the SDDC Manager inventory to a JSON file.
  3. Change the primary datastore ID, type and name in that file.
  4. PUT the updated JSON back to the internal inventory endpoint.

It works, but you are editing the SDDC Manager inventory directly. For that reason, take a snapshot of SDDC Manager first, and if you are not comfortable with it, open a case with Broadcom support.

VCF 9.1: a supported way to change the principal datastore

Fortunately, in VCF 9.1 this becomes a supported Day-N operation. The SDDC Manager 9.1 API has a clusterPrimaryDatastoreUpdateSpec (with a single datastoreId field) as part of the cluster PATCH call, and there is a datastore selection wizard in the SDDC Manager UI to update the primary datastore.

For management domains, KB 435850 lists the supported principal storage migration paths in 9.1:

  • NFSv3 to NFSv3: supported
  • VMFS on FC to VMFS on FC: supported
  • vVols to vSAN: supported
  • NFSv3 to VMFS on FC: not supported. If you want FC as principal storage, you have to choose it at deployment.

Two known issues in 9.1 to keep in mind:

  • KB 443865: the wizard can show “Datastores not available” when the first datastore that vCenter returns is a local (non-FC) one. This is fixed in 9.1.1.
  • KB 454193: in large VMFS environments the datastore selection wizard can time out. The workaround is to call the PATCH API with clusterPrimaryDatastoreUpdateSpec directly.

In short, if you are on 9.1, go to 9.1.1 before you start moving primary datastores around.

If you prefer the API, the call looks roughly like this. Check the ClusterPrimaryDatastoreUpdateSpec reference for the exact format of datastoreId before you run it:

PATCH https://<sddc-manager>/v1/clusters/<cluster-id>
{
  "clusterPrimaryDatastoreUpdateSpec": {
    "datastoreId": "<new primary datastore>"
  }
}

9.0 vs 9.1 at a glance

VCF 9.0VCF 9.1
Change primary datastore in the UINoYes (use 9.1.1)
Change it with the public APINoYes, clusterPrimaryDatastoreUpdateSpec
Supported routeKB 452458 (inventory edit)Day-N workflow
NFS to FCNoNo

Check the principal datastore of every cluster

Before any storage cleanup, I first want to know which datastore SDDC Manager considers primary for every cluster. The /v1/clusters API returns primaryDatastoreName and primaryDatastoreType, so a few lines of PowerShell give you a nice overview.

Lab use only. This script skips TLS certificate validation and has the password hardcoded in the file. That is fine in my lab, but don’t run it like this in production. Use a trusted certificate (or at least remove the bypass) and ask for the credentials at runtime, for example with Get-Credential.

# -------------------------------------------------------------------------
# VCF 9.x: Query Primary Datastores per Cluster via SDDC Manager API
# LAB USE ONLY: skips certificate checks and uses a hardcoded password
# -------------------------------------------------------------------------

$sddcManagerFqdn = "sddc-manager.yourdomain.local"
$adminUser       = "administrator@vsphere.local"
$adminPassword   = "YourPasswordHere"

# 1. Bypass SSL/TLS Certificate Validation
# For Windows PowerShell 5.1:
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12

# 2. Build Authentication Payload
$authBody = @{
    username = $adminUser
    password = $adminPassword
} | ConvertTo-Json

$tokenUri = "https://$sddcManagerFqdn/v1/tokens"

# 3. Acquire Token (Add -SkipCertificateCheck if using PowerShell 7+)
$requestParams = @{
    Uri         = $tokenUri
    Method      = "Post"
    Body        = $authBody
    ContentType = "application/json"
}

# Add -SkipCertificateCheck automatically if running PowerShell Core / 7+
if ($PSVersionTable.PSEdition -eq "Core") {
    $requestParams["SkipCertificateCheck"] = $true
}

$authResponse = Invoke-RestMethod @requestParams
$token = $authResponse.accessToken

# 4. Query Clusters API
$clustersUri = "https://$sddcManagerFqdn/v1/clusters"
$clusterParams = @{
    Uri     = $clustersUri
    Method  = "Get"
    Headers = @{
        "Authorization" = "Bearer $token"
        "Content-Type"  = "application/json"
    }
}

if ($PSVersionTable.PSEdition -eq "Core") {
    $clusterParams["SkipCertificateCheck"] = $true
}

$clusterData = Invoke-RestMethod @clusterParams

# 5. Format and Output Primary Principal Datastore Details
$results = $clusterData.elements | ForEach-Object {
    [PSCustomObject]@{
        "Cluster Name"           = $_.name
        "Primary Datastore Name" = $_.primaryDatastoreName
        "Primary Datastore Type" = $_.primaryDatastoreType
        "Domain ID"              = $_.domain.id
    }
}

$results | Format-Table -AutoSize

You can also grab a cleaner version from my GitHub: Get-VCFPrimaryDatastore. That one asks for the credentials with Get-Credential and only skips the certificate check when you add -SkipCertificateCheck:

.\Get-VCFPrimaryDatastore.ps1 -SddcManagerFqdn sddc-manager.yourdomain.local

The GitHub version also looks up the workload domain names through /v1/domains, because /v1/clusters only gives you the domain ID. The output is one line per cluster, sorted by workload domain. Run it before you hand a list of “old” LUNs or exports to your storage team.

The safe order to retire an old principal LUN or export

  1. Run the script above and write down the primary datastore of every cluster.
  2. Present the new LUN or export to all hosts in the cluster.
  3. Move the primary role: KB 452458 on 9.0, the SDDC Manager wizard or API on 9.1.1.
  4. Run the script again and check that SDDC Manager now shows the new datastore.
  5. Storage vMotion the remaining VMs off the old datastore.
  6. Only now unmount and delete the old LUN or export.

Wrap-up

  • With vSAN you rarely think about it, but with FC and NFS the principal datastore is a real dependency in SDDC Manager.
  • Don’t delete or unmount it before you have moved the primary role.
  • On 9.0 that means KB 452458. On 9.1 there is a supported UI and API, and 9.1.1 fixes the main wizard bug.
  • Know what your clusters use today. The script above gives you that in a few seconds.

Looking for more? You can find my other VCF posts here, for example how I fixed LLDP neighbours on the X710 uplinks of my VCF hosts in this post.

References