I look back not that long ago and I was managing development virtual machines that were running locally on a powerful laptop for development purposes. Now I am utilizing Azure. It is easier to spin up a virtual machine and I no longer need to carry around a laptop the size of a small desktop.
Cost is always a factor in any environment and even more so when it comes to development environments. I have my development virtual machines set to shutdown automatically at the end of the day to reduce costs. Why have a server running 24 /7 that doesn’t need to be. With the default settings of a Dynamic IP this means that I end up with a different public IP each time I restart the virtual machine. To make it easier to connect to virtual machines that do not have a static public IP set Azure has the ability to add a DNS name label. This gives you a name that resolves to the dynamic IP that gets assigned on startup. Once this is configured you can then RDP to your virtual machine using that name rather than the IP address.
- Login to you subscription at portal.azure.com
- Click Virtual Machines link on current navigation
- Click the VM you want to set the DNS name label on from your list
- The Overview panel will be presented. In the upper section you will see the Public IP address / DNS name label. Click the link
- Enter DNS name label
- Click Save
Now you can open a remote desktop session and use the full DNS name label to connect, you no longer need to check the IP after each startup.