question

Tom346-8432 avatar image
1 Vote"
Tom346-8432 asked LiuOscarShenzhen-8964 answered

Can't connect to VM after changing the DNS server address.

I recently had an issue with web connectivity so I tried changing the DNS server address within the OS via network connectors, properties and then internet protocol version 4. I changed it to Google Public DNS (Preferred - 8.8.8.8, Alternate - 8.8.4.4.

As soon as I clicked save settings I was disconnected and I have not been able to connect to the VM since.

Why has it disconnected me by changing to Googles Public DNS and is there a way to reset the network settings (DNS specifically) without having access to the VM?

Thanks,
Tom

azure-virtual-machinesazure-virtual-desktop
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlanKinane avatar image
0 Votes"
AlanKinane answered AlanKinane edited

The IP address and DNS settings should not be configured through the OS for Azure VMs but instead on the network interface resource. You can reset the IP address as follows: https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/reset-network-interface

You can reset the DNS settings on the NIC as per here: https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface#change-dns-servers

If all else fails then you may need to user PowerShell to reset the settings or use the serial console.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi AlanKinane,
We are free to change DNS setting on the servers out of Azure.
Could you please advise why Microsoft add this limitation on Azure?
Thanks!

0 Votes 0 ·
AlanKinane avatar image AlanKinane LiuOscarShenzhen-8964 ·

It is not a limitation, you can change the DNS settings to whatever you want. In Azure virtual machines, the network configuration is instead applied and managed through the network interface (NIC) resource and not the guest operating system of the virtual machine.

0 Votes 0 ·
LiuOscarShenzhen-8964 avatar image
0 Votes"
LiuOscarShenzhen-8964 answered

IP, subnet mask and gateway are still obtained automatically in the guest OS.
After we manual set the DNS server in the guest OS, we can still connect to this VM via another VM in Azure, but it is unreachable from some computers out of Azure which pass through WAN.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.