Create a VM with a static private IP address - Azure portal (2024)

  • Article

When you create a virtual machine (VM), it's automatically assigned a private IP address from a range that you specify. This IP address is based on the subnet in which the VM is deployed, and the VM keeps this address until the VM is deleted. Azure dynamically assigns the next available private IP address from the subnet you create a VM in. If you want to assign a specific IP address in this subnet for your VM, use a static IP address.

Prerequisites

  • An Azure account with an active subscription. You can create an account for free.

Create a VM

Use the following steps to create a VM, and its virtual network and subnet:

  1. Sign in to the Azure portal.

  2. In the portal, search for and select Virtual machines.

  3. Select Create > Azure virtual machine.

  4. On the Basics tab of the Create a virtual machine screen, enter or select the following values:

    • Subscription: Keep the default or select a different subscription.
    • Resource group: Select Create new, and then name the group myResourceGroup.
    • Virtual machine name: Enter myVM.
    • Region: Select (US) East US.
    • Availability options: Select No infrastructure redundancy required.
    • Image: Select Windows Server 2019 Datacenter - x64 Gen2.
    • Size: Accept the default, or drop down and select a size.
    • Username, Password, and Confirm password: Enter an admin username and password for the VM.
    • Public inbound ports: Select Allow selected ports.
    • Select inbound ports: Select RDP (3389).

    Warning

    In this example, you open port 3389 to enable remote access to the Windows Server VM from the internet. However, opening port 3389 to the internet is not recommended to manage production workloads. For information about secure access to Azure VMs, see What is Azure Bastion?.

  5. Select the Networking tab at the top of the page.

  6. On the Networking page, enter or select the following values:

    • Virtual network: Accept the default network name.
    • Subnet: Select default if not already selected.
    • Public IP: Accept the default public IP configuration.
    • Public inbound ports: Select Allow selected ports.
    • Select inbound ports: Select RDP (3389).
  7. Select Review + create. Review the settings, and then select Create.

Note

Azure provides a default outbound access IP for VMs that either aren't assigned a public IP address or are in the backend pool of an internal basic Azure load balancer. The default outbound access IP mechanism provides an outbound IP address that isn't configurable.

The default outbound access IP is disabled when one of the following events happens:

  • A public IP address is assigned to the VM.
  • The VM is placed in the backend pool of a standard load balancer, with or without outbound rules.
  • An Azure NAT Gateway resource is assigned to the subnet of the VM.

VMs that you create by using virtual machine scale sets in flexible orchestration mode don't have default outbound access.

For more information about outbound connections in Azure, see Default outbound access in Azure and Use Source Network Address Translation (SNAT) for outbound connections.

Change private IP address to static

In this procedure, you change the private IP address from dynamic to static for the VM you created previously:

  1. In the portal, search for and select Virtual machines.

  2. In Virtual machines, select myVM from the list.

  3. On the myVM page, under Settings, select Networking.

  4. In Networking, select the name of the network interface next to Network interface. In this example, the name of the NIC is myvm472.

    Create a VM with a static private IP address - Azure portal (2)

  5. On the Network interface page, under Settings, select IP configurations.

  6. In IP configurations, select ipconfig1 in the list.

    Create a VM with a static private IP address - Azure portal (3)

  7. Under Assignment, select Static. Change the private IP address if you want a different one, and then select Save.

    Warning

    If you change the private IP address, the VM associated with the network interface will be restarted to utilize the new IP address.

    Create a VM with a static private IP address - Azure portal (4)

Warning

From within the operating system of a VM, avoid associating a static private IP address on an Azure VM. Only assign a static private IP when it's necessary, such as when assigning many IP addresses to VMs.

If you manually set the private IP address within the operating system, make sure it matches the private IP address assigned to the Azure network interface. Otherwise, you can lose connectivity to the VM. For more information, see private IP address settings.

Clean up resources

When you're finished, delete the resource group and all of the resources it contains:

  1. In the portal, search for and select myResourceGroup.

  2. From the myResourceGroup screen, select Delete resource group.

  3. Enter myResourceGroup for Enter resource group name to confirm deletion, and then select Delete.

Next steps

  • Learn more about static public IP addresses in Azure.

  • Learn more about public IP addresses in Azure.

  • Learn more about Azure public IP address settings.

  • Learn more about private IP addresses and assigning a static private IP address to an Azure VM.

Create a VM with a static private IP address - Azure portal (2024)
Top Articles
Uniglobe Markets: CFD & Forex Trading | ECN Broker | Online Trading
How to Buy Microsoft Stock (MSFT) - Wealth Boundless
St Thomas Usvi Craigslist
Unitedhealthcare Hwp
Koordinaten w43/b14 mit Umrechner in alle Koordinatensysteme
Best Restaurants In Seaside Heights Nj
Zoebaby222
VMware’s Partner Connect Program: an evolution of opportunities
Hell's Kitchen Valley Center Photos Menu
How Much Are Tb Tests At Cvs
9044906381
Bj Alex Mangabuddy
Golden Abyss - Chapter 5 - Lunar_Angel
X-Chromosom: Aufbau und Funktion
Air Quality Index Endicott Ny
Walgreens Bunce Rd
Amerisourcebergen Thoughtspot 2023
Meta Carevr
Democrat And Chronicle Obituaries For This Week
3 Ways to Drive Employee Engagement with Recognition Programs | UKG
Marlene2995 Pagina Azul
Striffler-Hamby Mortuary - Phenix City Obituaries
Www Mydocbill Rada
Rainfall Map Oklahoma
Deepwoken: Best Attunement Tier List - Item Level Gaming
Cavanaugh Photography Coupon Code
How Much Is An Alignment At Costco
La Qua Brothers Funeral Home
Publix Daily Soup Menu
Gina's Pizza Port Charlotte Fl
Texters Wish You Were Here
Mp4Mania.net1
About Us | SEIL
The disadvantages of patient portals
MSD Animal Health Hub: Nobivac® Rabies Q & A
Anguilla Forum Tripadvisor
511Pa
Lima Crime Stoppers
Walgreens On Secor And Alexis
boston furniture "patio" - craigslist
Atu Bookstore Ozark
Avatar: The Way Of Water Showtimes Near Jasper 8 Theatres
Top 1,000 Girl Names for Your Baby Girl in 2024 | Pampers
War Room Pandemic Rumble
Page 5747 – Christianity Today
Pilot Travel Center Portersville Photos
Estes4Me Payroll
Rise Meadville Reviews
Jasgotgass2
Cool Math Games Bucketball
Sunset On November 5 2023
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 5471

Rating: 4.6 / 5 (46 voted)

Reviews: 93% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.