Use a Static IP Address on an Azure Virtual Machine
Azure is Microsoft’s cloud service platform similar to Amazon Web Services (AWS) that allows you not only the ability to store your data in the cloud but also to use cloud based compute resources such as virtual machines (VMs) for your server needs and also network resources, databases and various apps.
By default when you create a virtual machine, Azure will use DHCP to assign that VM an IP address. This is fine for most situations but when you want to use a VM as a domain controller or as some other server that requires a static IP address then you will need to change that setting within Azure. This is a fairly easy process to do as long as you know where to look within Azure to find the right setting to change.
To change your IP address from dynamic to static simply log into the Microsoft Azure portal and click on the Virtual machines section under Favorites. If you don’t have Virtual Machines under Favorites then you will need to click on All services and then click on Virtual machines. You can also click the star to have it added to your Favorites. Once you are in Virtual machines click on the VM that you want to change the IP address type for.
Next click on Networking under Settings and find the section that says Network interface. Then click on the blue link that shows the name of your network interface. Your interface name will be different from the one shown in the example below.
Now go to IP configurations and find the interface that has the private IP address that you want to change and click on that address.
Under Private IP address settings click on Static and change the IP address to the static IP address you want to use. When you click on Save you will get a warning message saying the network interface will be reprovisioned and that you will need to change any additional settings such as the subnet mask and default gateway. If you are using an IP address on the same networksubnet then you won’t need to change anything else unless you have another VM with the IP address you just changed this one to. Keep in mind that the VM will be rebooted so make sure to save anything you need on that VM before doing this.
After the reboot you can go back into the IP configurations settings and see that the IP address now says static after it.