Skip to main content

Task 07: Configure Time Synchronization (NTP)

The automated run does this task for you

The automated OS configuration run covers this task in the Time step (NTP peers equal networking.ntp_servers). Use the manual steps below when you can't use the run, or to understand or troubleshoot what it does. See how the run works.

Runbook Azure Dell

DOCUMENT CATEGORY: Runbook
SCOPE: Time synchronization
PURPOSE: Configure w32tm with the NTP server from infrastructure.yml so all cluster nodes synchronize to the same authoritative time source — required for Kerberos, Active Directory, and Arc registration
MASTER REFERENCE: Phase 03: OS Configuration

Status: Active Estimated Time: 5 minutes per node / 10 minutes orchestrated (all nodes)


Overview​

All Azure Local nodes must synchronize time from the same NTP source before AD domain join and Arc registration. Kerberos authentication fails when clock skew exceeds five minutes. This task configures the Windows Time service (w32tm) on each node, restarts the service, forces an immediate resync, and validates the resulting stratum.

What the steps do:

  1. Configure w32tm with the NTP servers from networking.ntp_servers
  2. Restart the Windows Time service
  3. Force an immediate resync (w32tm /resync /force)
  4. Verify the resulting sync status and stratum — warn if stratum 16 (unsynchronized)

Prerequisites​

RequirementDescriptionSource
Task 06 completeDNS client verified and functionalTask 06: Verify DNS
NTP server addressFQDN or IP of the authoritative NTP serverinfrastructure.yml: networking.ntp_servers
Local admin rightsRequired to restart Windows Time serviceNode credentials

Configuration Reference​

infrastructure.yml pathScript variableExample
networking.ntp_servers$NTPServer (Direct tab), the NTP peers of the Time step192.0.2.4
nodes[].management.ip_addressThe address the OS configuration connects to192.0.2.11
nodes[].nameThe nodeiic-azl-n01
infrastructure.yml — NTP server list

networking.ntp_servers is a YAML list. The script on the Direct tab uses the primary (first) entry. The Time step of the OS configuration sets all entries as the NTP peers of each node.

What Microsoft Learn specifies (Azure Local 2610)

From Install the Azure Local operating system: configure a valid time server on each machine, and validate that the machine is not using the local CMOS clock as a time source (w32tm /query /status). The command Learn gives is:

w32tm /config /manualpeerlist:"ntpserver.contoso.com,0x8" /syncfromflags:manual /update

The 0x8 flag tells Windows Time Service to send NTP requests as a client. Learn's command does not include /reliable:YES, which would mark every node as a reliable time source, so the commands on this page and the OS configuration do not set it. Learn gives the single-peer form only; for several peers the OS configuration puts ,0x8 on each peer in the space-separated list (standard w32tm syntax). "Once the machine is domain joined, it synchronizes its time from the PDC emulator." If you domain join the nodes before deployment (supported from 2604; see Task 03: Manual OS installation), the node follows the domain hierarchy once joined; the manual peer still matters while the node is in a workgroup.


Execution Options​

Run on each node individually — via RDP, console, or KVM.

The commands below are an example to run by hand. The earlier toolkit script Set-NTPConfiguration.ps1 is removed; the OS configuration does this task in its Time step.

Set $NTPServer to the first entry from networking.ntp_servers in infrastructure.yml.

Configure NTP on the node
# -- Edit before running -------------------------------------------------
$NTPServer = "REPLACE_WITH_NTP_SERVER" # networking.ntp_servers
# ------------------------------------------------------------------------

if ($NTPServer -match "^REPLACE_") { Write-Host "[ERROR] Set NTPServer before running" -ForegroundColor Red; exit 1 }

w32tm /config /manualpeerlist:"$NTPServer,0x8" /syncfromflags:manual /update
Restart-Service w32time -Force
w32tm /resync /force
w32tm /query /status

# Learn: the node must not use the local CMOS clock as its source
if ((w32tm /query /status | Out-String) -match 'Local CMOS Clock') { Write-Host "[WARN] Source is still the local CMOS clock" -ForegroundColor Yellow }

Validation Checklist​

  • NTP server configured on all nodes (w32tm /query /config shows correct peer)
  • Windows Time service running (Get-Service w32time | Select Status)
  • Stratum below 16 on all nodes (w32tm /query /status)
  • Source is not Local CMOS Clock (Learn requirement)
  • Clock skew within 5 minutes on all nodes (Kerberos requirement)

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.


Troubleshooting​

IssueRoot CauseRemediation
The example stops at once$NTPServer still holds REPLACE_WITH_NTP_SERVERSet it to the first entry of networking.ntp_servers
Stratum 16 after resyncNTP server unreachable or DNS not resolvingVerify NTP server IP; confirm Task 06 (DNS) passed; check firewall rules
w32tm /resync exits non-zeroTime service not yet fully startedWait 10 seconds and re-run w32tm /resync /force manually
OS configuration: the node is Blocked in the plannetworking.ntp_servers is missingAdd the list to infrastructure.yml, then run the plan again
OS configuration: node unreachableWinRM not enabled or firewall blockingVerify WinRM configured (Task 01); check firewall allows port 5985/5986
Time keeps drifting backVM host overriding guest timeDisable Hyper-V Time Synchronization integration service if applicable


Alternatives​

The procedures in this task use the methods shown in the tabs above. The toolkit is PowerShell 7 only and has no Bash scripts. A few tasks that act on Azure also have an Azure CLI script written in PowerShell. The script status page of the toolkit lists which task has which script.

← Task 06: Verify DNS↑ Phase 03: OS ConfigurationTask 08: Enable ICMP →

Version Control​

VersionDateAuthorChanges
1.02026-01-31Azure Local CloudInitial document
2.02026-03-04Azure Local CloudFull rewrite to standards — complete frontmatter, bare-node 2-tab structure (Direct, Orchestrated), Standalone tab removed, YAML key corrected to networking.ntp_servers list, full embedded scripts with Assert-ConfigValues hard-fail, Get-YamlList and Get-ClusterNodes helpers
2.12026-11-08Azure Local CloudAligned to Azure Local 2610 (Learn "Install the OS"): w32tm uses ,0x8 on each peer, /reliable:YES removed, CMOS clock check added, domain-joined PDC emulator note