Follow these steps (choosing only option 1, 2, or 3) to clear stale TPM keys from the vCenter Server database and re-attest the ESXi hosts.
Note:
Option 1:
- Place the affected ESXi host in Maintenance Mode.
- Stop the vCenter Server vpxd service:
- Log into the vCenter Server Appliance (VCSA) via SSH as root.
- Stop the VMware Virtual Center Server service (vpxd) by running:
service-control --stop vpxd
- Clear Stale Keys from the Postgres Database:
- Access the vCenter Database (VCDB) using the following command:
/opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB
- Identify the internal Host ID for the affected ESXi host. Replace esxi-hostname.example.com with the FQDN exactly as it appears in the vSphere inventory:
select id, dns_name FROM vpx_host WHERE dns_name = 'esxi-hostname.example.com';
- Clear the endorsement_key and attestation_identity_key fields for that specific ID (replace 123 with the Host ID from step 'b'):
UPDATE vpx_host SET endorsement_key='', attestation_identity_key='' WHERE id = 123;
- Exit the database:
\q
- Restart vCenter Server vpxd Service:
service-control --start vpxd
- Right-click the ESXi host and select Connection -> Disconnect.
- Wait approximately 10 seconds, then right-click the host and select Connection -> Connect.
- Navigate to the host's Monitor tab > Issues and Alarms > Triggered Alarms.
- If the TPM or Attestation alarm remains active, right-click the alarm and select Reset to Green.
- To verify the fix, go to the host's Monitor tab -> Security.
- Confirm that the Attestation status is reported as Passed
Option 2:
CAUTION: Do not perform this workaround if the host is using of vVOL datastores or is connected to a vSphere Distributed Switch (vDS) including vSAN hosts
- Place the affected ESXi host in Maintenance Mode (Right-click host -> Enter maintenance mode)
- Within the vCenter vSphere Client, place the affected host into Maintenance Mode.
- Remove the host from the vCenter inventory.
NOTE: If the "Remove from Inventory" option is unavailable (greyed out), refer to "Remove from Inventory" option grayed out for ESXi host. - Re-add the host to vCenter.
- Exit the host from Maintenance Mode.
Option 3 (vSAN host using vSphere Standard Switches [vSS] only):
CAUTION: Do not perform this workaround if the host is part of a vSAN cluster and is connected to a vSphere Distributed Switch (vDS).
- Verify the cluster is healthy otherwise (Choose Cluster -> Monitor Tab -> Skyline Health).
- Verify Cluster has enough resources to run without the affected host (Right-click host -> Maintenance mode -> Enter Maintenance mode -> Pre-check)
- Within the vCenter vSphere Client, place the affected host into Maintenance Mode with "Ensure Accessibility" or "Full Data Evacuation" mode and wait for resync operation to complete. See related TechDocs: Place a Member of vSAN Cluster in Maintenance Mode and Working with Members of the vSAN Cluster in Maintenance Mode.
- Move the ESXi host out of the cluster to disassociate it from vSAN (Right-click host -> Move To...)
- Remove the host from the vCenter inventory.
NOTE: If the "Remove from Inventory" option is unavailable (greyed out), refer to "Remove from Inventory" option grayed out for ESXi host. - Re-add the host to vCenter.
- Re-add host to vSAN Cluster. See TechDocs: Use Quickstart to Add Hosts to a vSAN Cluster or Add a Host to the vSAN Cluster
- Exit the host from Maintenance Mode.
-