This KB Outlines the steps to configure/update DNS Server IP Address in SDDC Manager or the VCF Installer through command line.
SDDC Manager 4.x
SDDC Manager 5.1 or earlier
SDDC Manager 9.0
VCF Installer 9.0
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:
Login to SDDC Manager:
SSH into the SDDC Manager using the vcf
account.
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
DNS_Server_1
and DNS_Server_2
with the appropriate IP addresses of your primary and secondary DNS servers.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
domain
with the domain name and searchpath
with the desired search path for DNS resolution.DNS_Server_1
and DNS_Server_2
with the appropriate DNS server IP addresses.Login to SDDC Manager/VCF Installer:
SSH into the VCF Installer using the vcf
account.
Change to root:
su -
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
DNS_Server_1
and DNS_Server_2
with the appropriate IP addresses of your primary and secondary DNS servers.To verify that the DNS servers have been updated, you can use the following commands:
Check /etc/resolv.conf
:
Run the command:
cat /etc/resolv.conf
This file should list the updated DNS servers.
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
Use the nmctl Command (9.0+):
You can also run the following command to verify DNS settings:
nmctl show_dns
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.