Skip to main content

Task 02: Start the Solution Update

Implementation Day 2

DOCUMENT CATEGORY: Implementation Runbook
SCOPE: A deployed Azure Local cluster that has an update in the state Ready or ReadyToInstall
PURPOSE: Start the solution update that infrastructure.yml chooses, with the safety checks of Learn, and return
MASTER REFERENCE: Update Azure Local by using PowerShell

Status: Active

Run Task 01 first: it says whether an update is ready. If it says AdditionalContentRequired, do the SBE update import first. Microsoft supports two ways to install an update, PowerShell on the cluster and Azure Update Manager in the portal; this script is the PowerShell way, so this task has no Azure CLI script (the Azure CLI has no update command).

The script reads the update environment and the discovered updates, chooses the solution update, refuses to start while the health of the update environment is Failure, Error or Warning, and calls Start-SolutionUpdate. It does not wait: an update takes about four hours for one machine and six for four, and the machines restart. It never resumes or retries an update that is in a failed state.


Values from infrastructure.yml​

The values for this task come from infrastructure.yml (schema 5). Every key, with its type, default and example, is in the variables reference.

KeyWhat the script does with it
cluster.nameThe cluster to connect to (or one node, with -ComputerName)
operations.updates.install_after_deploymentMode AfterDeployment only: true starts the first update, false (default) starts nothing and exits 0. Mode OnDemand does not read it
operations.updates.target_versionlatest (default: the highest solution update that is ready) or a solution version of four numbers, for example 12.2610.1004.50, which the update service must list. Standalone SBE updates are never chosen

Execution Options​

PowerShell on a cluster machine​

When to use: You choose the update yourself and run the commands of Learn

  1. Sign in to a machine of the cluster as the deployment user and note the ResourceId of the update (Get-SolutionUpdate).
  2. Recommended: download the update and run the readiness checks before the window. When the state is ReadyToInstall, the update is prepared.
  3. Inside the window, start it and keep the returned instance id for troubleshooting.
Get-SolutionUpdate -Id <ResourceId> | Start-SolutionUpdate -PrepareOnly
Get-SolutionUpdate -Id <ResourceId> | Format-Table Version, State, UpdateStateProperties, HealthState
$InstanceId = Get-SolutionUpdate -Id <ResourceId> | Start-SolutionUpdate

An update that was prepared with -PrepareOnly has to be installed from PowerShell, not from the portal (Learn).


Follow the update​

Run Task 01 again (verdict UpdateRunning), or Get-SolutionUpdate -Id <ResourceId> | Format-Table Version, State, UpdateStateProperties, HealthState on a machine, or watch Update Manager. To monitor from PowerShell, connect to the last machine of the cluster: the sessions drop as machines restart. When the state is Installed, check Get-SolutionUpdateEnvironment | Format-Table State, CurrentVersion (AppliedSuccessfully is the goal).

Validation​

  • The row says Started or Prepared, or the reason it did not
  • The update state moves through Downloading, Preparing, HealthChecking to Installing
  • After the run: state Installed, CurrentVersion is the target, the checks of Part 7 pass again

Troubleshooting​

IssueCauseResolution
operations.updates.install_after_deployment is not trueMode AfterDeployment and the switch is offUse -Mode OnDemand, or set the key to true
The update environment health is WarningA readiness check warnsGet-SolutionHealthSummary; fix it. To resume an update that failed on warnings, Learn names Start-SolutionUpdate -IgnoreWarnings; the script does not use it
AdditionalContentRequiredThe vendor content is missingSBE update import
A newer update is in a failed stateThe script never starts an older update past a failed newer oneFix the newer update (Learn: Troubleshoot updates), or name the version to install in operations.updates.target_version
No solution update is ready to install with a state such as ScanFailed or PendingOEMValidationAn update is failed or waiting, so the script cannot say the cluster is at the targetRead the advice in the row. For a scan or a validation that is still running, try again later; for a failed one, see Learn: Troubleshoot updates
The update service lists no update <version>A feature update can take a week after its release to be visibleCheck again later, or Add-SolutionUpdate imports one by hand

PreviousUpNext
Task 01: Check for UpdatesPart 8 IndexTask 03: Node Maintenance

Version Control​

VersionDateAuthorChanges
1.0.02026-11-15Azure Local CloudInitial release. The script was Start-SolutionUpdateAfterDeployment.ps1; it now also runs the monthly update (-Mode OnDemand) and can prepare (-PrepareOnly)
1.0.12026-11-16Azure Local CloudEvery update state is handled: failed, waiting and unknown states are Failed (exit 1); a running update of any package type, or a running update environment, is AlreadyRunning