Updating the network configuration of the vCenter Server Appliance (such as DNS servers or the default gateway) via VAMI fails with the error: "Adding new CN entries failed."
search cancel

Updating the network configuration of the vCenter Server Appliance (such as DNS servers or the default gateway) via VAMI fails with the error: "Adding new CN entries failed."

book

Article ID: 399695

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Updating the network configuration of the VCSA via VAMI fails with the following error.

The vSphere Client becomes inaccessible after the operation fails.

The /var/log/vmware/applmgmt/pnid_change.log file shows that vCenter is attempting to change the PNID from lowercase (vc.test.local) to uppercase (VC.test.local), or vice versa, and eventually fails.

YYYY-mm-dd HH:MM:SS,xxx - pnid_utils-prepare_pnid_change():1951 - INFO - Old PNID : vc.test.local
YYYY-mm-dd HH:MM:SS,xxx - pnid_utils-prepare_pnid_change():1952 - INFO - Starting PNID Change to VC.test.local with task id : <task id>:com.vmware.applia>
 ::
YYYY-mm-dd HH:MM:SS,xxx - pnid_utils-update_task_status():1621 - INFO - Task : Adding new CN entries failed.

 

Environment

vCenter Server 7.x

vCenter Server 8.x

Cause

There is a case mismatch between the PNID and the hostname (e.g., vc.test.local vs VC.test.local).

To check the PNID, run the following command:

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

To check the hostname, run the following command:

hostname

Resolution

  1. Revert to the snapshot or backup taken before the network changes.

  2. Run the following command to change the hostname to match the PNID:
        dcli com vmware appliance networking dns hostname set --name <PNID>
        e.g.)  dcli com vmware appliance networking dns hostname set --name vc.test.local
               Username: [email protected]
               Password: **********

  3. Retry the network reconfiguration.

Additional Information

Note: As per best practices PNID should be in FQDN format

  • If PNID is not in FQDN format please try steps below:

    1. Change the PNID to "localhost" using the utility below, please run the command below on SSH of vCenter:

    #/opt/vmware/share/vami/vami_config_net


    0)      Show Current Configuration (scroll with Shift-PgUp/PgDown)
    1)      Exit this program
    2)      Default Gateway
    3)      Hostname
    4)      DNS
    5)      Proxy Server
    6)      IP Address Allocation for eth0

    2. Choose option 3) Hostname and enter "localhost"

    New hostname [vCenter]: localhost

    3. Choose option 1) Exit this program

    4. Login to the VAMI (https://vCenter-IP-address-or-FQDN:5480) and ensure that the hostname is set to "localhost".

    5. Reconfigure the PNID from "localhost" to the FQDN of the vCenter using the VAMI, see Reconfigure the Primary Network Identifier.

    6. Ensure that the PNID was successfully updated in the VAMI.