Infrastructure
Azure Arc: validate an extension upgrade before rolling it out fleet-wide
A production runbook for inventorying Azure Arc extensions, canarying a version, detecting fleet drift, and choosing promotion, hold or rollback before enabling automatic upgrades.
A new Azure Arc extension version is available for several hundred Linux and Windows servers. Automatic upgrades reduce operational overhead, but the fleet is not uniform: operating systems, proxies, outbound rules, Connected Machine agent modes and maintenance windows differ. Enabling the option everywhere proves neither that the handler starts nor that the service delivered by the extension remains healthy.
The running case upgrades Azure Monitor Agent on Arc-enabled servers, but the protocol also applies to Key Vault, Update Manager, Hybrid Runbook Worker and Network Watcher extensions. The runbook must end with an explicit decision: promote automatic upgrades, hold the fleet under observation, or stop new attempts and restore a known service level.
Freeze the rollout contract
Separate four objects that are often conflated: the Connected Machine agent version, the extension handler version, the extension configuration and the service that operators actually expect, such as log ingestion. An extension can report Succeeded while useful telemetry has stopped.
change: CHG-ARC-1023
extension:
publisher: Microsoft.Azure.Monitor
type: AzureMonitorLinuxAgent
target_version: <validated-version>
scope:
inventory_query: <versioned-resource-graph-query>
eligible_machines: <count>
excluded_rings:
- domain-controllers
- disconnected-sites
- unsupported-os
rings:
canary: 5 machines
pilot: 5 percent
broad: remaining eligible machines
gates:
provisioning_state: Succeeded
heartbeat_max_age: 10m
new_extension_errors: 0
workload_signal_regression: none
rollback_owner: hybrid-platform-on-call The scope must be reproducible. Do not use a hand-picked portal selection as the source of truth. Retain the query, UTC timestamp, exclusions and identity that will execute the change.
Read the fleet before choosing a canary
Azure Resource Graph can surface the versions, states and upgrade policies visible on extension resources. Verify property names against a sample in your tenant before freezing the query because they depend on the resource type and API projection.
set -euo pipefail
az graph query -q '
resources
| where type =~ "microsoft.hybridcompute/machines/extensions"
| extend machine = tostring(split(id, "/")[8]),
publisher = tostring(properties.publisher),
extensionType = tostring(properties.type),
version = tostring(properties.typeHandlerVersion),
state = tostring(properties.provisioningState),
autoUpgrade = tostring(properties.enableAutomaticUpgrade)
| where publisher == "Microsoft.Azure.Monitor"
| where extensionType in ("AzureMonitorLinuxAgent", "AzureMonitorWindowsAgent")
| project subscriptionId, resourceGroup, location, machine,
extension=name, extensionType, version, state, autoUpgrade, id
| order by location asc, machine asc' --first 5000 --output json > arc-extension-inventory.json
jq -r '.data[] | [.location,.extensionType,.version,.state,.autoUpgrade] | @tsv' arc-extension-inventory.json | sort | uniq -c A useful canary represents real constraints: at least one relevant OS and region, the same proxy or outbound path, the same policy, and the same full or monitor mode. First remove already failed, unsupported or disconnected machines from the rollout. They belong in a separate remediation queue, not in the new version’s quality signal.
Prove the extension is allowed and reachable
Local Azure Arc controls can reject an installation that Azure-side permissions allow. An allowlist, blocklist, monitor mode or disabled extension manager takes precedence over the pipeline’s intent. On every canary profile, record azcmagent config list and agent status locally without changing those guardrails.
Also verify the download path. Extension packages are retrieved from Microsoft-managed storage; with Azure Arc private endpoints they are proxied through the regional Arc service URL. A download failure does not justify opening unrestricted egress. Prove DNS, proxy, TLS and destination from the affected machine.
For every canary profile
Arc machine connected and Connected Machine agent supported
Publisher/type allowed by the allowlist or current mode
Extension manager enabled
Target version available in the region
DNS, proxy and TLS valid for the expected download path
Disk space and handler service healthy
Configuration and protected settings referenced without secret values
Functional baseline captured before upgrade The security posture is part of the gate. Do not temporarily move a sensitive server to full mode just to make deployment succeed. Repair the extension contract or exclude that profile.
Canary the version before automatic upgrades
Automatic upgrade is configured per extension and per server. It follows a platform-controlled gradual deployment and does not give the team a precise schedule. Validate the target version with a manual upgrade on the canary ring first.
set -euo pipefail
RG="rg-hybrid-canary"
MACHINE="arc-linux-canary-01"
TARGET="<validated-version>"
az connectedmachine extension image list --location "westeurope" --publisher "Microsoft.Azure.Monitor" --type "AzureMonitorLinuxAgent" --output table
az connectedmachine upgrade-extension --resource-group "$RG" --machine-name "$MACHINE" --extension-targets "{"Microsoft.Azure.Monitor.AzureMonitorLinuxAgent":{"targetVersion":"$TARGET"}}"
az connectedmachine extension list --resource-group "$RG" --machine-name "$MACHINE" --query "[].{name:name,version:typeHandlerVersion,state:provisioningState,autoUpgrade:enableAutomaticUpgrade}" --output table A displayed version is not enough. Wait for provisioning to finish, inspect the local handler, then validate the extension’s function. For AMA, require a recent heartbeat, continuity in critical tables and no increase in collection errors. For Hybrid Runbook Worker, run a bounded read-only job. For Key Vault, validate renewal against a canary certificate that is not the production certificate.
Correlate the Azure control plane and functional signal
Installation, update and upgrade operations are recorded in the Activity Log. Build a timeline that links the version change to the technical or business signal delivered by the extension.
let Start = datetime(2026-10-23T08:00:00Z);
let End = datetime(2026-10-23T12:00:00Z);
AzureActivity
| where TimeGenerated between (Start .. End)
| where ResourceProviderValue =~ "MICROSOFT.HYBRIDCOMPUTE"
| where ResourceId has "/extensions/"
| project TimeGenerated, ResourceGroup, ResourceId,
OperationNameValue, ActivityStatusValue,
Caller, CorrelationId
| order by TimeGenerated asc In a second query, measure the extension-specific signal for the same machines and time window. An empty result is not success: verify Diagnostic Settings, workspace, DCR, ingestion delay and actual resource name first. Compare the canary both to its baseline and to a control group that remains on the previous version.
Enable by rings without expecting immediate convergence
After the canary and pilot pass, enable automatic upgrades for the relevant extension. This does not force an immediate upgrade; the fleet may legitimately run several versions while the Azure-controlled rollout progresses.
az connectedmachine extension update --resource-group "$RG" --machine-name "$MACHINE" --name "AzureMonitorLinuxAgent" --enable-auto-upgrade true
az connectedmachine extension show --resource-group "$RG" --machine-name "$MACHINE" --name "AzureMonitorLinuxAgent" --query "{version:typeHandlerVersion,state:provisioningState,autoUpgrade:enableAutomaticUpgrade}" --output json Apply the setting by rings with policy or idempotent automation, while keeping the inventory as convergence evidence. Versions that fix critical vulnerabilities may move faster than the normal rollout, so this runbook must remain usable outside a planned maintenance window.
Decide promotion, hold or rollback
Promote
Canary and pilot represent every eligible profile
Provisioning and handler remain healthy
Functional signal shows no regression
Download, proxy and policy errors remain at zero
Inventory, exclusions and owner are recorded
Hold
Target version is absent from a region
Fleet or local configuration is not inventoried
Telemetry cannot distinguish old and new versions
Canary machine was already degraded before the change
Rollback or contain
Disable automatic upgrade on the affected extension to stop retries
Let automatic rollback restore the last known good version
If status remains Failed, preserve configuration and evidence before remove/reinstall
Restore the service delivered by the extension before starting a new canary az connectedmachine extension update --resource-group "$RG" --machine-name "$MACHINE" --name "AzureMonitorLinuxAgent" --enable-auto-upgrade false Disabling automatic upgrade does not magically restore a version; it primarily stops new attempts while the team investigates. When an automatic upgrade fails, Azure attempts to reinstall the last known good version. If that repair also fails and the extension remains Failed, prepare a remove and reinstall operation with the approved configuration. Never delete the extension across the whole fleet to accelerate convergence.
Conclusion
An Azure Arc extension upgrade is validated when the team can connect the handler version to a service that still works, on representative machines and against a control group. Succeeded status and automatic-upgrade enablement are platform controls, not functional evidence.
The final decision has three branches: promote by rings while measuring drift, hold while the fleet or signal is ambiguous, or contain retries and restore a known extension before reopening the rollout.