An Azure service that is used to provision Windows and Linux virtual machines.
Hi Adaptive Information Systems,
Thanks for reaching out on Microsoft Q&A.
Two things stand out here, and the DNS change you made is likely not the root cause.
1. Your VM probably has no outbound connectivity at all
If this VM was created recently, note that Azure retired default outbound access. New subnets created through the portal are now private by default, meaning the VM cannot reach the internet unless you explicitly enable outbound traffic. Flushing DNS will not help if there is no outbound path.
To confirm, run this from the VM:
Test-NetConnection 8.8.8.8 -Port 443
If this fails, it is a connectivity issue, not DNS. Fix it by adding one of these:
- NAT Gateway on the VM's subnet (recommended)
- A Standard Public IP attached to the VM's NIC
- A Standard Load Balancer with outbound rules
Alternatively, go to your VNet > Subnets > select the subnet > set Default outbound access to Enabled, then stop/deallocate the VM, and restart it. Keep in mind this option goes away for new VNets with the API change after March 31, 2026, so NAT Gateway is the better long term fix.
2. Your DNS setting is invalid
DNS servers must be IP addresses, not hostnames. "google.com" will not work as a DNS server. Use 8.8.8.8 (Google) or leave it as the Azure default 168.63.129.16. Also, set DNS at the VNet or NIC level in the Azure portal rather than inside the guest OS, since DHCP can overwrite in-guest changes.
Also check:
- NSG on the NIC/subnet for any outbound Deny rules
- Effective routes on the NIC (Networking > Effective routes) for a UDR sending 0.0.0.0/0 to a firewall or appliance that may be blocking traffic
Reference: Default outbound access in Azure
Please Upvote and accept the answer if it helps!!