I had an interesting issue in Windows VM running in Azure, trying to connect to Storage Account A. From inside the VM I was unable to even resolve the storage account’s public domain name, yet this was possible from my computer. I was able to resolve the domain name of Storage Account B.

The difference in A and B is that B has a private endpoint defined, even though it’s used for a completely different purpose. If I added a private endpoint to Storage Account B, I was able to resolve the public domain name from inside the VM. This makes sense, as is pointed out in the docs.

But again, without this private link, I was unable to resolve the domain name from the VM, yet I was able to do so from my computer regardless. If I removed the private endpoint, the resolution failed in the VM. This is all using the default DNS server, the issue doesn’t happen if I use Google’s. Finally, I tried ipconfig /flushdns on the VM, which fixed the issue.