Create a VM with a static public IP address using the Azure portal
You can create virtual machines (VMs) in Azure and expose them to the public Internet by using a public IP address. By default, Public IPs are dynamic and the address associated to them may change when the VM is deleted or stopped/deallocated. To guarantee that the VM always uses the same public IP address, you need to create a static Public IP.
Before you can implement static Public IPs in VMs, it is necessary to understand when you can use static Public IPs, and how they are used. Read the IP addressing overview to learn more about IP addressing in Azure.
Azure has two different deployment models for creating and working with resources: Resource Manager and classic. This article covers using the Resource Manager deployment model, which Microsoft recommends for most new deployments instead of the classic deployment model.
This document will walk through a deployment that uses a static public IP address allocated to a virtual machine (VM). In this scenario, you have a single VM with its own static public IP address. The VM is part of a subnet named FrontEnd and also has a static private IP address (192.168.1.101) in that subnet.
You may need a static IP address for web servers that require SSL connections in which the SSL certificate is linked to an IP address.
You can follow the steps below to deploy the environment shown in the figure above.
Create a VM with a static public IP
To create a VM with a static public IP address in the Azure portal, complete the following steps:
- From a browser, navigate to the Azure portal and, if necessary, sign in with your Azure account.
- On the top left hand corner of the portal, click New>>Compute>Windows Server 2012 R2 Datacenter.
- In the Select a deployment model list, select Resource Manager and click Create.
In the Basics blade, enter the VM information as shown below, and then click OK.
In the Choose a size blade, click A1 Standard as shown below, and then click Select.
In the Settings blade, click Public IP address, then in the Create public IP address blade, under Assignment, click Static as shown below. And then click OK.
- In the Settings blade, click OK.
Review the Summary blade, as shown below, and then click OK.
Notice the new tile in your dashboard.
Once the VM is created, the Settings blade will be displayed as shown below