Skip to content

Commit 3638de5

Browse files
authored
Improve NAT Rule/BE validation message (#147)
1 parent e1624d2 commit 3638de5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/AzureBasicLoadBalancerUpgrade.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'AzureBasicLoadBalancerUpgrade'
1313

1414
# Version number of this module.
15-
ModuleVersion = '2.5.0'
15+
ModuleVersion = '2.5.1'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -107,7 +107,7 @@
107107
# IconUri = ''
108108

109109
# ReleaseNotes of this module
110-
ReleaseNotes = 'Add check for NAT Rule member VMs outside backend pools on external LBs.'
110+
ReleaseNotes = 'Improve NAT Rule/BE validation message, fix AvSet detection.'
111111

112112
# Prerelease string of this module
113113
# Prerelease = 'beta'

AzureBasicLoadBalancerUpgrade/module/AzureBasicLoadBalancerUpgrade/modules/ValidateScenario/ValidateScenario.psm1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ Function Test-SupportedMigrationScenario {
447447
foreach ($natRuleBackendIpConfiguration in $natRule.BackendIpConfiguration) {
448448
$vm,$nic = _GetBackendMemberNicAndVM -backendIpConfigurationId $natRuleBackendIpConfiguration.Id
449449

450-
If ($vm.id -notin $backendPoolVMs.id) {
450+
If ($vm.id -notin $backendPoolVMs.id -and $vm.id -notin $natRuleOnlyVMs.id) {
451451
$natRuleOnlyVMs += $vm
452452
}
453453

@@ -482,7 +482,7 @@ Function Test-SupportedMigrationScenario {
482482
log -Message "[Test-SupportedMigrationScenario] Checking that all NAT Rule associated VMs are also in backend pools for external LBs or have Public IPs"
483483
If ($scenario.ExternalOrInternal -eq 'External' -and $natRuleOnlyVMs -and !$AllVMsHavePublicIPs) {
484484

485-
$message = "[Test-SupportedMigrationScenario] The following VMs are associated with Inbound NAT Rules but not in the backend pool of the Basic Load Balancer: '$($natRuleOnlyVMs.Id -join ', ')' and not all VMs have Public IP addresses. All NAT Rule associated VMs must have public IPs associated or be in the backend pool of the Basic Load Balancer to have outbound network connectivity post-migration. Either add Public IPs to all VMs or re-run with the -Force parameter and configure outbound connectivity post-migration."
485+
$message = "[Test-SupportedMigrationScenario] The following VMs are associated with Inbound NAT Rules but not in the backend pool of the Basic Load Balancer: '$($natRuleOnlyVMs.Id -join ', ')' and not all VMs have Public IP addresses. All NAT Rule associated VMs must have public IPs associated or be in the backend pool of the Basic Load Balancer to have outbound network connectivity post-migration. `n`nEither add Public IPs to all VMs or re-run with the -Force parameter and configure outbound connectivity post-migration."
486486
log -Message $message -Severity 'Error' -terminateOnError:$(!$force)
487487

488488
if ($force) {

0 commit comments

Comments
 (0)