Skip to main content
Version: 1.0.0

Task 10: Configure Hostname

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: Azure Local Prepare Active Directory

Status: Active

Overview

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


Prerequisites

RequirementDetails
Tasks 01–09 completeUnused adapters disabled
Hostnames from variables.ymlcluster_nodes[].hostname

Config Reference

YAML KeyVariableExample
cluster_nodes[].hostname$NewHostnameazlocal-node01
cluster_nodes[].management_ip$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 variables.yml (cluster_nodes[].hostname)
  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 cluster_nodes[].hostname in variables.yml

Variables from variables.yml

VariableConfig PathExample
Hostname Patterncluster.nodes[].hostnameazlocal-node-01
Domain Namecluster.domain.namecontoso.local
OU Pathcluster.domain.ou_pathOU=Servers,DC=contoso,DC=local

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


Alternatives

The procedures in this task use the scripted methods shown in the tabs above. Additional deployment methods including Azure CLI and Bash scripts are available in the azurelocal-toolkit repository under scripts/deploy/.

MethodDescription
Azure CLIPowerShell-based Azure CLI scripts for Azure resource operations
BashLinux/macOS compatible shell scripts for pipeline environments

← Task 09: Disable Adapters · ↑ Phase 03 · Task 11: Clear Storage →


Version Control

VersionDateAuthorChanges
1.0.02025-03-25Azure Local CloudInitial release