javax.net.ssl.SSLPeerUnverifiedException: Certificate for <esx.example.com> doesn't match any of the subject alternative names: [localhost.localdomain]" and "Certificate for <esx.example.com> doesn't match any of the subject alternative names: [localhost.localdomain]"javax.net.ssl.SSLPeerUnverifiedException: Certificate for <esx-short-name> doesn't match any of the subject alternative names: [esx.example.com]" and "Certificate for <esx.example.com> doesn't match any of the subject alternative names: [esx.example.com]"
/var/log/vmware/vcf/domainmanager/domainmanager.log
YYYY-MM-DDTHH:MIN:SEC ERROR [vcf_dm,####,f722] [c.v.e.s.c.c.v.esx.EsxCommandExecutor,dm-exec-8] Failed to connect to <esx.example.com>com.vmware.vim.vmomi.client.exception.SslException: javax.net.ssl.SSLPeerUnverifiedException: Certificate for <esx.example.com> doesn't match any of the subject alternative names: [localhost.localdomain]
VCF 9.0
Procedure: Generate ESX Host Certificate
1. Configure the Hostname and FQDN
Ensure the ESX host has a valid Fully Qualified Domain Name (FQDN) configured in the Direct Console User Interface (DCUI).
If the DNS name is incorrect or missing, update the hostname immediately.
Reference: Changing the hostname of an ESX host.
2. Validate FQDN via SSH
SSH into the ESX host.
Run the hostname command to verify that the FQDN is being returned correctly.
3. Regenerate the Certificate
Generate a new host certificate.
4. Reboot the Host
Reboot the ESX host directly from the DCUI to apply the changes.
Reference: Rebooting an ESX Server host.
5. Validate Certificate in Browser
Open a web browser and navigate to https://esx-fqdn.example.com.
Inspect the certificate in the browser settings.
Go to Details > Certificate Subject Alternative Name to confirm the correct FQDN is listed.
6. Finalize in VCF Installer
Return to the VMware Cloud Foundation (VCF) Installer.
Remove the hosts from the current list.
Re-enter the host FQDN.
Select "Confirm all signatures" and click Next.
The suggested changes is part of ESX host preparation. For more details please refer to VCF 9.0 Documentation under a sub-section of Preparing ESX Hosts for VMware Cloud Foundation or vSphere Foundation