Skip to content

Add Initial Support for iDRAC, iLO, and Supermicro IPMI Power-On Methods#19

Open
CPBPILOT wants to merge 26 commits intohardwarehaven:mainfrom
CPBPILOT:idrac
Open

Add Initial Support for iDRAC, iLO, and Supermicro IPMI Power-On Methods#19
CPBPILOT wants to merge 26 commits intohardwarehaven:mainfrom
CPBPILOT:idrac

Conversation

@CPBPILOT
Copy link

@CPBPILOT CPBPILOT commented Jun 24, 2025

Summary
This pull request adds support for waking systems using vendor-specific out-of-band management interfaces in addition to Wake-on-LAN (WOL). Supported client types now include:

  • wol (existing)
  • idrac (Dell)
  • ilo (HPE)
  • ipmi (IPMI)

What's New

  • ✅ Added a type field to each client in the config to define the wake method (wol, idrac, ilo, sm_ipmi).
  • ✅ Refactored main.py to use a centralized power_on_client() dispatcher function.
  • ✅ Created new handler modules:
  • idrac.py: Redfish-based control with power state checking and retry logic.
  • ilo.py: HPE flavor of Redfish power state checking and retry logic.
  • sm_ipmi.py: Uses ipmitool to send chassis power-on commands.
  • ✅ Enhanced config.py to validate required fields based on client type.

Config Example

clients:
  - name: Server1
    type: wol
    host: 192.168.1.100
    mac: AA:BB:CC:DD:EE:FF

  - name: Server2
    type: idrac
    host: 192.168.1.101
    ipmi_host: 192.168.1.201
    username: root
    password: secret
    verify_ssl: false

  - name: Server3
    type: ilo
    host: 192.168.1.102
    ipmi_host: 192.168.1.202
    username: admin
    password: secret
    verify_ssl: false

  - name: Server4
    type: ipmi
    host: 192.168.1.103
    ipmi_host: 192.168.1.203
    username: admin
    password: secret

Why This Is Useful

  • Covers servers that don’t support traditional WOL.
  • Enables more reliable recovery post-power-outage in mixed environments.
  • Modular architecture makes it easy to add more types (e.g. Cisco CIMC, Lenovo XClarity).

Please forgive me for all of the edit and commits after making the pull request, this is my first real PR

@CPBPILOT CPBPILOT changed the title added Idrac added Idrac server support Jun 24, 2025
@CPBPILOT CPBPILOT changed the title added Idrac server support Add Initial Support for Powering on Dell iDRAC Servers (No WOL) Jun 24, 2025
@CPBPILOT CPBPILOT changed the title Add Initial Support for Powering on Dell iDRAC Servers (No WOL) Add Initial Support for iDRAC, iLO, and Supermicro IPMI Power-On Methods Jun 24, 2025
@CPBPILOT CPBPILOT marked this pull request as ready for review June 24, 2025 19:58
@CPBPILOT CPBPILOT closed this Jun 24, 2025
@CPBPILOT CPBPILOT reopened this Jun 24, 2025
CPBPILOT added 2 commits June 24, 2025 16:10
add config parameter to differentiate between the host ip and the management interface ip
@CPBPILOT CPBPILOT marked this pull request as draft June 25, 2025 03:16
@CPBPILOT CPBPILOT marked this pull request as ready for review June 25, 2025 03:23
CPBPILOT added 4 commits June 25, 2025 12:09
reverted power on logic
Fixed some validation bugs in the config.py and added the verify ssl to the ilo.py
@AnthonyMichaelTDM
Copy link

I think I can make this backwards compatible

@CPBPILOT
Copy link
Author

CPBPILOT commented Jul 8, 2025

I initially tried to do that by have different client sections for each client type "wol_clients idrac_clients, ilo_clients" but decided that unifying the clients and adding the type property would be a better long term solution for adding additional wake up methods besides the 3 I added. I guess you could have the type be optional and it defaults to the type wol

@AnthonyMichaelTDM
Copy link

I think the way forward is with a tagged union, I have an implementation rn just working on testing

@AnthonyMichaelTDM
Copy link

I opened a PR on your fork

@AnthonyMichaelTDM
Copy link

AnthonyMichaelTDM commented Jul 8, 2025

