Skip to main content

Task 10: Configure Hostname

The automated run does this task for you

The automated OS configuration run covers this task in the Hostname step (the computer name equals the node name; a restart follows). 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 Phase 03 Platform

DOCUMENT CATEGORY: Runbook SCOPE: Set the computer hostname for each node according to naming standards PURPOSE: Set the computer hostname for each node according to naming standards MASTER REFERENCE: Microsoft Learn - Install the Azure Local operating system (SConfig, computer name)

Status: Active

Overview​

Rename each node to its target hostname from infrastructure.yml. Nodes must restart to apply the change.

Computer name rules (Azure Local 2610)
  • Do not use an underscore (_) in the computer name. Learn: "Using an underscore (_) in the computer name is not supported, as it impacts storage path creation."
  • The computer name is the name shown in the Azure portal and, once joined, in Active Directory. Choose it now; it is not a cosmetic setting.
  • Use a name that is unique in the domain and matches the node name in infrastructure.yml and the Active Directory preparation (Phase 01).

Prerequisites​

RequirementDetails
Tasks 01–09 completeUnused adapters disabled
Hostnames from infrastructure.ymlnodes[].name

Config Reference​

YAML KeyVariableExample
nodes[].name$NewHostnameazlocal-node01
nodes[].network_adapters[].ip_address$ServerList / $node.ip10.0.0.11

Execution Options​

Run on each node via console, KVM, or RDP. SConfig is the simplest method.

  1. At the PowerShell prompt, type SConfig and press Enter
  2. Select option 2 — Computer Name
  3. Type the hostname from infrastructure.yml (nodes[].name)
  4. Press Enter and confirm
  5. Select Yes to restart now

Repeat on each node.


Validation​

# Confirm hostname on each node
$env:COMPUTERNAME
# or remotely:
Invoke-Command -ComputerName <ip> -ScriptBlock { $env:COMPUTERNAME }

Validation Checklist​

  • Each node reports the correct hostname
  • All nodes accessible after restart
  • Hostnames match nodes[].name in infrastructure.yml
  • No hostname contains an underscore

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​

IssueResolution
Node didn't come back after restartWait another 60s then ping the management IP
Hostname not appliedConfirm Rename-Computer ran without error; restart if needed
Hostname contains _Rename the node. An underscore in the computer name impacts storage path creation (Learn).


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 09: Disable Adapters · ↑ Phase 03 · Task 11: Clear Storage →


Version Control​

VersionDateAuthorChanges
1.0.02025-03-25Azure Local CloudInitial release
1.1.02026-11-08Azure Local CloudAligned to Azure Local 2610: underscore not allowed in the computer name (impacts storage path creation); Learn master reference and platform badge updated