Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iloctl

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).

Language API License

Credentials

iloctl reads them from the environment — never hard-code them:

var meaning
ILO_HOST iLO/BMC host or IP
ILO_USER iLO username
ILO_PASS iLO password

How it works

flowchart LR
    CLI["iloctl &lt;subcommand&gt;<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)"]
Loading

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.

Usage

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 select

The "deterministic" commands deliberately avoid polling/retries: they require a known state (Off) before changing the boot override, so behaviour is reproducible.

Build

./build.sh        # builds dist/iloctl (Linux) and dist/iloctl-android-arm64
# or: go build ./cmd/iloctl

Layout

cmd/iloctl/main.go        CLI (power / boot / reboot subcommands)
internal/redfish/         minimal Redfish client (login, GetSystem, Reset, boot options, …)
build.sh                  cross-build helper

Status

Works against an HPE iLO 5. Minimal, opinionated, no external dependencies.

License

MIT

About

A small Go CLI for HPE iLO 5 BMCs over Redfish: power control and deterministic one-time UEFI boot selection. Builds for Linux and Android (arm64). Credentials via ILO_HOST/ILO_USER/ILO_PASS env vars.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages