Command · pk-metal
pk-metal check
changes no machineno cluster necessary
pk-metal check tests one BMC before you enroll the machine. 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 check [flags] <bmc-url><bmc-url>- The address of the BMC, for example
https://192.0.2.11. Give one address.
| Flag | Default | Description |
|---|---|---|
--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). |
--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.
--bmc-ca names a PEM file with the CA certificates of your site. The command then accepts only a BMC certificate that chains to one of them.
--insecure stops the certificate check. The command then prints a warning: a host on the network path can read the BMC password.
Each request to the BMC must answer in 30 seconds. Ctrl+C stops the command at once.
What it does
Section titled “What it does”- The command logs in to the BMC with a Redfish session, and deletes the session when it stops. A BMC without sessions gets HTTP Basic authentication.
- It reads the manager: the vendor and the firmware version.
- It reads each virtual media slot and the dialect that the slot uses to mount an image.
- It reads each system: the serial number and the power state.
- It prints
check: OK (read-only).
The session cannot change the BMC. The client refuses all requests that write.
Examples
Section titled “Examples”export PK_METAL_BMC_PASSWORD=...
pk-metal check --user admin https://192.0.2.11
manager: Huawei fw 6.72
media: CD dialect=vmm-control
media: USBStick dialect=none
system: 1 serial=SIMHW2288V5000397 power=On
check: OK (read-only)
A slot with dialect=none cannot mount an image. This BMC has one slot that can: it is a one-slot BMC.
Check a BMC whose certificate comes from the CA of your site:
pk-metal check --bmc-ca site-ca.pem https://192.0.2.11A BMC in the lab has a self-signed certificate. Add --insecure only for such a BMC.
pk-metal check --insecure https://10.77.0.1:8441Check the client against real hardware
Section titled “Check the client against real hardware”The test suite has read-only checks for a real BMC. They test that each read answers, that the identity of the machine is there, and that two reads give the same chassis and systems. The client of the checks refuses each request that writes.
export PK_METAL_BMC_PASSWORD=...PK_METAL_HW_URL=https://192.0.2.11 PK_METAL_HW_CA=site-ca.pem mise run test:hardwareWithout PK_METAL_HW_CA, the checks do not verify the BMC certificate. PK_METAL_HW_USER sets the user. The default is admin.
Objects
Section titled “Objects”The command reads and writes no object in the cluster. The operator does the same checks when it reconciles a ManagementEndpoint.
Exit status
Section titled “Exit status”Related
Section titled “Related”- pk-metal inventory reads the full hardware inventory.
- Check a BMC
- Enroll hosts
- BMC unreachable
- Virtual media boot explains why the media slots are important.