AI lab, part 4: BMCs and Redfish
Out-of-band management of GPU trays with Redfish BMCs: inventory, GPU sensors, NVLink faults and power cycles. Parts 2 and 3 used the cluster the way its users do, through a scheduler. A scheduler only knows what each tray’s operating system reports, so a hung or powered-off tray can look healthy to it for minutes. This part covers the operator’s back door: the baseboard management controllers (BMCs), which manage the hardware independently of the OS. I’ll walk the Redfish tree, break NVLinks (NVIDIA’s GPU-to-GPU links, introduced in Part 1) on purpose, and power-cycle a tray. The examples run in Slurm mode, but the BMCs are identical with Kubernetes. Commands that start with A BMC is a small computer on every server board with its own network port and its own power. Dell’s iDRAC and HPE’s iLO are BMCs. It stays up when the host is off or hung, and it can power the host on and off, report hardware inventory and health, and change firmware-level settings. In a GB200 rack every compute tray and every NVLink switch tray has one. A compute tray actually has two controllers: the tray’s BMC, and the HGX Management Controller (HMC) on the GPU board, which looks after the GPUs. You only talk to the BMC, and it passes on what the HMC reports about the GPUs. Redfish is the DMTF’s REST/JSON API for BMCs and its successor to IPMI. Everything is a resource under The lab has three BMCs: The credentials are OpenBMC’s defaults, The service root is the one resource you can read without logging in. It links to everything else: The usual three branches are there. Systems is what runs, Chassis is the physical hardware, and Managers are the controllers themselves. Everything below the service root needs the credentials. The repository’s A GB200 compute tray has two systems: The two controllers show up as two managers: Each GPU’s UUID on the BMC matches the one The GPUs also appear under Chassis, one The NVLinks are listed under each GPU processor, one port for each of the GPU’s 18 NVLinks. A port has a pending-settings object ( The switch tray BMC describes the other end of the cable. Every switch port knows which tray, GPU and link it’s connected to: The tray BMCs also report GPU temperature and power, even when the host OS is down. Each GPU’s sensors are on its The readings differ by 1 °C and about 5 W because the two commands ran a moment apart, and a busy GPU’s temperature and power change from second to second. Prometheus collects these sensors too, through a Redfish exporter. Part 6 shows them during a power cycle. This section changes the hardware through the BMCs: disabling NVLinks on a GPU tray, taking a port down on the switch tray, and powering a tray off and on. Stage two links of GPU 2 as disabled. The live port is unchanged until the reset: When the tray is back up, the BMC and the GPU’s own view agree. GPU 2 now has 16 links to each peer instead of 18: To undo the change, set both links back to Each NVLink connects a GPU port to an NVSwitch port. The switch tray’s BMC controls the switch end, and changes there apply immediately, with no reset. Port 19 on A link that’s down is down at both ends, so the tray BMC reports the GPU’s port as On real hardware, a job using that link would now fail. The lab’s emulated NCCL never fails, so jobs carry on; it’s the one known difference from real hardware that The tray is off, but its BMC still answers. That’s the point of a BMC: it’s the one way to reach a tray whose OS is gone. Prometheus notices the tray is gone within seconds: So far every request sent the password. Scripts that talk to a BMC for a while should log in once and use a session token instead. Log in by posting the credentials to the session collection. The BMC answers with the token in the Send the token with every request instead of the password: Log out by deleting the session. After that, the token no longer works ( Part 5: NVLink partitions moves from single links to the whole fabric: NVLink partitions, the controller that manages them, fabric telemetry, and how a partition change rewrites the scheduler’s topology.All parts
Table of contents
Overview
bin/ run on the host from the repository root.BMCs and Redfish in two paragraphs
/redfish/v1: you read with GET, change settings with PATCH, and trigger actions with POST. Vendors add their own fields under Oem. NVIDIA’s GB200 BMCs run a fork of OpenBMC’s bmcweb, and the lab’s fakebmc is modelled on it, Oem.Nvidia fields included.sched-worker1-bmc (10.107.111.31) and sched-worker2-bmc (10.107.111.32) each manage a GPU tray: its power, 4 GPUs and their 18 NVLink ports each.sched-nvswitch-bmc (10.107.111.33) manages the switch tray: 2 NVSwitch chips with 72 ports each.root / 0penBmc, and the certificates are self-signed.Reading a tray through its BMC
$ curl -sk https://10.107.111.31/redfish/v1 | jq -c '{RedfishVersion, Systems, Chassis, Managers}'
{"RedfishVersion":"1.17.0","Systems":{"@odata.id":"/redfish/v1/Systems"},"Chassis":{"@odata.id":"/redfish/v1/Chassis"},"Managers":{"@odata.id":"/redfish/v1/Managers"}}bin/redfish helper takes a tray name and a path, looks up the tray’s BMC address in Incus, and runs curl -k with the credentials filled in. Any extra arguments go to curl. The rest of this part uses it.$ bin/redfish sched-worker1 /redfish/v1/Systems | jq -r '.Members[]."@odata.id"'
/redfish/v1/Systems/System_0
/redfish/v1/Systems/HGX_Baseboard_0System_0 is the tray’s host, the Grace CPU running the OS. Power and reset live there. HGX_Baseboard_0 is the GPU board, with the four GPUs as its processors:$ bin/redfish sched-worker1 /redfish/v1/Systems/System_0 | jq '{PowerState, Status}'
{
"PowerState": "On",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
$ bin/redfish sched-worker1 /redfish/v1/Systems/HGX_Baseboard_0 | jq '{PowerState, Status, ProcessorSummary}'
{
"PowerState": "On",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"ProcessorSummary": {
"Count": 4
}
}BMC_0 for the tray and HGX_BMC_0 for the HMC.$ bin/redfish sched-worker1 /redfish/v1/Managers | jq -r '.Members[]."@odata.id"'
/redfish/v1/Managers/BMC_0
/redfish/v1/Managers/HGX_BMC_0
$ bin/redfish sched-worker1 /redfish/v1/Chassis/Chassis_0 | jq -c '{ChassisType, Model, PowerState}'
{"ChassisType":"RackMount","Model":"GB200 NVL","PowerState":"On"}nvidia-smi reports inside the tray, so inventory tooling can join out-of-band and in-band data on it:$ bin/redfish sched-worker1 /redfish/v1/Systems/HGX_Baseboard_0/Processors/GPU_0 | jq '{Model, UUID, SerialNumber, Oem}'
{
"Model": "NVIDIA GB200",
"UUID": "81501924-f170-f6d0-f2da-dc7595876881",
"SerialNumber": "16523240298025",
"Oem": {
"Nvidia": {
"@odata.type": "#NvidiaProcessor.v1_4_0.NvidiaGPU",
"FabricClique": {
"CliqueId": 1,
"ClusterUUID": "7f3c2a10-5b4e-4d6a-9c1e-2b8f0e6d4a91"
},
"PCIeBusId": "00000000:18:00.0"
}
}
}
$ bin/ssh sched-worker1 nvidia-smi -L | head -1
GPU 0: NVIDIA GB200 (UUID: GPU-81501924-f170-f6d0-f2da-dc7595876881)HGX_GPU_<n> chassis per GPU, with the same UUID:$ bin/redfish sched-worker1 /redfish/v1/Chassis/HGX_GPU_0 | jq -c '{ChassisType, Model, UUID}'
{"ChassisType":"Component","Model":"NVIDIA GB200","UUID":"81501924-f170-f6d0-f2da-dc7595876881"}@Redfish.Settings). As with BIOS settings, a change is staged there and takes effect at the next reset:$ bin/redfish sched-worker1 /redfish/v1/Systems/HGX_Baseboard_0/Processors/GPU_2/Ports/NVLink_3 \
| jq -c '{LinkState, LinkStatus, CurrentSpeedGbps, Width, Settings: ."@Redfish.Settings".SettingsObject}'
{"LinkState":"Enabled","LinkStatus":"LinkUp","CurrentSpeedGbps":400,"Width":2,"Settings":{"@odata.id":"/redfish/v1/Systems/HGX_Baseboard_0/Processors/GPU_2/Ports/NVLink_3/Settings"}}CurrentSpeedGbps is the speed of the whole port: an NVLink 5 link has two lanes (Width), 400 Gb/s together, which is 50 GB/s in each direction.$ bin/redfish sched-nvswitch /redfish/v1/Fabrics/MGX_NVLinkFabric_0/Switches/NVSwitch_0/Ports/NVLink_19 \
| jq -c '{LinkStatus, RemoteEndpoint: .Oem.Nvidia.RemoteEndpoint}'
{"LinkStatus":"LinkUp","RemoteEndpoint":{"BMC":"sched-worker1-bmc","GPU":"GPU_2","GPUUUID":"81502f39-9cad-de97-2723-3d7d71928458","Host":"sched-worker1","Port":"NVLink_2"}}HGX_GPU_<n> chassis, and Chassis_0 has the total power for the tray. A real BMC reads these values straight from the GPUs, without going through the host. The lab’s BMC computes them the same way NVML does, so both show the same numbers. These readings were taken during a training run:$ bin/redfish sched-worker1 /redfish/v1/Chassis/HGX_GPU_0/Sensors | jq -r '.Members[]."@odata.id"'
/redfish/v1/Chassis/HGX_GPU_0/Sensors/HGX_GPU_0_TEMP_0
/redfish/v1/Chassis/HGX_GPU_0/Sensors/HGX_GPU_0_Power_0
$ bin/redfish sched-worker1 /redfish/v1/Chassis/HGX_GPU_0/EnvironmentMetrics \
| jq -c '{Temp: .TemperatureCelsius.Reading, Power: .PowerWatts.Reading}'
{"Temp":70,"Power":877.525}
$ bin/ssh sched-worker1 nvidia-smi -i 0 --query-gpu=temperature.gpu,power.draw --format=csv
temperature.gpu, power.draw [W]
69, 872.87 W
$ bin/redfish sched-worker1 /redfish/v1/Chassis/Chassis_0/Sensors/Total_GPU_Power_0 | jq -c '{Reading, ReadingUnits}'
{"Reading":3512.52,"ReadingUnits":"W"}Total_GPU_Power_0 is the sum for all four GPUs.Operations
Disable NVLinks and reset the tray
$ for l in 3 4; do
bin/redfish sched-worker1 /redfish/v1/Systems/HGX_Baseboard_0/Processors/GPU_2/Ports/NVLink_$l/Settings \
-X PATCH -d '{"LinkState": "Disabled"}'
done
$ bin/redfish sched-worker1 …/GPU_2/Ports/NVLink_3 | jq -c '{LinkState, LinkStatus}'
{"LinkState":"Enabled","LinkStatus":"LinkUp"}
$ bin/redfish sched-worker1 /redfish/v1/Systems/System_0/Actions/ComputerSystem.Reset \
-X POST -d '{"ResetType": "ForceRestart"}'$ bin/redfish sched-worker1 …/GPU_2/Ports/NVLink_3 | jq -c '{LinkState, LinkStatus, Status}'
{"LinkState":"Disabled","LinkStatus":"LinkDown","Status":{"Health":"Warning","State":"Disabled"}}
$ bin/ssh sched-worker1 nvidia-smi topo -m
GPU0 GPU1 GPU2 GPU3 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X NV18 NV16 NV18 0-1 0 2
GPU1 NV18 X NV16 NV18 0-1 0 10
GPU2 NV16 NV16 X NV16 6-7 1 18
GPU3 NV18 NV18 NV16 X 6-7 1 26
…"Enabled" and reset the tray again. nvidia-smi topo -m then shows NV18 everywhere.Take a switch port down
NVSwitch_0 is GPU 2’s link 2:$ bin/redfish sched-nvswitch /redfish/v1/Fabrics/MGX_NVLinkFabric_0/Switches/NVSwitch_0/Ports/NVLink_19 \
-X PATCH -d '{"LinkState": "Disabled"}'
$ bin/ssh sched-worker1 'nvidia-smi topo -m | grep ^GPU2; nvidia-smi nvlink -s -i 2 | grep "Link 2:"'
GPU2 NV17 NV17 X NV17 6-7 1 18
Link 2: <inactive>LinkDown too. Its LinkState stays Enabled, because nothing was changed on the GPU side:$ bin/redfish sched-worker1 /redfish/v1/Systems/HGX_Baseboard_0/Processors/GPU_2/Ports/NVLink_2 | jq -c '{LinkState, LinkStatus}'
{"LinkState":"Enabled","LinkStatus":"LinkDown"}make test-bmc-conformance reports. Set the port back to "Enabled" to restore the link.Power a tray off and on
$ bin/redfish sched-worker2 /redfish/v1/Systems/System_0/Actions/ComputerSystem.Reset \
-X POST -d '{"ResetType": "ForceOff"}'
$ bin/redfish sched-worker2 /redfish/v1/Systems/System_0 | jq -c '{PowerState}'
{"PowerState":"Off"}up{job="gpu", instance="sched-worker2:9835"} drops to 0. "ResetType": "On" powers the tray back on.Using Redfish sessions
X-Auth-Token header, and the session’s own address in Location:$ curl -sk -D - -o /dev/null -X POST https://10.107.111.32/redfish/v1/SessionService/Sessions \
-H 'Content-Type: application/json' -d '{"UserName":"root","Password":"0penBmc"}' \
| grep -iE '^(HTTP|x-auth-token|location)'
HTTP/2 201
location: /redfish/v1/SessionService/Sessions/93694e3cef
x-auth-token: 3c4c9f1d0a424028a33f658dff623032$ curl -sk -H "X-Auth-Token: 3c4c9f1d0a424028a33f658dff623032" \
https://10.107.111.32/redfish/v1/Systems/System_0 | jq -c '{PowerState}'
{"PowerState":"On"}401):$ curl -sk -o /dev/null -w '%{http_code}\n' -X DELETE -H "X-Auth-Token: 3c4c9f1d0a424028a33f658dff623032" \
https://10.107.111.32/redfish/v1/SessionService/Sessions/93694e3cef
204
$ curl -sk -o /dev/null -w '%{http_code}\n' -H "X-Auth-Token: 3c4c9f1d0a424028a33f658dff623032" \
https://10.107.111.32/redfish/v1/Systems/System_0
401What to build against it
nvidia-smi and the scheduler’s node list.make test-bmc in the repo runs the lab’s own pytest suite against them.Next in the series