Skip to content

Commit d1092af

Browse files
committed
Updates to code
1 parent 7253292 commit d1092af

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed
Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,66 @@
11
---
22
title: Migrating from NIC to IP-based backend pools
33
titleSuffix: Azure Load Balancer
4-
description: In this article,
4+
description: This article covers migrating a load balancer from NIC-based backend pools to IP-based backend pools for virtual machines and virtual machine scale sets.
55
services: load-balancer
66
author: mbender-ms
77
ms.author: mbender
88
ms.service: load-balancer
99
ms.topic: how-to
10-
ms.date: 09/08/2022
10+
ms.date: 09/22/2022
1111
ms.custom: template-how-to
1212
---
1313

14-
# Migrating from NIC to IP-based backend pools
14+
# Migrating from NIC to IP-based backend pools
15+
16+
In this article, you'll learn how to migrate a load balancer with NIC-based backend pools to use IP-based backend pools with virtual machines and virtual machine scale sets
1517

1618
## What is IP-based Load Balancer
1719

1820
IP-based load balancers reference the private IP address of the resource in the backend pool rather than the resource’s NIC. IP-based load balancers enable the pre-allocation of private IP addresses in a backend pool, without having to create the backend resources themselves in advance.
1921

20-
## Migrating NIC-based backend pools to IP-based
22+
## Migrating NIC-based virtual machine backend pools to IP-based
23+
24+
To migrate a load balancer with NIC-based backend pools to IP-based with VMs (not virtual machine scale sets instances) in the backend pool, you can utilize the following migration REST API.
2125

22-
To migrate a load balancer with NIC-based backend pools to IP-based with VMs (notVMSS instances) in the backend pool, you can utilize the following migration REST API.
26+
```http
2327
24-
Method: POST
28+
POST URL: https://management.azure.com/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/loadBalancers/{lbName}/migrateToIpBased?api-version=2022-01-01
2529
26-
URL: https://management.azure.com/subscriptions/{sub}/resourceGroups/{rg}/providers/Microsoft.Network/loadBalancers/{lbName}/migrateToIpBased?api-version=2022-01-01
30+
```
2731

2832
Request: List (string) of backend pools to be migrated.
2933

30-
A full example using the CLI to migrate all backend pools in a load balancer is shown here: az rest –m post –u “https://management.azure.com/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup/providers/Microsoft.Network/loadBalancers/MyLB/migrateToIpBased?api-version=2022-01-01”
34+
A full example using the CLI to migrate all backend pools in a load balancer is shown here:
35+
36+
```azurecli
37+
38+
az rest –m post –u “https://management.azure.com/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup/providers/Microsoft.Network/loadBalancers/MyLB/migrateToIpBased?api-version=2022-01-01”
39+
40+
```
3141

32-
A full example using the CLI to migrate a set of specific backend pool in a load balancer is shown below. To migrate a specific group of backend pools from NIC-based to IP-based, you can pass in a list of the backend pool names in the request body: az rest –m post –u “https://management.azure.com/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup/providers/Microsoft.Network/loadBalancers/MyLB/migrateToIpBased?api-version=2022-01-01”
42+
43+
A full example using the CLI to migrate a set of specific backend pool in a load balancer is shown below. To migrate a specific group of backend pools from NIC-based to IP-based, you can pass in a list of the backend pool names in the request body:
44+
45+
```azurecli
46+
47+
az rest –m post –u “https://management.azure.com/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup/providers/Microsoft.Network/loadBalancers/MyLB/migrateToIpBased?api-version=2022-01-01”
3348
3449
-b {\"Pools\":[\"MyBackendPool\"]}
50+
```
51+
## Upgrading LB with virtual machine scale sets attached
52+
53+
To upgrade a NIC-based load balancer to IP based load balancer with virtual machine scale sets in the backend pool, follow the following steps:
54+
1. Configure the upgrade policy of the virtual machine scale sets to be automatic. Note that if the upgrade policy is not set to automatic, all virtual machine scale sets instances must be upgraded after calling the migration API.
55+
1. Using the Azure’s migration REST API, upgrade the NIC based LB to an IP based LB. a. Note, if a manual upgrade policy is in place, upgrade all VMs in the virtual machine scale sets before step 3.
56+
1. Remove the reference of the load balancer from the network profile of the virtual machine scale sets, and update the VM instances to reflect the changes.
57+
58+
A full example using the CLI is shown here:
3559

36-
## Upgrading LB with VMSS attached
60+
```azurecli
3761
38-
To upgrade a NIC based LB to IP based LB with virtual machine scale sets (VMSS) in the backend pool, follow the following steps:
39-
1. Configure the upgrade policy of the VMSS to be automatic. Note that if the upgrade policy is not set to automatic, all VMSS instances must be upgraded after calling the migration API.
40-
1. Using the Azure’s migration REST API, upgrade the NIC based LB to an IP based LB. a. Note, if a manual upgrade policy is in place, upgrade all VMs in the VMSS before step 3.
41-
1. Remove the reference of the load balancer from the network profile of the VMSS, and update the VM instances to reflect the changes.
62+
Az rest –m post –u “https://management.azure.com/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup/providers/Microsoft.Network/loadBalancers/MyLB/migrateToIpBased?api-version=2022-01-01”
4263
43-
A full example using the CLI is shown here: Az rest –m post –u “https://management.azure.com/subscriptions/MySubscriptionId/resourceGroups/MyResourceGroup/providers/Microsoft.Network/loadBalancers/MyLB/migrateToIpBased?api-version=2022-01-01”
64+
az virtual machine scale sets update --resource-group MyResourceGroup --name MyVMSS --remove virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].loadBalancerBackendAddressPools
4465
45-
az vmss update --resource-group MyResourceGroup --name MyVMSS --remove virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].loadBalancerBackendAddressPools
66+
```

0 commit comments

Comments
 (0)