How to update vCenter hostname to match PNID
search cancel

How to update vCenter hostname to match PNID

book

Article ID: 368672

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

During upgrade pre-checks, as the result of troubleshooting, or with VDT script you may discover that the PNID and hostname do not match cases. For instance, the PNID says "vCenter" but the hostname says "vcenter".  You must update the hostname to match the PNID. 

Or post patching, not being able to login using AD account, (invalid credentials) with an IWA identity source.   

Cause

This is a configuration issue and can occur when a user accidently puts in a hostname and PNID that do not match exactly, including case sensitivity. 

Resolution

Perform the below steps to update the hostname to match the PNID.

  1. Take appropriate snapshots of the vCenter or vCenters if in ELM. Refer to the following KBs for best practices:
  2. Backup vCenter from the VAMI. Refer to Manually Back up vCenter Server by Using the vCenter Server Management Interface (VAMI).

  3. SSH to vCenter and verify the services are started.

    service-control --status --all

  4. Verify the vCenter hostname.

    hostname

  5. Verify the PNID.

    /usr/lib/vmware-vmafd/bin/vmafd-cli get-pnid --server-name localhost

  6. Log into the vCenter Appliance Management Interface (VAMI) as root.

    https://<vCenter_FQDN_or_IP_ADDRESS>:5480

  7. Change the hostname in the VAMI.
    1. Click on the Networking tab.
    2. Click on the "^" next to "NIC 0" to expand the options and click EDIT.
    3. On the "Select Network Adapter" page click on NIC 0 and click NEXT.
    4. Under "Hostname and DNS" change the hostname to match the PNID case exactly (that was gathered above in step 5) and click NEXT.

      IMPORTANT NOTE:  Only change one network setting at a time in the VAMI.  Do not change any other setting while you're updating the hostname.  

    5. Put in the administrator username (commonly [email protected]) and password and click NEXT.
    6. Check the box to acknowledge that you have a backup of vCenter and click FINISH. 

  8. Wait for the change to be made and the services to restart.

  9. SSH to vCenter and verify the PNID and hostname match exactly using the same commands as step 4 and 5 above.

  10. Verify vCenter functionality and confirm there are no issues with plugins or solutions.

Additional Information

Note: It may be necessary to unregister solutions (Site Recovery Manager, vRealize Operations Manager, Log Insite, etc) before making this change. If you have an issue with a solution, plugin, or 3rd party solution after making this change, revert the snapshot and contact support for that product to verify the required actions after the PNID is updated.