When you configure a virtual network in Microsoft Azure, the DNS configuration is within the virtual network itself. If you reviewing this article, it recommends to reset your DNS server to be your domain controller within your virtual network.
However, when you do that you lose your internet connection within your VM because it can no longer find a public DNS server. You can solve this problem by registering one of Microsoft’s public DNS servers within your virtual network configuration.
The public DNS servers are 22.214.171.124 and 126.96.36.199. You have to register them in two spots: 1) under DNS servers in the virtual network tab and 2) you have to add them specifically to your virtual network under configuration.
In addition, make sure you restart your VMs before these settings will take effect.