Oh another note, I think the IPMI command you have for Supermicro would work for dell as well since iDRAC supports IPMI over LAN (it's a thing you have to enable, but so is the redfish thing iirc).
this is true for iDRAC 8 enterprise, dunno about other versions since that's all I have

@CPBPILOT
Copy link
Author

CPBPILOT commented Jul 8, 2025

When I originally tested this I didn't have to enable anything to get the idrac clients to work. I believe both of my dells are idrac 9

@AnthonyMichaelTDM
Copy link

I see, maybe it should be named ipmi instead of sm_ipmi to better communicate that it might work with more than just supermicro?

@AnthonyMichaelTDM
Copy link

Also, you can update the pr description since it no longer introduces breaking changes

@CPBPILOT
Copy link
Author

CPBPILOT commented Jul 9, 2025

I see, maybe it should be named ipmi instead of sm_ipmi to better communicate that it might work with more than just supermicro?

Done!

@AnthonyMichaelTDM
Copy link

For reviewers: the reason why I really want this feature added is that ipmi is significantly more reliable than WOL in my experience

@mike-heckman
Copy link
Collaborator

@CPBPILOT

I realize I'm late to the party and you've already had several discussions and done quite a bit of work - are you at all open to a different config layout? Something like:

clients:
  - name: "NAS"
    host: 192.168.1.100
    mac: 00:11:32:ab:cd:ef            # wol is the default and for wol clients mac can be at the root level

  - name: "Database Server"
    host: 192.168.1.101               # IP address or hostname for ping checks
    power:
      type: wol                       # Wake-on-LAN method
      mac: 38:f7:cd:c5:87:6b          # Static MAC address

  - name: "Dell Server"
    host: 192.168.1.102
    power:
      type: idrac
      ipmi_host: 192.168.1.202        # The iDRAC/IPMI IP address
      username: "root"
      password: "your-idrac-password"
      verify_ssl: false               # Optional, defaults to true

  - name: "IPMI Server"  
    host: 192.168.1.103
    power:
      type: ipmi
      ipmi_host: 192.168.1.203       # The IPMI IP address
      username: "admin"
      password: "your-ipmi-password"

  - name: Server3
    host: 192.168.1.104
    power:
      type: ilo
      ipmi_host: 192.168.1.204
      username: admin
      password: secret
      verify_ssl: false

  - name: "Web App Server"
    host: 192.168.1.105
    power:
      type: wol
      mac: auto                       # MAC will be resolved using ARP at runtime

I'm asking because I'm interested in adding some other client based options (monitoring checks and wake dependencies) and this would let me organize the config changes.

@Azelphur
Copy link

Azelphur commented Sep 1, 2025

I'm nothing to do with this, and I'm being super cheeky by asking. But any chance we could get PiKVM and/or arbitrary command support included in this PR? Would be great, as obviously I'm a PiKVM user. No worries if not, and of course and feel free to ignore me :)

@mike-heckman
Copy link
Collaborator

@Azelphur Probably not as part of this pull request, but it could be added separately. Would you open an issue with a description of what you're looking for?

@AnthonyMichaelTDM
Copy link

@CPBPILOT

I realize I'm late to the party and you've already had several discussions and done quite a bit of work - are you at all open to a different config layout? Something like:

clients:
  - name: "NAS"
    host: 192.168.1.100
    mac: 00:11:32:ab:cd:ef            # wol is the default and for wol clients mac can be at the root level

  - name: "Database Server"
    host: 192.168.1.101               # IP address or hostname for ping checks
    power:
      type: wol                       # Wake-on-LAN method
      mac: 38:f7:cd:c5:87:6b          # Static MAC address

  - name: "Dell Server"
    host: 192.168.1.102
    power:
      type: idrac
      ipmi_host: 192.168.1.202        # The iDRAC/IPMI IP address
      username: "root"
      password: "your-idrac-password"
      verify_ssl: false               # Optional, defaults to true

  - name: "IPMI Server"  
    host: 192.168.1.103
    power:
      type: ipmi
      ipmi_host: 192.168.1.203       # The IPMI IP address
      username: "admin"
      password: "your-ipmi-password"

  - name: Server3
    host: 192.168.1.104
    power:
      type: ilo
      ipmi_host: 192.168.1.204
      username: admin
      password: secret
      verify_ssl: false

  - name: "Web App Server"
    host: 192.168.1.105
    power:
      type: wol
      mac: auto                       # MAC will be resolved using ARP at runtime

I'm asking because I'm interested in adding some other client based options (monitoring checks and wake dependencies) and this would let me organize the config changes.

That seems reasonable

@CPBPILOT
Copy link
Author

@mike-heckman

@CPBPILOT
I realize I'm late to the party and you've already had several discussions and done quite a bit of work - are you at all open to a different config layout? Something like:

clients:
  - name: "NAS"
    host: 192.168.1.100
    mac: 00:11:32:ab:cd:ef            # wol is the default and for wol clients mac can be at the root level

  - name: "Database Server"
    host: 192.168.1.101               # IP address or hostname for ping checks
    power:
      type: wol                       # Wake-on-LAN method
      mac: 38:f7:cd:c5:87:6b          # Static MAC address

  - name: "Dell Server"
    host: 192.168.1.102
    power:
      type: idrac
      ipmi_host: 192.168.1.202        # The iDRAC/IPMI IP address
      username: "root"
      password: "your-idrac-password"
      verify_ssl: false               # Optional, defaults to true

  - name: "IPMI Server"  
    host: 192.168.1.103
    power:
      type: ipmi
      ipmi_host: 192.168.1.203       # The IPMI IP address
      username: "admin"
      password: "your-ipmi-password"

  - name: Server3
    host: 192.168.1.104
    power:
      type: ilo
      ipmi_host: 192.168.1.204
      username: admin
      password: secret
      verify_ssl: false

  - name: "Web App Server"
    host: 192.168.1.105
    power:
      type: wol
      mac: auto                       # MAC will be resolved using ARP at runtime

I'm asking because I'm interested in adding some other client based options (monitoring checks and wake dependencies) and this would let me organize the config changes.

That seems reasonable

Sorry its taken so long to get back to you. I think that would be fine, I'll have to look at how to integrate that and fix the new change you made to the original repo. I just be honest most of this was done with some vibe coding and then testing to get it to work. So my knowledge is limited.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments