Follow the steps below to check the Agent virtual machine on the ESXi host:
1) Check the Agent VM if deployed. SSH to the ESXi host, run the command:
# /opt/vmware/fdm/fdm/prettyPrint.sh clusterconfig
Sample of output:
....
<agentVmList>
<vmCfgFilePath>/vmfs/volumes/vsan:5############f44-e##########85/e63#####-####-####-####-######32350/AGENTVMNAME</vmCfgFilePath>
<hostId>host-######</hostId>
</agentVmList>
The hostId is the ESXi host MOID.
The above message indicates that the host has an Agent VM. Otherwise, it will not.
2) From the output of the above command, if the Agent VM has been deployed, then check if it is powered on or off. If it has not been deployed, try to deploy it again to see whether the deployment is successful.
3) If the Agent VM is powered on or not deployed, check the vCenter EAM service log(/var/log/vmware/eam/eam.log).
In the below sample case, it was powered on successfully, but its status never returns to GREEN:
2023-02-24T08:13:17.315Z | INFO | vim-inv-update | VirtualMachinePropertyChangeHandler.java | 243 | VM: vm-######power state set to poweredOn
2023-02-24T08:13:17.349Z | INFO | host-agent-1 | AgentWorkflowListener.java | 135 | HostAgent(ID: 'Agent:e7c#####-####-####-####-##########fb: null') is waiting for a hook, provisioned: false, poweredOn: true, prePowerOn: false, keeping it yellow until hooks are processed.
The hooks were not called, which caused an underlying cluster to be in a locked state. The Agent virtual machine can not process the hook to change its status to green. Means that the Agent virtual machine was not ready, even though deployed yet.
From the EAM log(/var/log/vmware/eam/eam.log), we can also see that the agent virtual machine was deployed from NSX.
4)Then, check the NSX log
/var/log/cm-inventory/cm-inventory.log. It may contain below messages:
2023-02-27T10:14:30.304Z ERROR http-nio-127.0.0.1-7443-exec-1 VcCommunicator 4418 SYSTEM [nsx@6876 comp="nsx-manager" errorCode="MP40500" level="ERROR" subcomp="cm-inventory"] Unable to create connection to cm with id: 5f######4-c####-####-a821-09#########0
com.vmware.vim.vmomi.client.exception.SslException: javax.net.ssl.SSLHandshakeException: com.vmware.nsx.management.security.ThumbprintMismatchException: 557#####################################################This indicates that NSX can not communicate with the vCenter server due to a mismatched SSL thumbprint, which causes the hook could not be released.
Manually update the vCenter credential in the NSX management portal that will to force get the correct SSL thumbprint of the vCenter server.
To restore the Compute Manager connection:
- Login to NSX manager, navigate to System > Fabric > Compute Manager
- Select Compute Manager and Edit
- Enter the correct thumbprint in "
SHA-256 thumbprint" and Save