Task 02: Hardware Discovery via Dell Redfish API
DOCUMENT CATEGORY: Runbook
SCOPE: Azure Local hardware provisioning
PURPOSE: Collect complete hardware inventory, BIOS configuration, and iDRAC configuration from all cluster nodes via Redfish API
MASTER REFERENCE: Dell Redfish API Guide
Status: Active
Overview
Discover all cluster node hardware by connecting to each node's iDRAC via the Redfish API from the management server. This task collects everything needed for Tasks 03–05 in a single execution: hardware inventory, complete BIOS configuration, and complete iDRAC configuration.
Data collected per node:
- Service tag, model, BIOS version, firmware versions
- iDRAC MAC address
- System NIC MAC addresses
- All BIOS attributes (~256 settings) — used in Tasks 04 and 05
- All iDRAC attributes (~1024 settings) — used in Tasks 04 and 05
- CPU, memory, storage inventory
All scripts in this task run from the management server and connect to iDRAC over the network via HTTPS (port 443). No access to the nodes themselves is required.
Prerequisites
| Requirement | Details | Source |
|---|---|---|
| iDRAC IPs | All nodes reachable on port 443 | nodes[].bmc.ip_address in infrastructure.yml |
| iDRAC Credentials | Admin username and password | Key Vault or infrastructure.yml |
| Network Access | Management server can reach iDRAC OOB network | Phase 03 Network Infrastructure |
| PowerShell 7+ | Invoke-RestMethod and powershell-yaml module | Management server |
Values from infrastructure.yml
The script reads these keys from infrastructure.yml (schema 5). Each key, with its type, default and example, is in the variables reference.
nodes[]: name, bmc.ip_address, bmc.type, bmc.username, bmc.password, serial_number
hardware.bmc: username, password, verify_certificate
hardware.inventory: output_directory, file_name_prefix, format, timeout_seconds
hardware.vendor, hardware.model, hardware.cpu_cores, hardware.memory_gib, hardware.gpu (enabled, model, count_per_node),
hardware.drives (capacity and cache: media, count, size_tb): compared with what the BMC reports
secrets, key_vaults: read by the secret resolver for the references above
Execution Options
- Dell iDRAC UI
- Orchestrated Script
When to use: Single nodes, ad-hoc verification, or when scripted access is unavailable
Procedure
- Navigate to
https://<idrac-ip>and log in with iDRAC credentials - System Information: Dashboard → record Service Tag, Model, BIOS Version
- iDRAC MAC: iDRAC Settings → Network → record MAC Address
- System NICs: System → Network Devices → record MAC addresses for all ports
- Export config: Configuration → Export Server Configuration Profile → JSON format
- Repeat for each node
Validation
- Service tag recorded for all nodes
- iDRAC MAC addresses recorded for all nodes
- System NIC MAC addresses recorded for all nodes
- Configuration profiles exported and stored
Update infrastructure.yml
After collecting data from all nodes, manually update the following fields in infrastructure.yml:
| Field | Source | Where to find it |
|---|---|---|
nodes[].serial_number | Service Tag | Dashboard → System Information |
nodes[].network_adapters[].mac_address | The MAC address of each port (the management port first) | System → Network Devices → MAC for each port |
nodes[].network_adapters[].name | NIC adapter name | System → Network Devices → adapter name (e.g., Slot 3 Port 1 or Embedded NIC 1) |
All subsequent tasks depend on these values. Do not proceed to Task 03 until infrastructure.yml is updated and committed.
PowerShell
When to use: Run the task from a management workstation or a pipeline. The script reads
infrastructure.ymland carries no values of its own.
Script
| Script | What it does |
|---|---|
scripts/deploy/04-cluster-deployment/phase-01-hardware-provisioning/task-02-hardware-discovery-via-dell-redfish-api/powershell/Get-HardwareInventory.ps1 | Reads the hardware of every node from its baseboard management controller (BMC) over the standard Redfish API and writes one inventory file. Supports -WhatIf. |
scripts/deploy/04-cluster-deployment/phase-01-hardware-provisioning/task-02-hardware-discovery-via-dell-redfish-api/powershell/Invoke-HardwareDiscovery.ps1 | Phase 01, Task 02: hardware discovery of every node through the Redfish API of its BMC (read only). This version: Dell iDRAC. |
scripts/deploy/04-cluster-deployment/phase-01-hardware-provisioning/task-02-hardware-discovery-via-dell-redfish-api/powershell/Update-InfrastructureYml-FromDiscovery.ps1 | Writes the serial numbers and port MACs found by hardware discovery into infrastructure.yml. Supports -WhatIf. |
The BMC login comes from hardware.bmc (a node's nodes[].bmc wins) in infrastructure.yml. The password is a secret reference. -Credential overrides it. The script never prompts: without either, it stops with exit code 2.
Requires: PowerShell 7.
Run
./Get-HardwareInventory.ps1 -InfrastructureFile ./infrastructure.yml -WhatIf
.\Invoke-HardwareDiscovery.ps1 -InfrastructureFile .\infrastructure.yml
.\Update-InfrastructureYml-FromDiscovery.ps1 -InfrastructureFile .\infrastructure.yml
Run It in a Pipeline
The toolkit has a discovery pipeline on each platform: pipelines/github-actions/discovery.yml, pipelines/gitlab/stages/discovery.yml (include it from a pipeline file of its own, not from .gitlab-ci.yml) and pipelines/azure-devops/discovery.yml. Each runs scripts/common/discovery/Invoke-AzlDiscoveryRun.ps1 on the general self-hosted runner and nothing else. The same command runs by hand:
# The BMCs (any maker), the Azure tenant and the Active Directory OU, into one folder
./scripts/common/discovery/Invoke-AzlDiscoveryRun.ps1 -InfrastructureFile ./infrastructure.yml -OutputDirectory ./discovery-run
# The Dell iDRAC discovery, and a copy of infrastructure.yml with the serial numbers and MACs found
./scripts/common/discovery/Invoke-AzlDiscoveryRun.ps1 -InfrastructureFile ./infrastructure.yml -OutputDirectory ./discovery-run -Scope DellDiscovery -WriteBack
| Pipeline scope | Script parameter -Scope | What runs |
|---|---|---|
all (default) | HardwareInventory, AzureTenant, ActiveDirectory | The three below |
hardware | HardwareInventory | Get-HardwareInventory.ps1: every BMC over the standard Redfish API, any maker |
dell | DellDiscovery | Invoke-HardwareDiscovery.ps1: Dell iDRAC only, with the proposal for nodes[] |
tenant | AzureTenant | Inventory-AzureTenant.ps1: the Azure tenant of azure.tenant_id |
directory | ActiveDirectory | Get-OnPremInventory.ps1: the computer objects of the Active Directory OU of the instance |
- Read only, so no approval. The BMCs get GET requests only; Azure and Active Directory are only read.
- The report.
discovery-report.json(what ran, the exit code of each step, the files each step wrote, the verdict),summary.mdand a folder per step. The pipeline publishes them as the artifactdiscovery-report, also when a step fails. The run fails when a step fails. Exit codes of the script: 0 every step succeeded, 1 at least one step failed (the others still ran), 2 bad input (nothing was run). - The file must be readable YAML. Before it creates or runs anything, the script reads
infrastructure.ymlas a YAML mapping. A file that cannot be read that way ends the run with exit code 2: no step runs and no folder is created. The file is not checked against the schema here, because a file that is still being filled in is what discovery is for. - The write-back edits a copy only. With the pipeline input
write_back(GitLabDISCOVERY_WRITE_BACK, scopedell),Update-InfrastructureYml-FromDiscovery.ps1 -Applyruns on a copy of the master file in the artifact (write-back/, withwrite-back/changes.txt). The file in the repository is never changed, and no pipeline commits, pushes or opens a pull request. Review the copy and commit it through a pull request of your own. - The BMC login is the secret reference in
infrastructure.yml(hardware.bmc, ornodes[].bmc). The toolkit secret resolver reads it from Key Vault at run time with the Azure sign-in of the job. No pipeline file or variable holds a password. - The runner needs a route to the BMC addresses (HTTPS, TCP 443) and, for the Active Directory step, the ActiveDirectory module (RSAT) on a domain-joined runner.
Platform details: GitHub Actions, GitLab CI/CD, Azure DevOps.
Output Files
| File | Written by | Location |
|---|---|---|
<prefix>-<UTC time>.json (or .yml): the inventory of every node | Get-HardwareInventory.ps1 | hardware.inventory.output_directory (default hardware-inventory) |
<service-tag>.json per node, discovery-summary.json, infrastructure.discovered.yml (the proposal for nodes[]) | Invoke-HardwareDiscovery.ps1 | -OutputPath (default .\discovery) |
discovery-report.json, summary.md, a folder per step | Invoke-AzlDiscoveryRun.ps1 (the pipeline) | -OutputDirectory |
Keep these folders out of git: they hold serial numbers and MAC addresses.
Troubleshooting
| Issue | Cause | Resolution |
|---|---|---|
Connection refused | iDRAC not accessible | Verify iDRAC IP and port 443 reachable from management server |
Authentication failed | Incorrect credentials | Verify iDRAC password; check root account is enabled |
Certificate error | Self-signed cert | Ensure PowerShell 7+ and -SkipCertificateCheck is used |
Timeout | Slow iDRAC response | Check iDRAC is responsive via web UI; increase script timeout |
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.
Navigation
| ← Task 01: iDRAC DHCP Reservations | ↑ Phase 01: Hardware Provisioning | Task 03: Management NIC Reservations → |
Version Control
| Version | Date | Author | Changes |
|---|---|---|---|
| 1.0 | 2026-01-01 | Azure Local Cloud | Initial document |
| 1.1 | 2026-03-03 | Azure Local Cloud | Fix tab labels, schema keys, standards alignment |
| 1.2 | 2026-03-04 | Azure Local Cloud | Add infrastructure.yml update instructions to all three tabs; document Update-InfrastructureYml-FromDiscovery.ps1 integration |
| 1.3 | 2026-11-16 | Azure Local Cloud | The discovery run refuses a file that cannot be read as YAML (exit code 2, nothing runs) |
| 1.3 | 2026-11-15 | Azure Local Cloud | Add the discovery pipeline (GitHub Actions, GitLab CI, Azure DevOps) and the write-back to a copy; correct the output files |