Error: Subject Alternate Name (SAN) field does not contain the PNID. Please provide a valid certificate
Status : 0% Completed [Operation failed, performing automatic rollback]
/var/log/vmware/vmcad/certificate-manager.log the following messages are reported:YYYY-MM-DDTHH:MM:SS INFO certificate-manager Running command : ['/usr/lib/vmware-vmafd/bin/vmafd-cli', 'get-pnid', '--server-name', 'localhost']
YYYY-MM-DDTHH:MM:SS INFO certificate-manager Output : <correct PNID of vCenter>
..
YYYY-MM-DDTHH:MM:SS ERROR certificate-manager Error: Subject Alternate Name (SAN) field does not contain the PNID. Please provide a valid certificate
YYYY-MM-DDTHH:MM:SS ERROR certificate-manager Error while replacing Machine SSL Cert, please see /var/log/vmware/vmcad/certificate-manager.log for more information.
This issue occurs when the new SSL certificate is missing the Primary Network Identifier (PNID) in the Subject Alternative Name field. vCenter validates that the PNID must be present in the SAN to ensure the certificate is valid for its configured hostname.
In order to prevent this issue:
# /usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost
Note: Multiple hostnames(comma-separated) can be entered, however the PNID of vCenter must be present in the hostnames.
Refer to the following documents for steps to replace the machine SSL certificate of a vCenter Server Appliance: