Skip to content

Introduce metal-bmc to the mini-lab - #329

Draft
Gerrit91 wants to merge 4 commits into
masterfrom
metal-bmc
Draft

Introduce metal-bmc to the mini-lab#329
Gerrit91 wants to merge 4 commits into
masterfrom
metal-bmc

Conversation

@Gerrit91

@Gerrit91 Gerrit91 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Description

Closes #328.

For now this is just playing around to find out the problems.

Depends on:

Used AI-Tools ✨

  • None used for generation

@Gerrit91

Copy link
Copy Markdown
Contributor Author

Currently go-hal errors out because there is no default IPMI implementation and it wants to access Redfish:

Aug 24 17:28:12 leaf01 docker[29125]: {"time":"2026-08-24T17:28:12.259603908+02:00","level":"ERROR","msg":"could not establish outband connection to device bmc","mac":"1a:8e:cc:99:a9:28","ip":"172.42.0.5","err":"unable to establish redfish connection for ip:172.42.0.5 user:ADMIN error:Get \"https://172.42.0.5/redfish/v1/\": dial tcp 172.42.0.5:443: connect: connection refused"}
Aug 24 17:28:12 leaf01 docker[29125]: {"time":"2026-08-24T17:28:12.259672969+02:00","level":"ERROR","msg":"could not enrich all ipmi details","error":"unable to establish redfish connection for ip:172.42.0.6 user:ADMIN error:Get \"https://172.42.0.6/redfish/v1/\": dial tcp 172.42.0.6:443: connect: connection refused"}

@majst01

majst01 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Currently go-hal errors out because there is no default IPMI implementation and it wants to access Redfish:

Aug 24 17:28:12 leaf01 docker[29125]: {"time":"2026-08-24T17:28:12.259603908+02:00","level":"ERROR","msg":"could not establish outband connection to device bmc","mac":"1a:8e:cc:99:a9:28","ip":"172.42.0.5","err":"unable to establish redfish connection for ip:172.42.0.5 user:ADMIN error:Get \"https://172.42.0.5/redfish/v1/\": dial tcp 172.42.0.5:443: connect: connection refused"}
Aug 24 17:28:12 leaf01 docker[29125]: {"time":"2026-08-24T17:28:12.259672969+02:00","level":"ERROR","msg":"could not enrich all ipmi details","error":"unable to establish redfish connection for ip:172.42.0.6 user:ADMIN error:Get \"https://172.42.0.6/redfish/v1/\": dial tcp 172.42.0.6:443: connect: connection refused"}

Maybe this could help: https://docs.openstack.org/sushy-tools/latest/user/dynamic-emulator.html and https://docs.airshipit.org/airshipctl/virtual_redfish_bmc.html

@Gerrit91

Gerrit91 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Instead of using Redfish I used a generic IPMI fallback: metal-stack/go-hal#94

With this now the machines can be reported by the metal-bmc containing FRU info and more. Power commands also work.

Unfortunately, when the machine boots, the metal-hammer destroys the working IPMI connection details with some hard-coded data coming from the days back when we used vagrant: https://github.com/metal-stack/metal-hammer/blob/83a0aa531b5f6a24a87927cae2dbf82597cc1295/cmd/register/register.go#L339-L344. So, this should be looked at next.

❯ m machine ipmi
ID                                           POWER  IP               MAC                BOARD PART NUMBER  BIOS  BMC   SIZE          PARTITION  RACK       UPDATED  
00000000-0000-0000-0000-000000000001  ❗ ⭕  ⏻      172.42.0.6:6295  00:00:00:00:00:00  MINI-LAB-B1        0     9.08  v1-small-x86  mini-lab   test-rack  56s ago  
00000000-0000-0000-0000-000000000002  💀 ⭕  ⏾      172.42.0.5:6260  00:00:00:00:00:00  MINI-LAB-B1        0     9.08  v1-small-x86  mini-lab   test-rack  56s ago  

❯ m machine ipmi 00000000-0000-0000-0000-000000000001 -o json | jq .ipmi 
{
  "address": "172.42.0.6:6295",
  "bmcversion": "9.08",
  "fru": {
    "board_mfg": "metal-stack",
    "board_part_number": "MINI-LAB-B1",
    "chassis_part_number": "MINI-LAB-C12345",
    "chassis_part_serial": "MINI-LAB-CHASSIS-1",
    "product_manufacturer": "metal-stack",
    "product_part_number": "MINI-LAB-P1",
    "product_serial": "MINI-LAB-12345"
  },
  "interface": "lanplus",
  "last_updated": "2026-08-25T08:50:57.766Z",
  "mac": "00:00:00:00:00:00",
  "password": "vagrant",
  "powermetric": null,
  "powerstate": "ON",
  "powersupplies": null,
  "user": "vagrant"
}

@majst01

majst01 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Instead of using Redfish I used a generic IPMI fallback: metal-stack/go-hal#94

With this now the machines can be reported by the metal-bmc containing FRU info and more. Power commands also work.

Unfortunately, when the machine boots, the metal-hammer destroys the working IPMI connection details with some hard-coded data coming from the days back when we used vagrant: https://github.com/metal-stack/metal-hammer/blob/83a0aa531b5f6a24a87927cae2dbf82597cc1295/cmd/register/register.go#L339-L344. So, this should be looked at next.

❯ m machine ipmi
ID                                           POWER  IP               MAC                BOARD PART NUMBER  BIOS  BMC   SIZE          PARTITION  RACK       UPDATED  
00000000-0000-0000-0000-000000000001  ❗ ⭕  ⏻      172.42.0.6:6295  00:00:00:00:00:00  MINI-LAB-B1        0     9.08  v1-small-x86  mini-lab   test-rack  56s ago  
00000000-0000-0000-0000-000000000002  💀 ⭕  ⏾      172.42.0.5:6260  00:00:00:00:00:00  MINI-LAB-B1        0     9.08  v1-small-x86  mini-lab   test-rack  56s ago  

❯ m machine ipmi 00000000-0000-0000-0000-000000000001 -o json | jq .ipmi 
{
  "address": "172.42.0.6:6295",
  "bmcversion": "9.08",
  "fru": {
    "board_mfg": "metal-stack",
    "board_part_number": "MINI-LAB-B1",
    "chassis_part_number": "MINI-LAB-C12345",
    "chassis_part_serial": "MINI-LAB-CHASSIS-1",
    "product_manufacturer": "metal-stack",
    "product_part_number": "MINI-LAB-P1",
    "product_serial": "MINI-LAB-12345"
  },
  "interface": "lanplus",
  "last_updated": "2026-08-25T08:50:57.766Z",
  "mac": "00:00:00:00:00:00",
  "password": "vagrant",
  "powermetric": null,
  "powerstate": "ON",
  "powersupplies": null,
  "user": "vagrant"
}

All vagrant relicts should be removed.

@Gerrit91

Gerrit91 commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

So, with an additional inband IPMI fallback and changes for vendor and board detection, it appears to work just fine. The metal-hammer kernel already has ipmi_sim modules loaded, so it can use a local IPMI device without requiring vagrant fake data anymore. It can also create the metal user.

I also tried to ipmitool sol activate against the created metal user, which works, too. So as a second step adding metal-console should also be able to work properly.

@Gerrit91 Gerrit91 changed the title Metal bmc Introduce metal-bmc to the mini-lab Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

☂️ Improve virtual BMC emulation

2 participants