A small Go CLI to drive an HPE iLO 5 BMC over Redfish — power control and (deterministic) one-time UEFI boot selection. Builds for Linux and Android (arm64).
iloctlreads them from the environment — never hard-code them:
var meaning ILO_HOSTiLO/BMC host or IP ILO_USERiLO username ILO_PASSiLO password
flowchart LR
CLI["iloctl <subcommand><br/>power · boot · reboot (cmd/iloctl/main.go)"] --> RF
subgraph RF["internal/redfish — minimal Redfish client"]
LOGIN["Login (session)"] --> CALLS["GetSystem · Reset(allowed) · boot options · set one-time UEFI override"] --> LOGOUT["Logout"]
end
RF -->|"HTTPS Redfish (/redfish/v1/...)"| BMC["HPE iLO 5 BMC"]
BMC --> SRV["the managed server (power / boot)"]
The boot / reboot commands are deterministic: they require PowerState=Off before
changing the boot override (no polling, no retries) so behaviour is reproducible —
reboot does Off → fixed sleep → set override → On for you. Builds for Linux and Android
(arm64) via build.sh.
export ILO_HOST=ilo.example.lan ILO_USER=admin ILO_PASS='…'
# Power
iloctl power status
iloctl power on | off | graceful-off | restart | cycle # cycle = ForceOff -> sleep -> On
# One-time UEFI boot (deterministic: requires PowerState=Off, does NOT power the box on)
iloctl boot list
iloctl boot target "<DisplayName>"
iloctl boot select
# Reboot to a boot option (deterministic: Off -> sleep -> set override -> On)
iloctl reboot list
iloctl reboot target "<DisplayName>"
iloctl reboot selectThe "deterministic" commands deliberately avoid polling/retries: they require a known state
(Off) before changing the boot override, so behaviour is reproducible.
./build.sh # builds dist/iloctl (Linux) and dist/iloctl-android-arm64
# or: go build ./cmd/iloctlcmd/iloctl/main.go CLI (power / boot / reboot subcommands)
internal/redfish/ minimal Redfish client (login, GetSystem, Reset, boot options, …)
build.sh cross-build helper
Works against an HPE iLO 5. Minimal, opinionated, no external dependencies.