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
Types of Banks in the U.S. | One Percent for America
Do Exes Ever Come Back After Dating Someone New?
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
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.