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
* remove IP conversion warnings
* remove unnecessary update when no NAT pools
* add and fix nat scenarios
* fixed as rg dependency
* renamed backup module
* added nat pool migration function
* support for nat rule only configs
* comment clarity
* nat pool migration with emtpy backend
* nat rule ipconfig migration
* nat pool migration validation and param changes
* remove vmss from scenario validation
* add NVA to outbound options
* remove resource graph module check
* move to single line error message
* added Learn doc link
* fix multi lb name validation
* version bump
>On September 30, 2025, Basic Load Balancer will be retired. For more information, see the [official announcement](https://azure.microsoft.com/updates/azure-basic-load-balancer-will-be-retired-on-30-september-2025-upgrade-to-standard-load-balancer/). If you are currently using Basic Load Balancer, make sure to upgrade to Standard Load Balancer prior to the retirement date.
Copy file name to clipboardExpand all lines: AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/Start-AzBasicLoadBalancerUpgrade/Start-AzBasicLoadBalancerUpgrade.psm1
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -248,11 +248,7 @@ function Start-AzBasicLoadBalancerUpgrade {
248
248
}
249
249
}
250
250
catch {
251
-
$message=@"
252
-
[Start-AzBasicLoadBalancerUpgrade] Failed to find basic load balancer '$BasicLoadBalancerName' in resource group '$ResourceGroupName' under subscription
253
-
'$((Get-AzContext).Subscription.Name)'. Ensure that the correct subscription is selected and verify the load balancer and resource group names.
254
-
Error text: $_
255
-
"@
251
+
$message="[Start-AzBasicLoadBalancerUpgrade] Failed to find basic load balancer '$BasicLoadBalancerName' in resource group '$ResourceGroupName' under subscription '$((Get-AzContext).Subscription.Name)'. Ensure that the correct subscription is selected and verify the load balancer and resource group names. Error text: $_"
Copy file name to clipboardExpand all lines: AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1
+18-52Lines changed: 18 additions & 52 deletions
Original file line number
Diff line number
Diff line change
@@ -225,11 +225,7 @@ Function Test-SupportedMigrationScenario {
225
225
226
226
ForEach ($instancein$vmssInstances) {
227
227
If ($instance.ProtectionPolicy.ProtectFromScaleSetActions) {
228
-
$message=@"
229
-
[Test-SupportedMigrationScenario] VMSS '$($vmss.Name)' contains 1 or more instances with a ProtectFromScaleSetActions Instance Protection configured. This
230
-
module cannot upgrade the associated load balancer because a VMSS cannot be a backend member of both basic and standard SKU load balancers. Remove the Instance
231
-
Protection policy and re-run the module.
232
-
"@
228
+
$message="[Test-SupportedMigrationScenario] VMSS '$($vmss.Name)' contains 1 or more instances with a ProtectFromScaleSetActions Instance Protection configured. This module cannot upgrade the associated load balancer because a VMSS cannot be a backend member of both basic and standard SKU load balancers. Remove the Instance Protection policy and re-run the module."
233
229
log -Severity 'Error'
234
230
$vmssInstances.Remove($instance)
235
231
}
@@ -490,7 +486,7 @@ Function Test-SupportedMigrationScenario {
490
486
$message="[Test-SupportedMigrationScenario] Internal load balancer backend VMs do not have Public IPs and will not have outbound internet connectivity after migration to a Standard LB."
491
487
log -Message $message-Severity 'Warning'
492
488
493
-
Write-Host"In order for your VMs to access the internet, you'll need to take additional action post-migration. Either add Public IPs to each VM or assign a NAT Gateway to the VM subnet (see: https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access)."-ForegroundColor Yellow
489
+
Write-Host"In order for your VMs to access the internet, you'll need to take additional action before or after migration. Either add Public IPs to each VM, assign a NAT Gateway to the VM subnet, or route internet traffic through an NVA (see: https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/default-outbound-access)."-ForegroundColor Yellow
494
490
If (!$force.IsPresent) {
495
491
$response=$null
496
492
while ($response-ne'y'-and$response-ne'n') {
@@ -508,49 +504,6 @@ Function Test-SupportedMigrationScenario {
508
504
}
509
505
}
510
506
511
-
# check that Az.ResourceGraph module is installed for VM migrations
512
-
If ($scenario.BackendType-eq'VM'-and!(Get-Module-Name Az.ResourceGraph -ListAvailable)) {
513
-
$message="[Test-SupportedMigrationScenario] Migrating Load Balancers with VM backends requires the Az.ResourceGraph module, but the module was not found."
514
-
log -Message $message-Severity 'Warning'
515
-
516
-
If (!$force.IsPresent) {
517
-
Write-Host"Migrating Load Balancers with VM backends requires the Az.ResourceGraph module, but the module was not found to be installed."-ForegroundColor Yellow
518
-
$response=$null
519
-
while ($response-ine'y'-and$response-ine'n') {
520
-
$response=Read-Host-Prompt "Do you want the script to install the Az.ResourceGraph module for the current user? (y/n)"
521
-
}
522
-
If ($response-ieq'n') {
523
-
$message="[Test-SupportedMigrationScenario] User chose to exit the module"
log -Message "[Test-SupportedMigrationScenario] Load Balancer '$($BasicLoadBalancer.Name)' is valid for migration"
@@ -597,11 +550,24 @@ Function Test-SupportedMultiLBScenario {
597
550
# check that standard load balancer names are different if basic load balancers are in the same resource group
598
551
log -Message "[Test-SupportedMultiLBScenario] Checking that standard load balancer names are different if basic load balancers are in the same resource group"
599
552
553
+
# check standard load balancer names will be unique in the same resource group
log -Severity Error -Message "[Test-SupportedMultiLBScenario] Standard Load Balancer name '$($config.StandardLoadBalancerName)' is used more than once in resource group '$($config.BasicLoadBalancer.ResourceGroupName)'. Standard Load Balancer names must be unique in the same resource group."-terminateOnError
570
+
log -Severity Error -Message "[Test-SupportedMultiLBScenario] Standard Load Balancer name '$($StdLoadBalancerName)' will be used more than once in resource group '$($config.BasicLoadBalancer.ResourceGroupName)'. Standard Load Balancer names must be unique in the same resource group. If renaming load balancers with the -standardLoadBalancerName parameter, make sure new names are unique."-terminateOnError
0 commit comments