VMware vCenter Server Appliance hostname and DNS configuration are reverted after a reboot
search cancel

VMware vCenter Server Appliance hostname and DNS configuration are reverted after a reboot

book

Article ID: 344865

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • vCenter Server Appliance (VCSA) hostname and DNS configuration reverts to original values after rebooting the appliance
  • Changes made to the hostname or the DNS server through the command line or VAMI do not persist across reboots

Environment

VMware vCenter Server 6.x
VMware vCenter Server 7.x
VMware vCenter Server 8.x

 

Resolution

Option 1:
  1. Verify the hostname has changed:
    $ cat /etc/hosts
  1. To prevent reversion of the host name, SSH to the VCSA and edit the file
    /etc/sysconfig/networking/devices/ifcfg-eth0
    to ensure the host has the correct name.

  2. When network configuration occurs insert this entry before the IP Address line:
    HOSTNAME=<hostname.fqdn> ()  [ Where <hostname.fqdn> is the fully qualified VCSA hostname] 
  1. Save the file.
 
Option 2:
Verify and update the vCenter appliance IP-address and hostname:
        $ /opt/vmware/share/vami/vami_config_net

Option 3: 
  1. Change the hostname from the VAMI page directly by navigating to <VCSA_IP>:5480 in a Web browser (where <VCSA_IP> is the IP address of the VCSA)
  2. Click the Admin Tab, and press the Toggle Certificate Setting Button to set 'Certificate Regeneration Enabled' to yes
  3. Power off the appliance
  4. Edit Settings of the VM:
            [Options] - [vApp Options]
             "vApp Options" should be in "Enabled" state.
              "Properties" section should be filled with all the required information i.e. Hostname, Default Gateway, DNS etc.
 
  1. Click on OK
  2. Power on the VM
 
To prevent generation of new certificates in every reboot:
  1. Login to the VAMI page
  2. Click the Admin Tab
  3. Press the Toggle Certificate Setting Button to set 'Certificate Regeneration Enabled' to No
To prevent reversion of the DNS configuration:
  1. Login to the VAMI page
  2. Click the Networking Tab
  3. Click the Address Tab and enter the desired DNS IP address
  4. Perform a graceful shutdown of the VCSA machine for the changes to apply
  5. Reboot the appliance

Option 4 :

Steps to update the Hostname of the vCenter name from IP address to FQDN : 

Note : Ensure there is a good backup of your vCenter Appliance before following the below steps. 

  1. Open a browser and access the vCenter VAMI page at: https://<current-IP-or-FQDN>:5480
  2. Log in with the root credentials.
  3. Navigate to Networking > Network Settings and click Edit.
  4. Select the management network adapter (e.g., NIC0), click Next.
  5. Expand the Hostname and DNS section.
  6. Change the Hostname from IP address to FQDN and update relevant DNS entries as needed.
  7. Click Next, Review and acknowledge the backup warning, then proceed by clicking Finish.
  8. The appliance will automatically update network settings, stop services, and reboot management services. A redirect to the new FQDN's VAMI page occurs upon completion.
  9. Now when you login to vSphere web client you should be able to view the vCenter Hostname to be updated in FQDN instead of IP address. 

Additional Information