By default, each Virtual Machine in Azure has a private IP address. That IP address comes from Virtual Network embedded DHCP and, by default, is configured as Dynamic. In some scenarios, private dynamic IP address is not appropriate and you need to configure private IP address to be static.
In on-premise infrastructure, you will (most probably) just select one of available IPs and configure in machine directly. In Azure that is not the best idea, because if you change IP address in machine directly, Azure network will not be aware of that IP address. That can disrupt your access to virtual machine over virtual machine public IP.
If you need to configure private IP address as static, you need to change the IP configuration on NIC level, on Azure, and set Static in IP configuration. That is the same as the Reservation in DHCP and although private IP address will be received from Azure Network DHCP, it will always be the same. If you still need “real” static private IP, you need to configure it directly in machine, but if you have previously configured static private IP in NIC IP configuration, access to the virtual machine will be available. Of course, you need to configure same IP address in NIC IP configuration, as well as in virtual machine.
Changing NIC IP configuration using Azure Portal is pretty straight forward. Once you select desired NIC, you just need to open IP configuration from blade.
Then you need to see what configuration need to be changed, and change per your needs.
Of course, life is easier if you want to use PowerShell 🙂
# Define variables $RGName = "ResourceGroup" $NICName = "EU-IIS-1-nic" # Set private IP address to static $NetworkInterface = Get-AzNetworkInterface -Name $NICName -ResourceGroupName $RGName $NetworkInterface.IpConfigurations.PrivateIpAllocationMethod = "Static" $NetworkInterface | Set-AzNetworkInterface