The host's default certificate has been replaced with a custom certificate
Error in UI:
The var/log/vmware/vcf/bringup/bringup.log contains entries similar to:
com.vmware.vim.vmomi.client.exception.SslException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.vmware.vim.vmomi.client.common.impl.ResponseImpl.setError(ResponseImpl.java:265)
VCF 5.2.x
This issue occurs because the Cloud Builder is unable to trust the host certificate.
Import the host certificate into the Cloud Builder truststore:
openssl s_client -showcerts -connect <esxi-fqdn>:443 2>/dev/null </dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > esx.pem
keytool -delete -alias esxi-fqdn -keystore /usr/lib/jvm/openjdk-java17-headless.x86_64/lib/security/cacerts -storepass changeit
(The host's alias in the truststore is normally the esxi FQDN)
keytool -import -alias esx -keystore /usr/lib/jvm/openjdk-java17-headless.x86_64/lib/security/cacerts -file esx.pem -storepass changeit