Configure/Update DNS Server IP Address in SDDC Manager or the VCF Installer through Command Line
search cancel

Configure/Update DNS Server IP Address in SDDC Manager or the VCF Installer through Command Line

book

Article ID: 384656

calendar_today

Updated On: 07-02-2025

Products

VMware SDDC Manager VMware Cloud Foundation

Issue/Introduction

This KB Outlines the steps to configure/update DNS Server IP Address in SDDC Manager or the VCF Installer through command line.

Environment

SDDC Manager 4.x

SDDC Manager 5.1 or earlier

SDDC Manager 9.0

VCF Installer 9.0

Resolution

Note: Using vami_set_dns for SDDC Manager 5.2 is not supported. Please follow Update DNS Server Configuration for SDDC Manager 5.2.

To update the DNS server settings in SDDC Manager, follow these steps:

Pre-Requisite:

  1. Take an Offline Snapshot:
    Before making any changes, ensure you take an offline snapshot of the SDDC Manager Virtual Machine to prevent any issues during the update.

Steps to Set DNS Server IP Address:

  1. Login to SDDC Manager:
    SSH into the SDDC Manager using the vcf account.

  2. Command to Update DNS Server:
    To update the DNS servers, use the following command:

    sudo /opt/vmware/share/vami/vami_set_dns DNS_Server_1 DNS_Server_2
    
    • Replace DNS_Server_1 and DNS_Server_2 with the appropriate IP addresses of your primary and secondary DNS servers.
  3. Command to Update DNS Server, Domain, and Search Path:
    If you need to update the domain name, search path, and DNS servers simultaneously, use the following command:

    sudo /opt/vmware/share/vami/vami_set_dns -d domain -s searchpath DNS_Server_1 DNS_Server_2
    
    • Replace domain with the domain name and searchpath with the desired search path for DNS resolution.
    • Replace DNS_Server_1 and DNS_Server_2 with the appropriate DNS server IP addresses.

Steps to Set DNS Server IP Address (SDDC Manager/VCF Installer 9.0)

  1. Login to SDDC Manager/VCF Installer:
    SSH into the VCF Installer using the vcf account.

  2. Change to root:

    su -
  3. Command to Update DNS Server:
    To update the DNS servers, use the following command:

    nmctl set-dns dev eth0 dns DNS_Server_1,DNS_Server_2 
    • Replace DNS_Server_1 and DNS_Server_2 with the appropriate IP addresses of your primary and secondary DNS servers.

Verification:

To verify that the DNS servers have been updated, you can use the following commands:

  1. Check /etc/resolv.conf:
    Run the command:

    cat /etc/resolv.conf
    

    This file should list the updated DNS servers.

  2. Use the vami_dns Command (Pre 5.2):
    You can also run the following command to verify DNS settings:

    /opt/vmware/share/vami/vami_dns
  3. Use the nmctl Command (9.0+):
    You can also run the following command to verify DNS settings:

    nmctl show_dns

Restart Network Name Resolution Service:

To apply the DNS changes, restart the Network Name Resolution service using:

sudo systemctl restart systemd-resolved.service

This will restart the service and apply the updated DNS configuration.


By following these steps, you can successfully update and verify the DNS server settings in your SDDC Manager.