I’ve recently just deployed a new Azure Linux VM for hosting a Discourse instance I run and noticed that is didn’t have a DNS entry on cloudapp.net. Last time I deployed one it was instantly given one in the format
server-name.cloudapp.net, but this time it wasn’t and I had to set it up by myself.
I suspect it is something new for Resource Managed deployments.
Here’s a list of the steps you need to follow if you ever need to do the same.
Assuming you have just deployed a VM and it doesn’t have a DNS on cloudapp.net you will see something like this:
Dissociate Public IP
First you need to Dissociate the Public IP so you can make changes.
Click the Public IP Address to open the settings:
Then click Dissociate and confirm when prompted.
You cannot change any settings whilst the Public IP is in use.
Configuring the DNS
From the Public IP page, click All Settings then Configuration to open up the settings:
Then you can enter a new DNS prefix for datacentre.cloudapp.azure.net:
Reassociate the Public IP
Now you need to reassociate the Public IP with the VM.
From the VM Screen (First Image) click All Settings, then Network Interfaces:
Click on the Interface listed:
Click on IP Addresses from the Settings blade:
Click on Enable then click on the IP Address Configure Required… and select the default (highlighted) Public IP Address from the list.
Then click Save.
Validation and Testing
Now if you close and re-open the VM blade you should see a new Public IP address appear.
Click on the Public IP Address to open the blade and you will see your full DNS Entry and a Copy to clipboard button when you hover on it:
To test, ping the VM and see if the DNS resolves:
C:\> ping taeguk-test-dns.northeurope.cloudapp.azure.com Pinging taeguk-test-dns.northeurope.cloudapp.azure.com [18.104.22.168]
The requests will timeout because Azure has ICMP disabled, but so long as the DNS resolves, you’ve done it.
This seems to be a change that I can’t find a source for to do with Resource Managed VM’s instead of Classic VM’s. It used to work OK on classic VM’s.
Note: I have deleted the VM in this post now.