Active Directory Authentication - ARM Template Deployment
DOCUMENT CATEGORY: Runbook
SCOPE: ARM template-based cluster deployment with Active Directory
PURPOSE: Automated and repeatable deployment via infrastructure-as-code
MASTER REFERENCE: Microsoft Learn - Deploy via ARM Template
Status: Active
Overview
This guide walks through deploying an Azure Local cluster with Active Directory authentication using ARM templates. It is structured as a sequential runbook — complete each task in order from start to finish.
AD authentication requires:
- A pre-existing Active Directory domain accessible from the cluster nodes
- An organizational unit (OU) for Azure Local computer objects
- A deployment service account with the delegated OU permissions that Microsoft Learn lists (list contents, read all properties, read permissions, create and delete computer objects; see AD-Specific Parameters)
Per Microsoft Learn 2610, for Azure Local 2503 and later you select the quickstart template azurestackhci/create-cluster. The ARM template reference below follows the parameter table that Learn publishes for that template. Learn does not state an API version or a total parameter count, so this runbook does not quote either: treat the exact apiVersion and parameter count as lab-verified only and diff your parameter file against the current azuredeploy.parameters.json in the quickstart template before each deployment. Azure Local Cloud provides parameter template files and a generation script that populate the parameter file from infrastructure.yml. See the Reference section at the bottom for the parameter reference.
Learn also states that all parameters in the JSON file must be filled out, including array placeholders such as [""], or validation fails. ARM template deployment is intended for deployments at scale: Learn recommends deploying one system through the Azure portal first.
Before You Begin
Prerequisites
| Requirement | Description | Validation |
|---|---|---|
| Azure CLI or PowerShell | Az module installed | Get-Module -Name Az |
| Subscription access | User Access Administrator and Contributor on the subscription | Verify in IAM |
| Resource group roles | On the Arc resource group: Azure Stack HCI Administrator, Reader, Key Vault Data Access Administrator, Key Vault Secrets Officer, Key Vault Contributor, Storage Account Contributor, plus Azure Connected Machine Onboarding and Azure Connected Machine Resource Administrator | Verify in IAM |
| Resource group | Created for cluster deployment | Get-AzResourceGroup |
| Platform Key Vault | Stores deployment credentials (local admin, LCM passwords) | Secrets populated in prior phases |
| Arc-registered nodes | All nodes registered in Azure Arc | Verify in Azure Portal |
| Identical local credentials | Same admin password on all nodes | Verify login via WinRM |
| Active Directory | Domain reachable from all nodes | Test-ComputerSecureChannel |
| OU for Azure Local | Dedicated OU in AD | Get-ADOrganizationalUnit |
| LCM service account | Domain account (deployment user) with the delegated OU rights from Learn: list contents, read all properties, read permissions, create and delete computer objects (New-HciAdObjectsPreCreation assigns these) | Verify delegation |
What You Need Ready
Before starting the deployment procedure, confirm each item:
infrastructure.ymlcomplete for this design — the master file (schema 5) withscenario.identity: active_directory,cluster.*,nodes[],networking.management,networking.intents[],identity.local_adminandidentity.active_directory.*. The optionaldeploymentblock holds the run settings of the toolkit script. Check the file with./scripts/common/infrastructure/Test-InfrastructureFile.ps1 -Path ./infrastructure.yml- Authenticated to Azure — run
Connect-AzAccount(PowerShell) oraz login(CLI) on the machine where you will execute commands - PowerShell modules installed — the toolkit scripts need PowerShell 7 with
powershell-yaml,Az.AccountsandAz.KeyVault - Arc machines registered — Phase 04 complete. The toolkit takes the Arc machine resource IDs from the ZTP handoff (
-HandoffFile). Without a handoff it usesnodes[].arc_machine_name(default:nodes[].name) inazure.resource_group - Secrets stored — the secrets that
identity.local_admin.passwordandidentity.active_directory.lcm_user.passwordreference (keyvault://<vault>/<secret>) exist in the platform Key Vault (from prior phases) - AD infrastructure ready — domain reachable, OU created, LCM service account has the delegated OU permissions (created by
New-HciAdObjectsPreCreation) - Domain membership decided — the nodes are either in a workgroup (default; the deployment joins them to the domain) or, with Azure Local 2604 or later, already domain joined with the deployment user in the local Administrators group. See Optional: domain join before deployment
All commands in this runbook run on a management or jump box that is signed in to Azure, with a clone of azurelocal-toolkit. Every toolkit script takes the master file as -InfrastructureFile (mandatory). There is no default path.
Two Key Vaults are involved in Azure Local deployment:
- Platform Key Vault — Already exists from prior phases. Stores deployment credentials (local admin password, LCM domain service account password). Referenced in the parameter file via Key Vault references. No action needed here.
- Cluster Key Vault — Created by the ARM template deployment (
keyVaultName,softDeleteRetentionDays,diagnosticStorageAccountName,logsRetentionInDaysare defined ininfrastructure.yml). Azure Local does not support deploying with an existing Key Vault that has Private Endpoints enabled.
Per Microsoft Learn, starting with software version 12.2512 new deployments do not create a Microsoft Entra ID application (service principal) for the cluster; the cluster uses a system-assigned managed identity. Do not create an ARB service principal or client secret for this template (the arbDeploymentAppID family of parameters applies only to Azure Local 2411.3 and earlier).
Variables from infrastructure.yml
| Path | Type | Description |
|---|---|---|
cluster.name | string | Cluster name |
azure.resource_group | string | Cluster resource group |
nodes[].network_adapters[].ip_address | string | Node IP addresses |
nodes[].arc_machine_name | string | Arc resource IDs |
identity.active_directory.ou_path | string | AD OU distinguished name |
identity.active_directory.lcm_user.username | string | LCM admin username |
azure.hci_resource_provider_object_id | string | HCI RP Object ID |
key_vaults[] | object | Key Vault references |
networking | object | Network intents and IP allocation |
Deployment Procedure
Task 1: Verify Active Directory Prerequisites
Confirm that each cluster node can reach the domain, the OU exists, and the LCM service account has the required delegation.
- Manual Commands
- Orchestrated Script
When to use: You want to verify each check individually using standard AD PowerShell commands.
# Replace placeholders with values from your infrastructure.yml
$nodeIPs = @("<NODE_IP_1>", "<NODE_IP_2>") # nodes[].network_adapters[].ip_address
$ouPath = "<DOMAIN_OU_PATH>" # identity.active_directory.ou_path
$lcmUser = "<LCM_USERNAME>" # identity.active_directory.lcm_user.username
# Expected: True for every node
Invoke-Command -ComputerName $nodeIPs -ScriptBlock {
[pscustomobject]@{
Node = $env:COMPUTERNAME
SecureChannel = (Test-ComputerSecureChannel)
}
}
Expected output — every node returns SecureChannel = True:
Node SecureChannel
---- -------------
iic-01-n01 True
iic-01-n02 True
# Expected: Returns the OU object without error
Get-ADOrganizationalUnit -Identity $ouPath | Format-List Name, DistinguishedName
# Microsoft Learn (custom AD configuration): deployment user over the OU and descendants =
# list contents, read all properties, read permissions, create computer objects, delete computer objects.
# Full control applies only to descendant msFVE-RecoveryInformation objects.
$acl = Get-Acl "AD:\$ouPath"
$aces = @($acl.Access | Where-Object { $_.IdentityReference -like "*$lcmUser*" })
$rights = ($aces.ActiveDirectoryRights | ForEach-Object { $_.ToString() }) -join ', '
$required = 'ListChildren', 'ReadProperty', 'ReadControl', 'CreateChild', 'DeleteChild'
$missing = $required | Where-Object { $rights -notmatch $_ }
if ($aces.Count -gt 0 -and -not $missing) {
Write-Host "PASS: $lcmUser has the delegated rights on $ouPath" -ForegroundColor Green
$aces | Format-Table IdentityReference, ActiveDirectoryRights, InheritanceType
} else {
Write-Host "FAIL: $lcmUser is missing: $($missing -join ', ') on $ouPath" -ForegroundColor Red
Write-Host "Re-run New-HciAdObjectsPreCreation or follow the Microsoft Learn custom Active Directory configuration article." -ForegroundColor Yellow
}
PowerShell
When to use: Check Active Directory from the management host before you deploy.
Invoke-VerifyADPrerequisites-Orchestrated.ps1in the task folder is a thin wrapper: it keeps the file name of this page and runs the pre-cluster verification (Verify mode,identitycategory), read only.
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/active-directory/task-01-initiate-deployment-via-arm-template/powershell/Invoke-VerifyADPrerequisites-Orchestrated.ps1 | The wrapper. It runs Invoke-AzureLocalPreClusterVerification.ps1 with -Mode Verify -Category identity. It takes -InfrastructureFile (required), -ReportDirectory and -SettingsFile. -WhatIf prints the command line and runs nothing. Exit 0: passed (a partial run with no blocking result counts as 0). Exit 1: a check failed. Exit 2: bad input, including a missing file. |
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/Invoke-AzureLocalPreClusterVerification.ps1 | The pre-cluster verification that does the work. Read only. Its identity category checks the OU, the LCM user and its rights (for example ID-AD-003, ID-AD-004, ID-AD-007, ID-AD-010). |
Run
./Invoke-VerifyADPrerequisites-Orchestrated.ps1 -InfrastructureFile ./infrastructure.yml
# The script it runs, called directly
./Invoke-AzureLocalPreClusterVerification.ps1 -InfrastructureFile ./infrastructure.yml -Mode Verify -Category identity
If domain connectivity, OU existence, or LCM delegation checks fail, fix the AD configuration before continuing. Deployment will fail if these prerequisites are not met.
Task 2: Get HCI Resource Provider Object ID
The hciResourceProviderObjectID parameter requires the tenant-specific Object ID of the Microsoft.AzureStackHCI resource provider service principal. This GUID is unique per Entra ID tenant and must be looked up once, then stored in infrastructure.yml at azure.hci_resource_provider_object_id.
- Manual Commands
- Orchestrated Script
When to use: Quick one-time lookup.
(Get-AzADServicePrincipal -ApplicationId "1412d89f-b8a8-4111-b4fd-e82905cbd85d").Id
az ad sp list --filter "appId eq '1412d89f-b8a8-4111-b4fd-e82905cbd85d'" --query "[0].id" -o tsv
The application ID 1412d89f-b8a8-4111-b4fd-e82905cbd85d is the Azure Local resource provider application ID published on Microsoft Learn; looking it up by application ID is the documented method.
Expected output: A single GUID, e.g. 00000000-0000-0000-0000-000000000000
Next: Open infrastructure.yml, find azure.hci_resource_provider_object_id, and paste the GUID as the value.
PowerShell
No separate script. The earlier
Get-HciResourceProviderObjectId.ps1is removed. Setazure.hci_resource_provider_object_idwith the lookup in the other tab, or leave it empty:Invoke-AzureLocalArmDeployment.ps1then looks the object ID up in the directory when it runs (it needs permission to read the Azure Local resource provider's service principal).New-AzureLocalArmParameters.ps1also takes it as-HciResourceProviderObjectId.
Task 3: Generate Parameter File
Create the deployment-ready JSON parameter file for the create-cluster template. This step produces the file used by Tasks 4 and 5.
- Manual Commands
- Orchestrated Script
When to use: You want to build the parameter file by hand, to learn the template's parameters.
The toolkit keeps no parameter file to fill in by hand: the earlier files with {{VARIABLE}} placeholders are gone. The orchestrated tab writes the file from infrastructure.yml. To build it by hand:
- Start from Microsoft's sample azuredeploy.parameters.json for the
create-clustertemplate, or from the toolkit's generated exampleconfig/azure/arm-templates/examples/active-directory-s2d-switched.parameters.json(example values only) - Replace each value with the value of its key in your
infrastructure.yml
Parameters to set (most common errors come from these; config/azure/arm-templates/parameter-sources.json in the toolkit lists every parameter and its keys):
| ARM parameter | Key in infrastructure.yml |
|---|---|
clusterName | cluster.name |
location | azure.location |
tenantId | azure.tenant_id |
keyVaultName, softDeleteRetentionDays | cluster.key_vault.name, cluster.key_vault.soft_delete_retention_days (the cluster Key Vault, created by ARM) |
diagnosticStorageAccountName | cluster.diagnostics.storage_account |
witnessType, clusterWitnessStorageAccountName | cluster.witness.type, cluster.witness.storage_account |
localAdminUserName | identity.local_admin.username |
hciResourceProviderObjectID | azure.hci_resource_provider_object_id (from Task 2) |
arcNodeResourceIds | azure.subscription_id, azure.resource_group, nodes[].arc_machine_name |
namingPrefix | cluster.naming_prefix |
physicalNodesSettings | nodes[].name, nodes[].management.ip_address |
startingIPAddress, endingIPAddress, defaultGateway, dnsServers | networking.management.infrastructure_pool.start, .end, networking.management.gateway, networking.management.dns_servers |
intentList | networking.intents[] (name, traffic, adapters) |
domainFqdn | identity.active_directory.domain_fqdn |
adouPath | identity.active_directory.ou_path (OU distinguished name) |
For localAdminPassword and AzureStackLCMAdminPassword, use Key Vault references (not plain text):
"localAdminPassword": {
"reference": {
"keyVault": {
"id": "/subscriptions/<SUB_ID>/resourceGroups/<RG>/providers/Microsoft.KeyVault/vaults/<PLATFORM_KV_NAME>"
},
"secretName": "local-admin-password"
}
}
- Verify that no sample value is left: every value is a key of your file, a Key Vault reference, or the template default
- Save as
azuredeploy.parameters.ad.jsonin your working directory
The toolkit's examples in config/azure/arm-templates/examples/ are generated by config/variables/scripts/New-ArmParameterExample.ps1 from the example infrastructure files, with the deployment's own code; do not edit them. Compare your file against the matching design: see the Example Parameter Files collapsible in the Reference section below.
PowerShell
When to use: Write the full ARM parameter file for Microsoft's quickstart template from
infrastructure.yml. Deploy-time secrets stay Key Vault references; the file holds no password.
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/New-AzureLocalArmParameters.ps1 | Writes the full ARM parameter file for Microsoft's Azure Local quickstart template from infrastructure.yml (schema 5). |
Requires: PowerShell 7.
Run
./New-AzureLocalArmParameters.ps1 -InfrastructureFile ./infrastructure.yml -HandoffFile ./ztp-handoff.json -NodeReportPath ./osconfig-report.json
Task 4: Validate Deployment
Run the ARM template in Validate mode first. Validation executes the full deployment pipeline — environment checks, connectivity tests, credential validation — but stops before provisioning. Fix all errors before proceeding to Deploy.
- Manual Commands
- Orchestrated Script
- Azure CLI
When to use: You built the parameter file manually in Task 3 and want to run validation directly.
# Values from infrastructure.yml
$subscriptionId = "<SUB_ID>" # azure.subscription_id
$resourceGroup = "<RESOURCE_GROUP>" # azure.resource_group
$parametersFile = ".\azuredeploy.parameters.ad.json" # File from Task 3
$templateUri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.azurestackhci/create-cluster/azuredeploy.json"
# Set subscription context
Set-AzContext -SubscriptionId $subscriptionId
# Check current mode in the parameters file
$json = Get-Content $parametersFile | ConvertFrom-Json
$currentMode = $json.parameters.deploymentMode.value
Write-Host "Current deploymentMode: $currentMode"
# If not "Validate", update it:
if ($currentMode -ne "Validate") {
$json.parameters.deploymentMode.value = "Validate"
$json | ConvertTo-Json -Depth 20 | Set-Content $parametersFile
Write-Host "Updated deploymentMode to Validate" -ForegroundColor Yellow
}
$validateResult = New-AzResourceGroupDeployment `
-Name "azl-validate-$(Get-Date -Format 'yyyyMMddHHmmss')" `
-ResourceGroupName $resourceGroup `
-TemplateUri $templateUri `
-TemplateParameterFile $parametersFile `
-Verbose
$validateResult | Select-Object DeploymentName, ProvisioningState, Timestamp
Expected output for a successful validation:
DeploymentName ProvisioningState Timestamp
-------------- ----------------- ---------
azl-validate-20260309142055 Succeeded 3/9/2026 2:45:30 PM
If validation fails, check the error output against the Troubleshooting table.
PowerShell
When to use: Check the preconditions, then submit the ARM template in Validate mode.
-Mode Plan(the default) changes nothing.
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/Invoke-AzureLocalArmDeployment.ps1 | Checks the preconditions (read only), generates the ARM parameters from infrastructure.yml (schema 5), runs Validate, then Deploy, and writes a report. See ARM Validate and Deploy automation. |
Requires PowerShell 7 and an Azure sign-in. The script does not sign in.
# Plan: checks the preconditions and writes the parameter file. Nothing is submitted.
./Invoke-AzureLocalArmDeployment.ps1 -InfrastructureFile ./infrastructure.yml -OsConfigurationReport ./osconfig-report -HandoffFile ./ztp-handoff.json -Mode Plan -ReportDirectory ./arm-plan
# Validate: submits deploymentMode Validate and waits, about 10 to 30 minutes.
./Invoke-AzureLocalArmDeployment.ps1 -InfrastructureFile ./infrastructure.yml -OsConfigurationReport ./osconfig-report -HandoffFile ./ztp-handoff.json -Mode Validate -ReportDirectory ./arm-validate
./osconfig-report is the report folder of the OS configuration Apply run (Invoke-AzureLocalOsConfiguration.ps1 -Mode Apply -ReportDirectory ./osconfig-report): a report whose mode is Apply, whose run ended with exit code 0 and in which every node says converged. The report of a Plan run does not count. ./ztp-handoff.json is the handoff of the ZTP run (omit it when the machines were installed from an ISO). The same report gives the OS names of the ports (found by MAC); without it they come from the networkAdapters of the handoff.
Add -WhatIf to do everything except submit. Validate and Deploy go ahead only after the pre-cluster verification passed for the same file. A Validate that already passed with the same parameters is not submitted again. The script refuses a second Validate when the instance is in a failed deployment state, because Microsoft says a second Validate resets the system properties.
Azure CLI
When to use: Check the preconditions, then submit the ARM template in Validate mode, from a host that has the Azure CLI and not the Az PowerShell modules. The script calls
az deployment group validateandaz deployment group create.
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/active-directory/task-01-initiate-deployment-via-arm-template/azurecli/Invoke-AzureLocalArmDeployment.azcli.ps1 | Starts the ARM template deployment of an Azure Local instance with Active Directory identity, with the Azure CLI: validate, then deploy. It stops with exit code 2 before anything goes to Azure when scenario.identity is not active_directory. Supports -WhatIf. |
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/Invoke-AzureLocalArmDeployment.azcli.ps1 | The script that does the work; the task script calls it. It reuses the toolkit's ARM deployment code for the template, the parameters and the checks, and uses az only for the Azure calls. |
Requires: PowerShell 7 and the Azure CLI, signed in with az login --tenant <azure.tenant_id>. The script does not change the Azure CLI default subscription.
The default -Mode is Validate. -WhatIf checks the preconditions, builds the parameters, runs the pre-flight az deployment group validate and submits nothing. A Validate is refused when the instance is in a failed deployment state, unless you pass -AllowRevalidate (support-guided recovery only).
The local administrator password and the LCM user password go to Azure as Key Vault references in the parameter file: no secret value is read, written or put on a command line by this script. A secret that is not a keyvault:// reference (env://, file://, command://) cannot be handed to Azure this way, so the script stops with exit code 2 and names the PowerShell script, which reads it on the machine that runs it. The template is Microsoft's, read by Azure from its address (-TemplateFile uses a local copy); the run setting deploymentSettingsApiVersion is not applied here.
Run
./Invoke-AzureLocalArmDeployment.azcli.ps1 -InfrastructureFile ./infrastructure.yml -OsConfigurationReport ./osconfig-report -HandoffFile ./ztp-handoff.json -Mode Validate -WhatIf
./Invoke-AzureLocalArmDeployment.azcli.ps1 -InfrastructureFile ./infrastructure.yml -OsConfigurationReport ./osconfig-report -HandoffFile ./ztp-handoff.json -Mode Validate
While validation runs, watch it with Azure Local Sonar.
Validation runs the full deployment pipeline but stops before provisioning. Never skip validation. Fix all errors before switching to Deploy mode.
Task 5: Deploy Cluster
After validation passes, switch to Deploy mode and run the deployment. This provisions the cluster — the process takes 1.5–3 hours depending on node count.
- Manual Commands
- Orchestrated Script
- Azure CLI
When to use: You ran validation manually in Task 4 and want to continue with direct commands.
$parametersFile = ".\azuredeploy.parameters.ad.json"
$json = Get-Content $parametersFile | ConvertFrom-Json
$json.parameters.deploymentMode.value = "Deploy"
$json | ConvertTo-Json -Depth 20 | Set-Content $parametersFile
Write-Host "Updated deploymentMode to Deploy" -ForegroundColor Green
$templateUri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.azurestackhci/create-cluster/azuredeploy.json"
$resourceGroup = "<RESOURCE_GROUP>" # azure.resource_group
$deploymentName = "azl-deploy-$(Get-Date -Format 'yyyyMMddHHmmss')"
$deployment = New-AzResourceGroupDeployment `
-Name $deploymentName `
-ResourceGroupName $resourceGroup `
-TemplateUri $templateUri `
-TemplateParameterFile $parametersFile `
-Verbose
$deployment | Select-Object DeploymentName, ProvisioningState, Timestamp
The New-AzResourceGroupDeployment command blocks until deployment completes (1.5–3 hours). Do not close the terminal. Use the monitoring script in a separate terminal to track progress.
PowerShell
When to use: The real deployment. It is a separate, explicit run and it needs a Validate that succeeded.
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/Invoke-AzureLocalArmDeployment.ps1 | Checks the preconditions again, checks that these parameters were validated, then submits the Deploy and writes a report. |
./Invoke-AzureLocalArmDeployment.ps1 -InfrastructureFile ./infrastructure.yml -OsConfigurationReport ./osconfig-report -HandoffFile ./ztp-handoff.json -Mode Deploy -ReportDirectory ./arm-deploy
The deployment takes about 2.5 to 3 hours. A running deployment is attached to. A failed one is submitted again only with -Resume. To run Validate and Deploy in one run, use -Mode ValidateAndDeploy with -ApprovalMode stop (the default: the run ends after a good Validate; run -Mode Deploy after the approval) or -ApprovalMode none (it continues at once). The same setting is deployment.approval in the file. Nothing asks on the console.
The secrets (the local administrator and the LCM user, as keyvault:// references) are read from Key Vault into memory and sent as secure parameters. They are never written to the parameter file or to the report. To watch the steps while it runs, use Azure Local Sonar.
Azure CLI
When to use: The real deployment, from a host that has the Azure CLI and not the Az PowerShell modules. It is a separate, explicit run and it needs a Validate that succeeded.
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/active-directory/task-01-initiate-deployment-via-arm-template/azurecli/Invoke-AzureLocalArmDeployment.azcli.ps1 | Starts the ARM template deployment of an Azure Local instance with Active Directory identity, with the Azure CLI: validate, then deploy. It stops with exit code 2 before anything goes to Azure when scenario.identity is not active_directory. Supports -WhatIf. |
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/Invoke-AzureLocalArmDeployment.azcli.ps1 | The script that does the work; the task script calls it. It reuses the toolkit's ARM deployment code for the template, the parameters and the checks, and uses az only for the Azure calls. |
Requires: PowerShell 7 and the Azure CLI, signed in with az login --tenant <azure.tenant_id>. The script does not change the Azure CLI default subscription.
A Deploy is refused unless the instance validated successfully. The script waits for the outcome up to the timeout of the run settings (validateTimeoutMinutes 90, deployTimeoutMinutes 360; -TimeoutMinutes overrides it). -NoWait submits and returns: run the script again to attach to the running deployment. A deployment of the same name that succeeded is not submitted again, and a failed Deploy is resubmitted only with -Resume. The secrets are Key Vault references only, as for Validate.
Run
./Invoke-AzureLocalArmDeployment.azcli.ps1 -InfrastructureFile ./infrastructure.yml -OsConfigurationReport ./osconfig-report -HandoffFile ./ztp-handoff.json -Mode Deploy -WhatIf
./Invoke-AzureLocalArmDeployment.azcli.ps1 -InfrastructureFile ./infrastructure.yml -OsConfigurationReport ./osconfig-report -HandoffFile ./ztp-handoff.json -Mode Deploy
After deployment starts, watch it with Azure Local Sonar.
Expected Duration:
| Node Count | Approximate Time |
|---|---|
| 1-node | ~1.5 hours |
| 2-node | ~2.5 hours |
| 4-node | ~3 hours |
Task 6: Verify Deployment
After deployment completes successfully, verify the cluster is healthy, all nodes are online, storage is operational, and domain join is correct.
- Manual Commands
- Orchestrated Script
- Azure CLI
When to use: Verify the deployment step-by-step using standard commands.
$resourceGroup = "<RESOURCE_GROUP>" # azure.resource_group
Get-AzResource -ResourceGroupName $resourceGroup `
-ResourceType "Microsoft.AzureStackHCI/clusters" |
Format-Table Name, Location, ProvisioningState
Expected: Cluster shows ProvisioningState = Succeeded
$nodeIP = "<NODE_IP>" # nodes[].network_adapters[].ip_address
$cred = Get-Credential -Message "Enter local admin credentials"
Invoke-Command -ComputerName $nodeIP -Credential $cred -ScriptBlock {
Write-Host "=== Cluster Status ===" -ForegroundColor Cyan
Get-Cluster | Format-List Name, SharedVolumesRoot
Write-Host "`n=== Node Status ===" -ForegroundColor Cyan
Get-ClusterNode | Format-Table Name, State, StatusInformation
# Expected: All nodes State = Up
Write-Host "`n=== Storage Pool ===" -ForegroundColor Cyan
Get-StoragePool | Where-Object IsPrimordial -eq $false |
Format-Table FriendlyName, HealthStatus, OperationalStatus
# Expected: HealthStatus = Healthy
Write-Host "`n=== Domain Status ===" -ForegroundColor Cyan
Get-ClusterNode | ForEach-Object {
[pscustomobject]@{
Node = $_.Name
Domain = (Get-WmiObject -ComputerName $_.Name Win32_ComputerSystem).Domain
Secure = (Test-ComputerSecureChannel -Server $_.Name -ErrorAction SilentlyContinue)
}
} | Format-Table
# Expected: All nodes joined to correct domain, SecureChannel = True
}
PowerShell
When to use: Verify the domain join and the cluster health on all nodes after the deployment.
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-06-post-deployment/task-09-post-deployment-verification/powershell/Invoke-VerifyPostDeployment.ps1 | Verifies the deployed instance against infrastructure.yml. Read only. It checks, in order: every node is a cluster node and Up; the identity (with Active Directory every node is joined to identity.active_directory.domain_fqdn and its secure channel works; with local identity every node is in a workgroup); the quorum; the security groups; SSH; storage; the VM images and the logical networks in Azure. Supports -WhatIf. |
The earlier verification scripts of this task folder (Test-ClusterHealth.ps1, Invoke-VerifyClusterHealth-Orchestrated.ps1 and the -Standalone copies) are removed. The powershell folder of this task holds only a .gitkeep file: the script above does the work. For the whole Phase 06 verification in one run, Invoke-PostDeploymentVerification-Orchestrated.ps1 of Task 09 runs it, runs the Azure CLI script of that task and adds the solution health summary and, with an external SAN, the SAN disk checks. See Task 09: Post-deployment verification.
The login is -Credential, else the account the file names: the LCM user (identity.active_directory.lcm_user) with Active Directory, the local administrator (identity.local_admin) with local identity. The password is a secret reference. The script never prompts: with neither it stops with exit code 2.
Run
./Invoke-VerifyPostDeployment.ps1 -InfrastructureFile ./infrastructure.yml -WhatIf
./Invoke-VerifyPostDeployment.ps1 -InfrastructureFile ./infrastructure.yml
./Invoke-VerifyPostDeployment.ps1 -InfrastructureFile ./infrastructure.yml -TargetNode iic-azl-n01
Azure CLI
When to use: Verify in Azure that the deployment completed, from a host that has the Azure CLI and not the Az PowerShell modules. The scripts are read only.
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/active-directory/task-02-verify-deployment-completion/azurecli/Test-ClusterDeployment.azcli.ps1 | Verifies in Azure that the deployment of an Azure Local instance with Active Directory identity completed, with the Azure CLI. Read only. It stops with exit code 2 before anything goes to Azure when scenario.identity is not active_directory. Supports -WhatIf (lists the checks and runs none). |
scripts/deploy/04-cluster-deployment/phase-05-cluster-deployment/Test-AzureLocalClusterDeployment.azcli.ps1 | The script that does the work; the task script calls it. |
Requires: PowerShell 7 and the Azure CLI, signed in with az login --tenant <azure.tenant_id>. Needs the Azure CLI extensions stack-hci, connectedmachine (az extension add --name stack-hci, az extension add --name connectedmachine); the script does not install them.
It checks that the Azure Local instance cluster.name is Succeeded, that its deployment status (deploymentSettings/default) is Success (a failed or unfinished deployment lists the steps that failed), and that every machine of nodes[] has an Arc machine with the status Connected. It does not reach the nodes or Active Directory: the checks of the nodes and of the domain run on premises, in Invoke-VerifyPostDeployment.ps1 (Task 09).
Run
./Test-ClusterDeployment.azcli.ps1 -InfrastructureFile ./infrastructure.yml -WhatIf
./Test-ClusterDeployment.azcli.ps1 -InfrastructureFile ./infrastructure.yml
Healthy cluster indicators:
| Check | Expected Result |
|---|---|
| Azure resource state | ProvisioningState = Succeeded |
| All cluster nodes | State = Up |
| Storage pool | HealthStatus = Healthy |
| Domain membership | All nodes joined to correct domain |
| Secure channel | True for every node |
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
| Key Vault access denied | Missing RBAC on platform KV | Grant Key Vault Secrets User to deployment identity on the platform Key Vault |
| Domain join fails | LCM account lacks OU permissions | Verify the delegated rights on the OU (create/delete computer objects, list, read) and that the deployment user is in the local Administrators group if the nodes were pre-joined |
| Credential mismatch | Different local passwords across nodes | Reset to identical password on all nodes |
adouPath format error | Incorrect DN syntax | Must be full DN: OU=...,DC=...,DC=... |
Validation fails on hciResourceProviderObjectID | Wrong Object ID | Re-run Get-AzADServicePrincipal (Task 2) |
networkingPattern error | Intent layout doesn't match pattern | Verify intent count and traffic types match pattern |
| Deployment timeout | Network or Azure service issue | Check node Azure endpoint connectivity |
| Arc extension failed | Node not reachable from Azure | Verify WinRM/HTTPS and Arc agent status |
deploymentMode stuck on Validate | Forgot to switch mode | Run Invoke-AzureLocalArmDeployment.ps1 -Mode Deploy, or set deploymentMode to Deploy in the JSON |
Parameter file has {{ placeholders | Incomplete placeholder replacement | Search file for {{ and replace all remaining |
Deployment Logs
# Azure-side deployment operations
Get-AzResourceGroupDeploymentOperation `
-ResourceGroupName $resourceGroup `
-DeploymentName $deploymentName |
Where-Object { $_.ProvisioningState -ne "Succeeded" } |
Select-Object OperationId, ProvisioningState, @{N="Error";E={$_.StatusMessage}} |
Format-List
# Node-side logs
Invoke-Command -ComputerName $nodeIP -Credential $cred -ScriptBlock {
Get-ChildItem "C:\CloudDeployment\Logs" -Recurse |
Sort-Object LastWriteTime -Descending |
Select-Object -First 10 FullName, LastWriteTime
}
Next Steps
| Deployment Status | Next Action |
|---|---|
| ✅ Validation passed | Switch to Deploy mode (Task 5) |
| ✅ Deployment succeeded | Run verification (Task 6), then proceed to Phase 06: Post-Deployment |
| ❌ Failed | Review Troubleshooting table and deployment logs |
Reference
The sections below provide detailed reference material for the ARM template parameters, networking patterns, and examples. Expand each section as needed.
ARM Template Parameters — Reference (create-cluster template)
This reference follows the parameter table that Microsoft Learn (2610) publishes for the create-cluster template, grouped for readability. Learn does not publish a total parameter count or API version, so none is quoted here (lab-verified only). Required parameters (no defaultValue in the template) are marked with ⚠️ and reflect Azure Local Cloud lab experience, not a Learn statement. createNewKeyVault is not listed in the Learn table; confirm it in the template before relying on it.
Key Vault & Diagnostics
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
keyVaultName | string | ⚠️ | Cluster deployment Key Vault name | kv-iic-deploy-01 |
createNewKeyVault | bool | Create KV or use existing | true | |
softDeleteRetentionDays | int | KV soft-delete retention (7–90) | 30 | |
diagnosticStorageAccountName | string | ⚠️ | Storage for KV audit logs | stiicdiag01 |
logsRetentionInDays | int | KV log retention days | 30 | |
storageAccountType | string | KV diagnostic storage SKU | Standard_LRS |
Cluster Identity
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
clusterName | string | ⚠️ | Azure Local cluster resource name | iic-clus01 |
location | string | Azure region | eastus | |
tenantId | string | Entra ID tenant GUID | a1b2c3d4-... | |
deploymentMode | string | Validate first, then Deploy | Validate |
Cluster Witness
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
witnessType | string | Cloud (recommended) | Cloud | |
clusterWitnessStorageAccountName | string | Cloud witness storage account | stiicwitness01 |
Credentials & Admin Accounts
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
localAdminUserName | string | ⚠️ | Local admin on all nodes | osfadmin |
localAdminPassword | securestring | ⚠️ | Key Vault reference for password | (KV ref) |
AzureStackLCMAdminUsername | string | ⚠️ | LCM admin — sAMAccountName only, no @domain (domain comes from domainFqdn) | svc-azlocal-lcm |
AzureStackLCMAdminPassword | securestring | ⚠️ | Key Vault reference for LCM pwd | (KV ref) |
hciResourceProviderObjectID | string | ⚠️ | Microsoft.AzureStackHCI RP Object ID | abcdef01-... |
Active Directory Authentication
| Parameter | Type | Required | Description | AD Value |
|---|---|---|---|---|
domainFqdn | string | AD domain FQDN | ad.azurelocal.cloud | |
adouPath | string | OU distinguished name | OU=AzureLocal,OU=Servers,DC=ad,DC=azurelocal,DC=cloud | |
namingPrefix | string | Resource naming prefix | iic-01 |
domainFqdnmust be the FQDN (not NetBIOS)adouPathmust be the full distinguished nameAzureStackLCMAdminUsernamemust be the sAMAccountName only (e.g.,svc-azlocal-lcm) — do NOT pass the full UPN with@domain. The domain is already provided viadomainFqdn. Azure Local'sInitialize-CloudDeployment.ps1rejects usernames containing@or\.- The LCM service account (deployment user) needs these rights over the OU and all descendant objects, per Microsoft Learn: list contents, read all properties, read permissions, create computer objects, delete computer objects. Full control is needed only on descendant
msFVE-RecoveryInformationobjects (set with PowerShell, not the delegation wizard). The cluster CNO needs read all properties and create computer objects.New-HciAdObjectsPreCreationassigns these; do not grantGenericAll. - The OU cannot be at the top level of the domain, for example
OU=Local001,DC=contoso,DC=com
Arc Integration
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
arcNodeResourceIds | array | Arc-registered node resource IDs | (array of resource ID strings) |
Security Settings
| Parameter | Type | Default | Description |
|---|---|---|---|
securityLevel | string | Recommended | Recommended or Customized |
driftControlEnforced | bool | true | Reapply security defaults regularly |
credentialGuardEnforced | bool | true | VBS credential protection |
smbSigningEnforced | bool | true | SMB traffic signing |
smbClusterEncryption | bool | false | SMB in-transit encryption |
bitlockerBootVolume | bool | true | Boot volume encryption |
bitlockerDataVolumes | bool | true | Data volume encryption |
wdacEnforced | bool | true | Windows Defender Application Control |
Telemetry & Observability
| Parameter | Type | Default | Description |
|---|---|---|---|
streamingDataClient | bool | true | Telemetry streaming to Microsoft |
euLocation | bool | false | EU data residency compliance |
episodicDataUpload | bool | true | Crash dumps and diagnostics |
Storage Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
configurationMode | string | Express | Express (one thinly provisioned volume and storage path per machine, plus the infrastructure volume), InfraOnly (infrastructure volume only; create workload volumes and storage paths later) or KeepStorage (preserve existing data drives that contain a Storage Spaces pool and volumes) |
Networking
| Parameter | Type | Description | Example |
|---|---|---|---|
subnetMask | string | Management subnet mask | 255.255.255.0 |
defaultGateway | string | Management gateway | 192.168.100.1 |
startingIPAddress | string | Cluster IP pool start | 192.168.100.30 |
endingIPAddress | string | Cluster IP pool end | 192.168.100.39 |
dnsServers | array | DNS servers | ["192.168.100.10"] |
useDhcp | bool | Use DHCP for management | false |
networkingType | string | Deployment topology | switchedMultiServerDeployment |
networkingPattern | string | Intent layout | convergedManagementCompute |
intentList | array | Network intent definitions | (see examples) |
storageNetworkList | array | Storage VLAN mappings | (see examples) |
storageConnectivitySwitchless | bool | Switchless storage | false |
enableStorageAutoIp | bool | Auto-IP for storage | true |
physicalNodesSettings | array | Node name + IP list | (see examples) |
SBE (Solution Builder Extension) parameters
Your hardware vendor's Solution Builder Extension package for your model and the Azure Local version you deploy is a requirement: download it before you start and make it available on a share the automation can read (hardware.sbe.source_path), or set hardware.sbe.requirement to not_applicable with a reason when your hardware has no SBE or the cluster downloads it itself. You need it to update the cluster, and the pre-cluster checks read it from the share. See the SBE package prerequisite.
What stays a choice is handing an SBE to this template. Leave all sbe* and partner* parameters empty ("" or []) unless you deploy with an SBE (hardware.sbe.version set). A deployment without them is a normal deployment: when the machines carry the SBE files in C:\SBE (a vendor golden image does), the deployment installs them; otherwise the first update shows AdditionalContentRequired until you import the package from the share. When you do pass one, take the version, family, publisher and manifest values from the vendor's SBE release, not from this page.
| Parameter | Type | Description | Default in this runbook |
|---|---|---|---|
sbeVersion | string | Version of the SBE used during deployment | "" (omitted) |
sbeFamily | string | Family or category of the SBE package | "" (omitted) |
sbePublisher | string | Publisher or vendor of the SBE | "" (omitted) |
sbeManifestSource | string | Source location of the SBE manifest | "" |
sbeManifestCreationDate | string | Creation date of the SBE manifest | "" |
partnerProperties | array | Partner key-value pairs | [] |
partnerCredentiallist | array | Partner credentials | [] |
Other
| Parameter | Type | Description | Example |
|---|---|---|---|
customLocation | string | Arc custom location resource ID | "" |
Network intent adapter property overrides
The intentList entries accept optional override blocks. Microsoft's Microsoft.AzureStackHCI/clusters/deploymentSettings reference describes the adapter overrides jumboPacket, networkDirect and networkDirectTechnology (expected technologies iWARP, RoCEv2, RoCE) and states for each: "This parameter should only be modified based on your OEM guidance. Do not modify this parameter without OEM validation." Leave the override flags false unless the hardware vendor tells you otherwise.
{
"name": "Storage",
"trafficType": ["Storage"],
"adapter": ["SMB1", "SMB2"],
"overrideVirtualSwitchConfiguration": false,
"virtualSwitchConfigurationOverrides": {},
"overrideQosPolicy": false,
"qosPolicyOverrides": {},
"overrideAdapterProperty": true,
"adapterPropertyOverrides": {
"jumboPacket": "9014",
"networkDirect": "Enabled",
"networkDirectTechnology": "RoCEv2"
}
}
The portal equivalents (Customize network settings) are storage traffic priority, system traffic priority (5, 6 or 7), storage bandwidth reservation, jumbo frame size (1514, 4088 or 9014) and the RDMA protocol (iWARP, RoCE, RoCEv2 or disabled). Microsoft Learn does not publish per-intent defaults. The Azure Local Cloud design intent of "storage intent: RDMA on and jumbo frames; management and compute intents: RDMA off, jumbo at the default" is owner policy, lab-verified only: confirm it after deployment with Get-NetIntent, Get-NetAdapterAdvancedProperty -RegistryKeyword *JumboPacket and Get-NetAdapterRdma. Guest RDMA is not supported on Azure Local.
Networking Pattern & Type Reference
networkingPattern Values
hyperConverged is shown by Microsoft LearnLearn gives hyperConverged as the example value for networkingPattern. The other values below are the pattern names used by the Azure Local Cloud parameter templates; they are not documented by Microsoft Learn 2610 and are lab-verified only. Check the allowed values in the template before use.
| Pattern | Intents | Description | Use Case |
|---|---|---|---|
hyperConverged | 1 | All traffic (Mgmt+Compute+Storage) on one adapter pair | Small clusters, 2 NICs/node |
convergedManagementCompute | 2 | Mgmt+Compute shared; Storage dedicated | Standard production (4 NICs/node) |
convergedComputeStorage | 2 | Compute+Storage shared; Mgmt dedicated | Rare; management-isolated |
custom | 3 | Fully disaggregated (Mgmt / Compute / Storage) | Large clusters, 6 NICs/node |
networkingType Values
| Type | Node Count | Storage Connectivity |
|---|---|---|
switchedMultiServerDeployment | 2+ nodes | Top-of-rack switches |
switchlessMultiServerDeployment | 2–3 nodes | Direct-connect (no TOR for storage) |
singleServerDeployment | 1 node | N/A |
Key Vault Reference Syntax
Sensitive parameters (localAdminPassword, AzureStackLCMAdminPassword) use Key Vault references that point to the platform Key Vault — the vault provisioned in prior phases where deployment credentials are already stored:
"localAdminPassword": {
"reference": {
"keyVault": {
"id": "/subscriptions/<SUB_ID>/resourceGroups/<RG>/providers/Microsoft.KeyVault/vaults/<PLATFORM_KV_NAME>"
},
"secretName": "local-admin-password"
}
}
This is not the cluster Key Vault (keyVaultName) — that vault is created by the ARM template during deployment.
Always use Key Vault references to the platform Key Vault for sensitive parameters.
Example Parameter Files by Networking Pattern
The toolkit keeps one generated example per design in azurelocal-toolkit/config/azure/arm-templates/examples/ (written by config/variables/scripts/New-ArmParameterExample.ps1; its -Check fails when one is out of date):
| File | Built from | Design |
|---|---|---|
active-directory-s2d-switched.parameters.json | config/variables/examples/infrastructure.example.yml | Active Directory, Storage Spaces Direct on switched storage, two machines |
local-identity-s2d-switchless.parameters.json | config/variables/examples/scenarios/local-identity-switchless-iso.yml | Local identity with Key Vault, switchless storage, two machines |
rack-aware-s2d.parameters.json | config/variables/examples/scenarios/rack-aware-ztp.yml | Rack aware cluster, two zones of two machines |
fibre-channel-san.parameters.json | config/variables/examples/scenarios/disaggregated-fibre-channel-proxy.yml | Disaggregated, external SAN over Fibre Channel |
The examples by networking pattern (single-intent-converged, two-intent-standard, three-intent-separated) are gone. The layouts below show the networking patterns; you set them with networking.intents[].
- 1-Intent (HyperConverged)
- 2-Intent (Standard)
- 3-Intent (Separated)
Layout: All traffic on 2 × 25 Gbps adapters per node
Pattern: hyperConverged
NIC1 (25 Gbps) ──┐
├── Management + Compute + Storage
NIC2 (25 Gbps) ──┘
Layout: Mgmt+Compute and Storage on separate adapter pairs (4 × 25 Gbps)
Pattern: convergedManagementCompute
NIC1 (25 Gbps) ──┐
├── Intent 1: Management + Compute
NIC2 (25 Gbps) ──┘
SMB1 (25 Gbps) ──┐
├── Intent 2: Storage (RDMA)
SMB2 (25 Gbps) ──┘
Layout: Fully disaggregated — Management, Compute, Storage each dedicated
Pattern: custom
MGMT1 (1 GbE) ───┐
├── Intent 1: Management
MGMT2 (1 GbE) ───┘
NIC1 (25 Gbps) ──┐
├── Intent 2: Compute
NIC2 (25 Gbps) ──┘
SMB1 (25 Gbps) ──┐
├── Intent 3: Storage (RDMA)
SMB2 (25 Gbps) ──┘
References: