Command · pk-metal
pk-metal inventory
changes no machineno cluster necessary
pk-metal inventory reads the hardware facts of one machine from its BMC and prints them as a YAML fact file. It reads only.
The command talks to the BMC directly. It does not use the operator or the cluster.
Synopsis
Section titled “Synopsis”pk-metal inventory [flags] <bmc-url><bmc-url>- The address of the BMC, for example
https://192.0.2.11. Give one address.
| Flag | Default | Description |
|---|---|---|
--address<string> | - | Address label for the fact file (default: endpoint host). |
--bmc-ca<string> | - | PEM file with the CA certificates that the BMC's TLS certificate must chain to. |
--insecure | false | Skip TLS verification of the BMC (prefer --bmc-ca). |
--node<string> | - | Node name for the fact file (default: derived from the endpoint host). |
--system<string> | - | System id to describe (default: the BMC's only system). |
--user<string> | admin | BMC username (password via PK_METAL_BMC_PASSWORD). |
The password comes from the environment variable PK_METAL_BMC_PASSWORD. It is never a flag.
What it does
Section titled “What it does”- The command logs in to the BMC with a Redfish session, or with HTTP Basic authentication if the BMC has no sessions. It cannot write.
- It reads the manager, the virtual media slots, the systems and the chassis.
- It selects the system of
--system. A BMC with one system needs no--system. A BMC with more systems needs it, and the command stops with the list of system ids if you do not give it. - It prints the fact file to stdout.
The fact file has these parts:
| Part | Content |
|---|---|
node |
The name from --node, or the host part of the address. |
bmc |
Address, MAC address, firmware version, host name and the virtual media slots. |
system |
Manufacturer, model, serial number, UUID, power state, memory and processors. |
nics |
The network interfaces of the system, with their MAC addresses. |
adapters |
The network adapters of the chassis, when the BMC reports them. |
Examples
Section titled “Examples”pk-metal inventory --node sim-0001 https://192.0.2.11 > sim-0001.yaml
head -n 12 sim-0001.yaml
# GENERATED by pk-metal inventory (2026-11-24T09:30:00Z) — re-run to refresh; do not hand-edit.
node: sim-0001
bmc:
address: "192.0.2.11"
mac: "02:00:00:00:03:97"
firmware: "6.76"
hostname: "SIMHW2288V5000397" # iBMC reports the chassis serial here
virtualmedia:
- { id: "CD", media_types: [], insert_standard: false, oem_actions: ["#VirtualMedia.VmmControl"] }
system:
manufacturer: "Huawei"
model: "2288H V5"
Use the serial number and the BMC MAC address from the fact file when you write the Asset.
Objects
Section titled “Objects”The command reads and writes no object in the cluster. In the cluster, the Host controller writes the same facts into the status of the Host.
Exit status
Section titled “Exit status”Related
Section titled “Related”- pk-metal check is the short test of a BMC.
- Check a BMC
- Enroll hosts
- Identity explains how the operator uses the serial number.