Skip to content

Commit 7c486df

Browse files
author
Manika Dhiman
committed
Updated network validator section
1 parent f4c95c3 commit 7c486df

File tree

2 files changed

+52
-31
lines changed

2 files changed

+52
-31
lines changed
279 KB
Loading

azure-local/manage/use-environment-checker.md

Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: alkohli
55
ms.author: alkohli
66
ms.topic: how-to
77
ms.service: azure-stack-hci
8-
ms.date: 10/29/2024
8+
ms.date: 12/26/2024
99
---
1010

1111
# Evaluate the deployment readiness of your environment for Azure Local, version 23H2
@@ -406,46 +406,67 @@ To remediate the blocking issues in this output, open the Active Directory tool
406406

407407
### [Network](#tab/network)
408408

409-
It is possible that the IP addresses allocated to Azure Local may already be active on the network. The network validator validates your network infrastructure for valid IP ranges reserved for deployment. It attempts to ping and connect to WinRM and SSH ports to ensure there's no active host using the IP address from the reserved IP range.
409+
The IP addresses allocated to Azure Local might already be in use on the network. The network validator checks your network infrastructure to ensure the IP ranges reserved for deployment are valid. It attempts to ping and connect to WinRM and SSH ports to ensure there's no active host using the IP address from the reserved IP range. It also checks storage connection, adapter driver readiness, and other host network configuration readiness.
410410

411-
You provide the network IP range reserved for Azure Local deployment as part of the answer file JSON, which you can use during network validation. Or, you can manually provide the starting and ending IP addresses when running the validator cmdlet.
411+
You provide the network IP range reserved for Azure Local deployment as part of the answer file JSON, which you can use during network validation. Or, you can manually provide the individual parameters when running the validator cmdlet.
412412

413-
### Run the network validator
414-
415-
To run the network validator locally on the Azure Local machine node, the workstation, or the staging server with the answer file, follow these steps.
416-
417-
1. Run one of the following cmdlets:
418-
419-
420-
- If using the answer file:
421-
422-
```powershell
423-
Invoke-AzStackHciNetworkValidation -AnswerFile <Answerfilename>.json
424-
```
425-
426-
- If entering the starting and ending IP addresses manually:
427-
428-
```powershell
429-
Invoke-AzStackHciNetworkValidation -StartingAddress <StartingIPRangeAddress> -EndingAddress <EndingIPRangeAddress>
430-
```
431-
432-
### Network validator output
413+
> [!NOTE]
414+
> You must run the network validator on the final hardware that you want to use for the Azure local instance deployment.
433415
434-
The following samples are the output from successful and unsuccessful runs of the network validator.
416+
### Run the network validator
435417

436-
To learn more about different sections in the readiness check report, see [Understand readiness check report](#understand-readiness-check-report).
418+
To run the network validator locally on the Azure Local node with the answer file, use the following commands:
437419

438-
**Sample output: Successful test**
420+
```powershell
421+
$allServers = "<ARRAY OF SERVERS' IP>" # you need to use IP for the connection
422+
$userName = "<LOCALADMIN>"
423+
$secPassWord = ConvertTo-SecureString "<LOCALADMINPASSWORD>" -AsPlainText -Force
424+
$hostCred = New-Object System.Management.Automation.PSCredential($userName, $secPassWord)
425+
[System.Management.Automation.Runspaces.PSSession[]] $allServerSessions = @()
426+
foreach ($currentServer in $allServers) {
427+
$currentSession = Microsoft.PowerShell.Core\New-PSSession -ComputerName $currentServer -Credential $hostCred -ErrorAction Stop
428+
$allServerSessions += $currentSession
429+
}
430+
$answerFilePath = "<ANSWERFILELOCATION>" # Like C:\MASLogs\Unattended-2024-07-18-20-44-48.json
431+
Invoke-AzStackHciNetworkValidation -DeployAnswerFile $answerFilePath -PSSession $allServerSessions -ProxyEnabled $false
432+
```
439433

440-
The following sample is the output from a successful run of the network validator. The output indicates no active host is using an IP address from the reserved IP range.
434+
To run the network validator locally on the Azure Local node using individual parameters, use the following commands:
441435

442-
:::image type="content" source="./media/use-environment-checker/network-validator-sample-passed.png" alt-text="Screenshot of a passed report after running the network validator." lightbox="./media/use-environment-checker/network-validator-sample-passed.png":::
436+
```powershell
437+
$answerFilePath = "<ANSWERFILELOCATION>"
438+
$managementSubnetCIDR = "<CIDR string for management subnet>"
439+
$logOutputPath = "<LOGFILELOCATION>"
440+
$userName = "<LOCALADMIN>"
441+
$secPassWord = ConvertTo-SecureString "<LOCALADMINPASSWORD>" -AsPlainText -Force
442+
$sessionCredential = New-Object System.Management.Automation.PSCredential($userName, $secPassWord)
443+
$answerFileContent = Get-Content $answerFilePath -Raw | ConvertFrom-Json
444+
$ipPools = New-Object System.Collections.ArrayList
445+
[System.Management.Automation.Runspaces.PSSession[]] $allServerSessions = @()
446+
foreach ($ipPool in $answerFileContent.scaleUnits[0].deploymentData.infrastructureNetwork[0].ipPools) {
447+
$currentPoolObject = [PSCustomObject] @{
448+
StartingAddress = $ipPool.StartingAddress
449+
EndingAddress = $ipPool.EndingAddress
450+
}
451+
$ipPools.Add($currentPoolObject)
452+
}
453+
[PSObject[]] $atcHostIntentsInfo = $answerFileContent.scaleUnits[0].deploymentData.hostNetwork.intents
454+
[System.String[]] $allServers = $answerFileContent.scaleUnits[0].deploymentData.physicalNodes.Name
455+
[System.Management.Automation.Runspaces.PSSession[]] $allServerSessions = @()
456+
foreach ($currentServer in $allServers) {
457+
$currentSession = Microsoft.PowerShell.Core\New-PSSession -ComputerName $currentServer -Credential $sessionCredential -ErrorAction Stop
458+
$allServerSessions += $currentSession
459+
}
460+
Invoke-AzStackHciNetworkValidation -IpPools $ipPools -ManagementSubnetValue $managementSubnetCIDR -PSSession $allServerSessions -SessionCredential $sessionCredential -OutputPath $logOutputPath -AtcHostIntents $atcHostIntentsInfo
461+
```
462+
463+
### Network validator sample output
443464

444-
**Sample output: Failed test**
465+
Here's a sample output of an unsuccessful run of the network validator. The failure occurs because the network adapter has two IP addresses, when it should have only one.
445466

446-
The following sample is the output from a failed run of the network validator. This output shows two active hosts are using IP address from the reserved IP range.
467+
:::image type="content" source="./media/use-environment-checker/network-validator-sample-failed.png" alt-text="Screenshot of a failed report after running the network validator." lightbox="./media/use-environment-checker/network-validator-sample-failed.png":::
447468

448-
:::image type="content" source="./media/use-environment-checker/network-validator-sample-failed.png" alt-text="Screenshot of a failed report after running the network validator." lightbox="./media/use-environment-checker/network-validator-sample-failed.png":::
469+
To learn more about different sections in the readiness check report, see [Understand readiness check report](#understand-readiness-check-report).
449470

450471
### [Arc integration](#tab/arc-integration)
451472

0 commit comments

Comments
 (0)