General troubleshooting/Workaround to fix the upgrade issue where PNID and nslookup have inconsistent upper or lower case
Symptoms:
vCenter Server 7.x fails to upgrade with error "Failed to set Hostname" when PNID and nslookup have inconsistent upper or lower case
For Example:
PNID: VCENTER.SAMPLE.DOMAIN
nslookup: vcenter.sample.domain
If you try to change the PNID all in lower case from VAMI, you will get below error "Adding new CN entries failed"
Log snippet from /var/log/vmware/applmgmt/pnid_change.log
YYYY-MM-DD HH:MM:SS,XXX - pnid utils-update ldap entries () : 594 - INFO - Successfully connected to LDAP.
YYYY-MM-DD HH:MM:SS,XXX - pnid_utils-search_all_cn_hostname () :157 - INFO - Hostname CN search result count 2
YYYY-MM-DD HH:MM:SS,XXX - pnid utils-add new cn entries () : 193 - INFO - Adding new DN entry cn=vcenter.sample.domain, cn=Servers,cn=Default-First-Site, cn=Sites, cn=Configuration, dc=vsphere, dc=local
YYYY-MM-DD HH:MM:SS,XXX - pnid utils-add new cn entries () :248 - ERROR - Failed to add dn : cn=vcenter.sample.domain, cn=Servers,cn=Default-First-Site, cn=Sites, cn=Configuration, dc=vsphere,dc=local
YYYY-MM-DD HH:MM:SS,XXX - pnid utils-add new_cn entries () : 193 - INFO - Adding new DN entry cn=vcenter.sample.domain, ou=Domain Controllers, dc=vsphere, dc=local
YYYY-MM-DD HH:MM:SS,XXX - pnid_utils-add_new_cn_entries () : 248 - ERROR - Failed to add dn : cn=vcenter.sample.domain, ou=Domain Controllers, dc=vsphere, dc=local
YYYY-MM-DD HH:MM:SS,XXX - pnid_utils-update_task_status () : 1441 - INFO - Task : Adding new CN entries failed.
YYYY-MM-DD HH:MM:SS,XXX - pnid utils-secure delete () : 1301 - INFO - Removing file : /var/vmware/applmgmt/pnid/pnid_change.cfg
Due to inconsistency of the name format with the nslookup hostname set fails
Solution 1:
Solution 2:
/usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost
/opt/vmware/share/vami/vami_config_net
Select option 3, "hostname," and enter the PNID obtained in step 1.Unable to upgrade vCenter