Skip to content

Commit 0171aec

Browse files
Merge pull request #216250 from halkazwini/vm-ip-ps
Virtual Network: Freshness: Create a virtual machine with a static private IP address using Azure PowerShell
2 parents 49364b6 + 0469b51 commit 0171aec

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

articles/virtual-network/ip-services/virtual-networks-static-private-ip-arm-ps.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Create a VM with a static private IP address - Azure PowerShell
2+
title: 'Create a VM with a static private IP address - Azure PowerShell'
33
description: Learn how to create a virtual machine with a static private IP address using Azure PowerShell.
44
author: asudbring
55
ms.author: allensu
66
ms.service: virtual-network
77
ms.subservice: ip-services
88
ms.topic: how-to
9-
ms.date: 10/01/2021
9+
ms.date: 10/27/2022
1010
ms.custom: template-how-to
1111
---
1212

@@ -28,6 +28,7 @@ An Azure resource group is a logical container into which Azure resources are de
2828
Create a resource group with [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup) named **myResourceGroup** in the **eastus2** location.
2929

3030
```azurepowershell-interactive
31+
## Create resource group. ##
3132
$rg =@{
3233
Name = 'myResourceGroup'
3334
Location = 'eastus2'
@@ -99,7 +100,9 @@ $nic | Set-AzNetworkInterface
99100
```
100101

101102
> [!WARNING]
102-
> Though you can add private IP address settings to the operating system, we recommend not doing so until after reading [Add a private IP address to an operating system](virtual-network-network-interface-addresses.md#private).
103+
> From within the operating system of a VM, you shouldn't statically assign the *private* IP that's assigned to the Azure VM. Only do static assignment of a private IP when it's necessary, such as when [assigning many IP addresses to VMs](virtual-network-multiple-ip-addresses-portal.md).
104+
>
105+
>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](virtual-network-network-interface-addresses.md#change-ip-address-settings). Otherwise, you can lose connectivity to the VM. Learn more about [private IP address](virtual-network-network-interface-addresses.md#private) settings.
103106
104107
## Clean up resources
105108

@@ -114,4 +117,4 @@ Remove-AzResourceGroup -Name myResourceGroup -Force
114117
- Learn more about [public IP addresses](public-ip-addresses.md#public-ip-addresses) in Azure.
115118
- Learn more about all [public IP address settings](virtual-network-public-ip-address.md#create-a-public-ip-address).
116119
- Learn more about [private IP addresses](private-ip-addresses.md) and assigning a [static private IP address](virtual-network-network-interface-addresses.md#add-ip-addresses) to an Azure virtual machine.
117-
- Learn more about creating [Linux](../../virtual-machines/windows/tutorial-manage-vm.md?toc=%2fazure%2fvirtual-network%2ftoc.json) and [Windows](../../virtual-machines/windows/tutorial-manage-vm.md?toc=%2fazure%2fvirtual-network%2ftoc.json) virtual machines.
120+
- Learn more about creating [Linux](../../virtual-machines/windows/tutorial-manage-vm.md) and [Windows](../../virtual-machines/windows/tutorial-manage-vm.md) virtual machines.

0 commit comments

Comments
 (0)