This article will discuss multiple ways to associate a Static Public IP address with your Azure Virtual Machine. To connect to the VM from the Internet, you need an Azure VM public IP. There are two types: dynamic and static. If you want to avoid this type of scenario and don’t want to use the Public IP address, you can use Azure VM FQDN as a better solution.
Table of Contents
How to add public IP to Azure VM
Let us discuss all the approaches individually.
Approach-1 Adding public IP to Azure VM during the creation time
You can associate or assign a static Public IP while creating a new Virtual Machine and an existing Azure Virtual Machine.
To add public IP to Azure VM, follow the below steps.
- Log in to the Azure Portal.
- Search for “Virtual Machines” and click on the search result “Virtual Machines”.
- Click on the + Create option –> Azure Virtual Machine.

4. On the Create a Virtual Machine window, fill in all the essential information on the Basics tab.
5. Now, click on the Networking Tab. For the Public IP option, click on the Create new link to create a new Public IP.

6. On the Create public IP address window, provide a name for the public IP and select the Static option, which is essential —> Click on the OK button.

Approach-2 Assign public IP to Azure VM using PowerShell
Check out how to assign a static Public IP to a Virtual Machine during creation time using PowerShell for a step-by-step tutorial.
Approach-3: Adding public IP address to Azure VM for an existing Virtual Machine
When you already have a Virtual Machine, you can assign a static Public IP address using the instructions below.
- Log in to the Azure Portal.
- Search for “Virtual Machines” and click on the search result “Virtual Machines”.
- You will now see the list of Virtual Machines you created. Click on the one where you want to change the Public IP address to Static.
- Click on the Networking option from the left navigation.

5. Now, click on the Network Interface option.

6. Click on the IP configurations option from the left navigation on the Network Interface page.

7. Click the IP configuration (ipconfig 1).

8. Click the Create new link for the Public IP address option under the Public IP address settings.

9. Provide a name for the Public IP and select the assignment as Static. Then click on the OK button, and finally, click on the Save button to save the changes.

You may also like following the articles below
- How To Open Ports On Azure VM
- Azure PowerShell Get VM Public IP
- How to increase disk size in Azure VM
- Azure PowerShell List Virtual Machines
- How to find unattached disks in Azure
Wrapping Up
In this article, we have discussed how to assign a static Public IP to the Azure Virtual to a new Virtual Machine and an existing Virtual machine.

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.
