Skip to content

Commit 0d064f4

Browse files
Merge pull request #285661 from mbrat2005/avset-public-ip-upgrade
Public IP Upgrade for Availability Sets
2 parents 219089a + 794c4b0 commit 0d064f4

File tree

3 files changed

+125
-12
lines changed

3 files changed

+125
-12
lines changed

articles/virtual-network/ip-services/public-ip-basic-upgrade-guidance.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,29 @@ We recommend the following approach to upgrade to Standard SKU public IP address
2929

3030
a. If you need a zone redundant public IP address, create a new Standard SKU public IP address using [Portal](create-public-ip-portal.md), [PowerShell](create-public-ip-powershell.md), [CLI](create-public-ip-cli.md), or [ARM template](create-public-ip-template.md).
3131

32-
b. If you don't need a zone redundant public IP address, use the [following upgrade options](#upgrade-using-portal-powershell-and-azure-cli).
32+
b. If you don't need a zone redundant public IP address, use the [following upgrade options](#upgrade-disassociated-public-ips-using-portal-powershell-or-azure-cli).
3333

3434
4. Create a migration plan for planned downtime.
3535

3636
5. Depending on the resource associated with your Basic SKU public IP addresses, perform the upgrade based on the following table:
3737

38-
| Resource using Basic SKU public IP addresses | Decision path |
38+
| Resource using Basic SKU public IP addresses | Decision path |
3939
| ------ | ------ |
40-
| Virtual Machine or Virtual Machine Scale Sets (flex model) | Disassociate IP(s) and utilize the upgrade options detailed after the table. For virtual machines, you can use the [upgrade script](public-ip-upgrade-vm.md). |
40+
| Virtual Machine | Use scripts or manually detach and upgrade public IPs. For standalone virtual machines, you can use the [upgrade script](public-ip-upgrade-vm.md) or for virtual machines in an availability set use [this script](public-ip-upgrade-availability-set.md). |
41+
| Virtual Machine Scale Sets | [Replace basic SKU instance public IP addresses](/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking#public-ipv4-per-virtual-machine) with new standard SKU |
4142
| Load Balancer (Basic SKU) | New Load Balancer SKU required. Use the upgrade script [Upgrade Basic Load Balancer to Standard SKU](../../load-balancer/upgrade-basic-standard-with-powershell.md) to upgrade to Standard Load Balancer |
42-
| VPN Gateway (using Basic IPs) |At this time, it's not necessary to upgrade. When an upgrade is necessary, we'll update this decision path with migration information and send out a service health alert. |
43-
| ExpressRoute Gateway (using Basic IPs) | New ExpressRoute Gateway is required. Follow the [ExpressRoute Gateway migration guidance](../../expressroute/gateway-migration.md) for upgrading from Basic to Standard SKU. |
43+
| VPN Gateway (using Basic IPs) |At this time, it's not necessary to upgrade. When an upgrade is necessary, we'll update this decision path with migration information and send out a service health alert. |
44+
| ExpressRoute Gateway (using Basic IPs) | New ExpressRoute Gateway is required. Follow the [ExpressRoute Gateway migration guidance](../../expressroute/gateway-migration.md) for upgrading from Basic to Standard SKU. |
4445
| Application Gateway (v1 SKU) | New AppGW SKU required. Use this [migration script to migrate from v1 to v2](../../application-gateway/migrate-v1-v2.md). |
4546

4647
> [!NOTE]
47-
> If you have a virtual machine scale set (uniform model) with public IP configurations per instance, note these are not Public IP resources and as such cannot be upgraded; a new virtual machine scale set is required. You can use the SKU property to specify that Standard IP configurations are required for each VMSS instance as shown [here](/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking#public-ipv4-per-virtual-machine).
48+
> If you have a virtual machine scale set (uniform model) with public IP configurations per instance, note these are not Public IP resources and as such cannot be upgraded; a new public IP address is required. You can use the SKU property to specify that Standard IP configurations are required for each VMSS instance as shown [here](/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-networking#public-ipv4-per-virtual-machine).
4849
4950
## Basic SKU vs. Standard SKU
5051

5152
This section lists out some key differences between these two SKUs.
5253

53-
|""| Standard SKU public IP | Basic SKU public IP |
54+
| Aspect | Standard SKU public IP | Basic SKU public IP |
5455
|---------|---------|---------|
5556
| **Allocation method** | Static. | For IPv4: Dynamic or Static; For IPv6: Dynamic. |
5657
| **Security** | Secure by default model and be closed to inbound traffic when used as a frontend. Allow traffic with [network security group](../network-security-groups-overview.md#network-security-groups) is required (for example, on the NIC of a virtual machine with a Standard SKU public IP attached). | Open by default. Network security groups are recommended but optional for restricting inbound or outbound traffic. |
@@ -61,15 +62,15 @@ This section lists out some key differences between these two SKUs.
6162
| **[NAT Gateway Support](../nat-gateway/nat-overview.md)** | IPv4 is supported | Not supported |
6263
| **[Azure Firewall Support](../nat-gateway/nat-overview.md)** | IPv4 is supported | Not supported |
6364

64-
## Upgrade using Portal, PowerShell, and Azure CLI
65+
## Upgrade disassociated public IPs using Portal, PowerShell, or Azure CLI
6566

6667
Use the Azure portal, Azure PowerShell, or Azure CLI to help upgrade from Basic to Standard SKU.
6768

68-
- [Upgrade a public IP address - Azure portal](public-ip-upgrade-portal.md)
69+
- [Upgrade a disassociated public IP address - Azure portal](public-ip-upgrade-portal.md)
6970

70-
- [Upgrade a public IP address - Azure PowerShell](public-ip-upgrade-powershell.md)
71+
- [Upgrade a disassociated public IP address - Azure PowerShell](public-ip-upgrade-powershell.md)
7172

72-
- [Upgrade a public IP address - Azure CLI](public-ip-upgrade-cli.md)
73+
- [Upgrade a disassociated public IP address - Azure CLI](public-ip-upgrade-cli.md)
7374

7475
## FAQ
7576

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
title: 'Upgrade public IP addresses attached to virtual machines in an Availability Set from Basic to Standard'
3+
titleSuffix: Azure Virtual Network
4+
description: This article shows you how to upgrade all public IP address attached to a VM in an Availability Set to a standard public IP address
5+
author: mbender-ms
6+
ms.author: mbratschun
7+
ms.date: 08/27/2024
8+
ms.service: azure-virtual-network
9+
ms.subservice: ip-services
10+
ms.topic: how-to
11+
---
12+
13+
# Upgrade all public IP addresses attached to VMs in an Availability Set from Basic to Standard
14+
15+
>[!Important]
16+
>On September 30, 2025, Basic SKU public IPs will be retired. For more information, see the [official announcement](https://azure.microsoft.com/updates/upgrade-to-standard-sku-public-ip-addresses-in-azure-by-30-september-2025-basic-sku-will-be-retired/). If you are currently using Basic SKU public IPs, make sure to upgrade to Standard SKU public IPs prior to the retirement date. This article will help guide you through the upgrade process.
17+
18+
For more information about the retirement of Basic SKU Public IPs and the benefits of Standard SKU Public IPs, see [here](public-ip-basic-upgrade-guidance.md)
19+
20+
## Upgrade overview
21+
22+
This script upgrades any Public IP Addresses attached to the Virtual Machines (VMs) in an Availability Set from Basic to Standard SKU. In order to perform the upgrade, the Public IP Address allocation method is set to static before being disassociated from each VM. Once disassociated, the Public IP SKU is upgraded to Standard, then the IP is reassociated with original VM until all IPs are upgraded.
23+
24+
Because the Public IP allocation is set to 'Static' before detaching from the VMs, the IP addresses don't change during the upgrade process, even in the event of a script failure. The module double-checks that the Public IP allocation method is 'Static' before detaching the Public IP from the VM.
25+
26+
The module logs all upgrade activity to a file named `AvSetPublicIPUpgrade.log`, created in the same location where the module was executed (by default).
27+
28+
## Constraints/ Unsupported Scenarios
29+
30+
* **VMs with network interfaces associated to a Load Balancer**: Because the Load Balancer and Public IP SKUs associated with a VM must match, it isn't possible to upgrade the instance-level Public IP addresses associated with a VM when the VM's network interfaces are also associated with a Load Balancer, either through Backend Pool or NAT Pool membership. Use the scripts [Upgrade a Basic Load Balancer to Standard SKU](../../load-balancer/upgrade-basic-standard-with-powershell.md) to upgrade both the Load Balancer and Public IPs as the same time.
31+
32+
* **VMs without a Network Security Group**: VMs with IPs to be upgraded must have a Network Security Group (NSG) associated with either the subnet of each IP configuration with a Public IP, or with the NIC directly. This is because Standard SKU Public IPs are "secure by default," meaning that any traffic to the Public IP must be explicitly allowed at an NSG to reach the VM. Basic SKU Public IPs allow any traffic by default. Upgrading Public IP SKUs without an NSG would result in inbound internet traffic to the Public IP previously allowed with the Basic SKU. See: [Public IP SKUs](public-ip-addresses.md#sku)
33+
34+
## Download the script
35+
36+
Download the migration script from the [PowerShell Gallery](https://www.powershellgallery.com/packages/AzureAvSetBasicPublicIPUpgrade).
37+
38+
```powershell
39+
Install-Module -Name AzureAvSetBasicPublicIPUpgrade -Scope CurrentUser -Repository PSGallery -Force
40+
```
41+
42+
## Use the module
43+
44+
1. Use `Select-AzSubscription` to select the Azure subscription where your Availability Set exists
45+
46+
```powershell
47+
Select-AzSubscription -Subscription <SubscriptionId>
48+
```
49+
2. Locate the Availability Set with the attached Basic Public IPs that you wish to upgrade. Record its name and resource group name.
50+
51+
3. Examine the module parameters:
52+
- *AvailabilitySetName [string] Required* - This parameter is the name of your Availability Set.
53+
- *ResourceGroupName [string] Required* - This parameter is the resource group for your Availability Set with the Basic Public IPs attached that you want to upgrade.
54+
55+
4. Run the upgrade, using the following examples or `Get-Help Start-AzAvSetPublicIPUpgrade` for guidance.
56+
57+
### Example uses of the script
58+
59+
Upgrade VMs in a single Availability Set, passing the Availability Set name and resource group name as parameters.
60+
```powershell
61+
Start-AzAvSetPublicIPUpgrade -availabilitySetName 'myAvSet' -resourceGroupName 'myRG'
62+
```
63+
64+
Evaluate VMs in a single Availability Set, without making any changes
65+
```powershell
66+
Start-AzAvSetPublicIPUpgrade -availabilitySetName 'myAvSet' -resourceGroupName 'myRG' -WhatIf
67+
```
68+
69+
Attempt upgrade of VMs in every Availability Set the user has access to. VMs without Public IPs, which are already upgraded, or which do not have NSGs are skipped.
70+
```powershell
71+
Get-AzAvailabilitySet -resourceGroupName 'myRG' | Start-AzAvSetPublicIPUpgrade -skipVMMissingNSG
72+
```
73+
74+
Recover from a failed migration, passing the name and resource group of the Availability Set to recover, along with the recovery log file.
75+
```powershell
76+
Start-AzAvSetPublicIPUpgrade -RecoverFromFile ./AvSetPublicIPUpgrade_Recovery_2020-01-01-00-00.csv -AvailabilitySetName myAvSet -ResourceGroup rg-myrg
77+
```
78+
79+
### Recovering from a failed migration
80+
81+
If a migration fails due to a transient issue, such as a network outage or client system issue, the migration can be retried to configure the VM and Public IPs in the goal state. At execution, the script outputs a recovery log file, which is used to ensure the VM is properly reconfigured. Review the log file `AvSetPublicIPUpgrade.log` created in the location where the script was executed.
82+
83+
To recover from a failed upgrade, pass the recovery log file path to the script with the `-recoverFromFile` parameter and identify the Availability Set to recover with the `-AvailabilitySetName` parameter, as shown in this example.
84+
85+
```powershell
86+
Start-VMPublicIPUpgrade -RecoverFromFile ./AvSetPublicIPUpgrade_Recovery_2020-01-01-00-00.csv -AvailabilitySetName myAvSet -ResourceGroupName rg-myrg
87+
```
88+
89+
## Common questions
90+
91+
### How long will the migration take and how long will my VM be inaccessible at its Public IP?
92+
93+
The time it takes to upgrade a VM's Public IPs depends on the number of Public IPs and Network Interfaces associated with the VM. In testing, a VM with a single NIC and Public IP takes between 1 and 2 minutes to upgrade. Each NIC on the VM adds about another minute, and each Public IP adds a few seconds each.
94+
95+
### Can I roll back to a Basic SKU Public IP?
96+
97+
It isn't possible to downgrade a Public IP address from Standard to Basic.
98+
99+
### Can I test a migration before executing?
100+
101+
There is no way to evaluate upgrading a Public IP without completing the action. However, this script includes a `-WhatIf` parameter, which checks that your Availability Set VMs will support the upgrade and walks through the steps without taking action.
102+
103+
### Does the script support Zonal Basic SKU Public IPs?
104+
105+
Yes, the process of upgrading a Zonal Basic SKU Public IP to a Zonal Standard SKU Public IP is identical and works in the script.
106+
107+
## Next steps
108+
109+
* [Upgrading a Basic public IP address to Standard SKU - Guidance](public-ip-basic-upgrade-guidance.md)
110+
* [Upgrading a Basic public IP address to Standard SKU - Portal](public-ip-upgrade-portal.md)

articles/virtual-network/ip-services/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,10 @@ items:
114114
href: associate-public-ip-address-vm.md
115115
- name: Dissociate public IP address from a VM
116116
href: remove-public-ip-address-vm.md
117-
- name: Upgrade a basic public IP address on a VM
117+
- name: Upgrade basic public IP addresses on a VM
118118
href: public-ip-upgrade-vm.md
119+
- name: Upgrade basic public IP addresses on VMs in an Availability Set
120+
href: public-ip-upgrade-availability-set.md
119121
- name: Add dual-stack network to an existing VM
120122
href: add-dual-stack-ipv6-vm-portal.md
121123
- name: Create a virtual machine with a dual-stack network

0 commit comments

Comments
 (0)