You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AzureBasicLoadBalancerUpgrade/README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,7 @@ The PowerShell module performs the following functions:
37
37
- Basic Load Balancers with IPV6 frontend IP configurations
38
38
- Basic Load Balancers with a Virtual Machine Scale Set backend pool member where one or more Virtual Machine Scale Set instances have ProtectFromScaleSetActions Instance Protection policies enabled
39
39
- Migrating a Basic Load Balancer to an existing Standard Load Balancer
40
+
- Migrating LBs with Floating IP enabled where backend pool member is a secondary IP config
40
41
41
42
## Install the 'AzureBasicLoadBalancerUpgrade' module
Copy file name to clipboardExpand all lines: AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/Start-AzBasicLoadBalancerUpgrade/Start-AzBasicLoadBalancerUpgrade.psm1
- Basic load balancers with IPV6 frontend IP configurations
19
19
- Basic load balancers with a VMSS backend pool member where one or more VMSS instances have ProtectFromScaleSetActions Instance Protection policies enabled
20
20
- Migrating a Basic load balancer to an existing Standard load balancer
21
+
- Migrating a Basic load balancer with floating IP enabled on load balancing rules, where the backend pool members are secondary IP configurations
21
22
22
23
Multi-load balancer support:
23
24
In a situation where multiple Basic load balancers are configured with the same backend pool members (internal and external load balancers), the migration can be performed in a single operation by specifying the
Copy file name to clipboardExpand all lines: AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1
+49-3Lines changed: 49 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -225,6 +225,30 @@ Function Test-SupportedMigrationScenario {
225
225
log -Message "[Test-SupportedMigrationScenario] All VMSS load balancer associations are with the Basic LB(s) to be migrated."-Severity Information
226
226
}
227
227
}
228
+
229
+
# check if load balancing rule has floating IP enabled and associated NIC IP config is not primary. See: https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-floating-ip
230
+
log -Message "[Test-SupportedMigrationScenario] Checking if load balancing rule has floating IP enabled and associated VMSS IP config is not primary..."
231
+
if ($floatingIPRules=$BasicLoadBalancer.LoadBalancingRules|Where-Object { $_.EnableFloatingIP-eq$true }) {
232
+
# check if floating IP rules contain non-primary IP configurations
233
+
ForEach ($rulein$floatingIPRules) {
234
+
log -message "[Test-SupportedMigrationScenario] Load balancing rule '$($rule.Name)' has floating IP enabled, checking for IP configuration which is not primary..."
if ($ipConfig.LoadBalancerBackendAddressPools.id-contains$backendPool.id-and ($ipConfig.Primary-ne$true-and!$isOnlyIpConfig)) {
244
+
$message="[Test-SupportedMigrationScenario] Load balancing rule '$($rule.Name)' has floating IP enabled and associated IP configuration '$($ipConfig.Name)' from VMSS '$($vmssNic.Name)' is not primary. This is not supported for migration--change the IP config in the backend pool associated with the load balancing rule '$($rule.Name)' to a primary IP configuration and re-run the module. See: https://learn.microsoft.com/azure/load-balancer/load-balancer-floating-ip"
# check if any VMSS instances have instance protection enabled
230
254
log -Message "[Test-SupportedMigrationScenario] Checking for instances in backend pool member VMSS '$($vmssIds.split('/')[-1])' with Instance Protection configured"
@@ -388,7 +412,7 @@ Function Test-SupportedMigrationScenario {
@@ -528,6 +552,28 @@ Function Test-SupportedMigrationScenario {
528
552
log -Message $message-Severity 'Warning'
529
553
}
530
554
}
555
+
556
+
# check if load balancing rule has floating IP enabled and associated NIC IP config is not primary. See: https://learn.microsoft.com/en-us/azure/load-balancer/load-balancer-floating-ip
557
+
log -Message "[Test-SupportedMigrationScenario] Checking if load balancing rule has floating IP enabled and associated IP config is not primary..."
558
+
if ($floatingIPRules=$BasicLoadBalancer.LoadBalancingRules|Where-Object { $_.EnableFloatingIP-eq$true }) {
559
+
# check if floating IP rules contain non-primary IP configurations
560
+
ForEach ($rulein$floatingIPRules) {
561
+
log -message "[Test-SupportedMigrationScenario] Load balancing rule '$($rule.Name)' has floating IP enabled, checking for IP configuration which is not primary..."
If ($null-ne$backendIpConfigs-and$ipConfig.Id-in$backendIpConfigs.id-and ($ipConfig.Primary-eq$false)) {
569
+
$message="[Test-SupportedMigrationScenario] Load balancing rule '$($rule.Name)' has floating IP enabled and associated IP configuration '$($ipConfig.Name)' from NIC '$($nic.Name)' is not primary. This is not supported for migration--change the IP config in the backend pool associated with the load balancing rule '$($rule.Name)' to a primary IP configuration and re-run the module. See: https://learn.microsoft.com/azure/load-balancer/load-balancer-floating-ip"
@@ -684,7 +730,7 @@ Function Test-SupportedMultiLBScenario {
684
730
}
685
731
686
732
# VMs must share an availability set or the backend must be a single VM with no availability set ('NO_AVAILABILITY_SET')
687
-
If (($VMAvailabilitySets.availabilitySetId|Sort-Object|Get-Unique).count -gt1-or ($VMAvailabilitySets.availabilitySetId|Where-Object {$_-eq'NO_AVAILABILITY_SET'}).count -gt1) {
733
+
If (($VMAvailabilitySets.availabilitySetId|Sort-Object|Get-Unique).count -gt1-or ($VMAvailabilitySets.availabilitySetId|Where-Object {$_-eq'NO_AVAILABILITY_SET'}).count -gt1) {
688
734
log -Severity Error -Message "[Test-SupportedMultiLBScenario] The provided Basic Load Balancers do not share backend pool members (VMs are in different or no Availability Sets: '$($VMAvailabilitySets.availabilitySetId-join',')'). Using -multiLBConfig when backend is not shared adds risk and complexity in recovery."-terminateOnError
0 commit comments