| This is part 13 of the Modernizing Your Infrastructure with Hybrid Cloud series. You can find find the rest of the series located here: http://aka.ms/ModernCloud |
Hopefully by now you have had a chance to use Microsoft Azure Virtual Machines and Websites. One of the things you might want for your server on the internet is an IP address that doesn’t change. You may want this to ensure your outbound traffic from your Azure server uses a predictable IP address. This will enable you to set a DNS record or a firewall rule with your dedicated IP address. Another benefit of reserving an address is that you keep your IP address even when you de-provision your virtual machine.
There are some important steps you need to pay attention to:
- At this time, you can’t go back and apply a reservation to something that’s already been deployed, so you must reserve the IP address first, before deploying.
- You reserve a Virtual IP and the VIP will stay with your cloud service.
- There is a limit of 5 reserved IP addresses per standard subscription. Limit can be raised via a support request.
- There is a limit of 100 reserved IP addresses per Enterprise Agreement subscription. Limit can be raised via a support request.
- The first 5 actively used IP addresses are free. Otherwise IP addresses are about $4 a month.
Pricing details here: http://azure.microsoft.com/en-us/pricing/details/reserved-ip-addresses/ - Reserved IP is supported only for Regional VNets. It is not supported for VNets that are associated with affinity groups. For more information about associating a VNet with a region or an affinity group, see About Regional VNets and Affinity Groups for Virtual Network.
Currently there is no way to reserve your IP address in the graphical web tools. That’s right you must use PowerShell. In the tables below are the commands that are available today to set IP addresses. The three main commands are:
| Command | Explanation |
| get-help *-AzureReservedIP* | List all Azure reserved IP commands |
| Get-AzureReservedIP | View all of your reserved IP addresses |
| New-AzureReservedIP | Reserve a New IP address |
| Remove-AzureReservedIP | Delete a Reservation |
In the So lets take a look at using this on my Azure account:
Here are the commands from above that reserve your IP and then create your VM.
| New-AzureReservedIP –ReservedIPName “MyServer1IP” –Label “Server1IP” –Location “West US”
New-AzureQuickVM -Windows -ServiceName bjl3 -Name bjl3 -InstanceSize Small -ImageName “a699494373c04fc0bc8f2bb1389d6106__Windows-Server-2012-R2-201408.01-en.us-127GB.vhd” -AdminUsername brian -Password Your$Random^Password#Here –ReservedIPName MyServer1IP –Location “West US” |
I hope that helps make it easy for you to reserve your IP address today for your Azure VMs!
-Brian
For more details see the articles below:
- Reserved IP Addresses
http://msdn.microsoft.com/en-us/library/azure/dn690120.aspx - Reserved IP addresses for Cloud Services & Virtual Machines
http://azure.microsoft.com/blog/2014/05/14/reserved-ip-addresses/ - Footnote: I did have an issues when running the New-AzureVM command. I received the error “CurrentStorageAccountName is not accessible”. This was because my default storage account was not set. For details of how to fix this refer here: http://foxdeploy.com/2013/12/07/azure-powershell-current-storage-account-error-when-making-a-new-vm/
