AZ-700 Question 29
Select 2You manage an Azure environment that hosts a Virtual Network (VNet) named VNetProd. The environment includes a custom DNS server at IP address 10.10.0.10 for name resolution. You need to ensure that all VMs in VNetProd use the custom DNS server for name resolution. Some of the VMs are already running. Which two actions must you take to enforce the custom DNS server usage for all VMs in VNetProd?
- A
Specify 10.10.0.10 as the DNS server in the VNet DNS settings for VNetProd.
- B
Configure an Azure DNS private zone and associate it with VNetProd.
- C
Use an Azure Firewall to forward DNS queries to 10.10.0.10.
- D
Restart or redeploy the existing VMs in VNetProd so they pick up the new DNS settings.
- E
Manually update each VM� hosts file to point to the custom DNS server.
Show answer and explanation
Correct answers: A, D
Explanation
To make all virtual machines in a Virtual Network use your custom DNS server, you must set the DNS server address at the VNet level and then restart the existing VMs to force them to pick up the new configuration. For details, see Microsoft documentation on 'Name Resolution for VMs and Role Instances' (https://learn.microsoft.com/azure/virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances).
- A. Correct.
Correct. Updating the VNet-level DNS settings ensures that any new VM deployed in VNetProd inherits the custom DNS configuration. This must be done in the VNet settings under 'DNS servers.'
- B. Incorrect.
Incorrect. While Azure DNS private zones provide custom domain resolution, they do not automatically replace the need for a custom DNS server configuration if you specifically want to use an existing on-premises or self-managed DNS server.
- C. Incorrect.
Incorrect. Azure Firewall is primarily used for traffic filtering and network-level protection. You can set up DNS proxy in Azure Firewall, but it� not the primary method to enforce a custom DNS server for all VMs in the VNet in this scenario.
- D. Correct.
Correct. Existing VMs will not automatically receive the updated DNS settings. Restarting or redeploying them forces the network adapter to obtain the new DNS configuration from the VNet.
- E. Incorrect.
Incorrect. Editing each VM� hosts file is not a scalable or recommended approach for DNS configuration in Azure. Hosts files are also limited to static entries, which is impractical for dynamic name resolution needs.