Configure/Update DNS Server IP Address in SDDC Manager through Command Line
search cancel

Configure/Update DNS Server IP Address in SDDC Manager through Command Line

book

Article ID: 384656

calendar_today

Updated On:

Products

VMware SDDC Manager VMware Cloud Foundation

Issue/Introduction

This KB Outlines the steps to configure/update DNS Server IP Address in SDDC Manager through Command Line

Environment

VCF 4.x

VCF 5.x

Resolution

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.

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:
    You can also run the following command to verify DNS settings:

    /opt/vmware/share/vami/vami_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.