How to update the DNS records on Azure RHEL VM?

Arunprasad K 20 Reputation points
2025-01-25T05:04:42.9966667+00:00

Hi All,

We have some RHEL 7.9, SUSE sles 15 and Windows 2016 servers in our environment where we recently changed the DNS servers in Azure vnet. After DNS change Windows servers get update automatically.

Linux servers don't get the update. I found this https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/custom-dns-configuration-for-azure-linux-vms?tabs=RHEL. Following this I ran "sudo netconfig update" and "sudo systemctl restart wicked.service". It change the records in SUSE servers.

But RHEL servers is not getting the updates after running "sudo systemctl restart NetworkManager". I see the old DNS only /etc/resolv.conf. Then I checked /run/NetworkManager/resolv.conf it's having the correct DNS. And I ran "nmcli dev show" it's also having the correct ones.

Should I need to link /run/NetworkManger/resolv.conf and /etc/resolv.conf or should I leave them as it is?

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,283 questions
Azure Red Hat OpenShift
Azure Red Hat OpenShift
An Azure service that provides a flexible, self-service deployment of fully managed OpenShift clusters.
90 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.