As you might already know that Azure support name resolutions for the hosted VMs by assigning your on premise DNS server or the Azure provided name resolutions to resolve hosted virtual machines.
However for any large enterprises it will be convenient to configure their on premise DNS servers to host their services efficiently and gain the full control on name resolutions.
Because below are the limitations/consideration that you want to keep in mind when you wish to use the Azure provided DNS.
- The Azure-created DNS suffix cannot be modified.
- You cannot manually register your own records.
- WINS and NetBIOS are not supported. You cannot see your VMs in Windows Explorer.
- Host names must be DNS-compatible. Names must use only 0-9, a-z, and ‘-‘, and cannot start or end with a ‘-‘.
- DNS query traffic is throttled for each VM. Throttling shouldn’t impact most applications. If request throttling is observed, ensure that client-side caching is enabled. For more information.
- Only VMs in the first 180 cloud services are registered for each virtual network in a classic deployment model. This limit does not apply to virtual networks in Azure Resource Manager.
So when opt to use your own DNS there are some norms/recommendations and below are those.
- DNS IP configurations should not be be applied directly within the Window Virtual machines. Because during the event of service heal when the virtual machine network adapter get replaced your custom settings on the network adapter will get wiped out.
- If we are planning custom DNS server (On Premise) for your virtual network, least one DNS server IP address has to be configured else the virtual network will ignore the configuration and use Azure-provided DNS details.
- So once we change the DNS configuration of an already deployed virtual machine, a reboot has to be performed on the virtual machine for the changes to take effect.
Another best practice for best performance is, when you are using Azure VMs as DNS servers, IPv6 should be disabled. A public IP address should be assigned to each DNS server VM.
So here is how to change the DNS settings for a Virtual Machine.