梳理所知的auto discovery

目前已知三種:

請LLM幫忙分析的結果

看起來必要條件有幾個:

  1. PXE環境(DHCP+TFTP)
  2. 機器需要設定為network boot
  3. lightweight bootable image,這個image需要以某種方式將硬體資訊回傳至負責的Service(xCAT, MAAS, Foreman),在xCAT內被稱作genesis image,在Foreman被稱為Discovery image

xCAT所使用的程式主要是這一個bmcdiscover,scan_process這個函式內提到了兩個工具:nmap和ipmitool-xcat,nmap看起來是用來取得live_ip,ipmitool-xcat用來取得BMC的mc info

大致操作流程如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
bmcdiscover --range 192.168.62.85-87 -u foo -p bar -z -w
bmcdiscover --range 192.168.62.85-87 -u foo -p bar -z > predefined.stanzas
# edit the predefined.stanzas: change the node name and add the provision ip
cat predefined.stanzas | mkdef -z
nodels
# node-chiikawa-usagi-8888sg-s423750x1408652
# node-chiikawa-usagi-8888sg-s423750x1408664
# node85
# node87
makehosts node85
makehosts node87
rsetboot node-chiikawa-usagi-8888sg-s423750x1408652 net -u
rpower node-chiikawa-usagi-8888sg-s423750x1408652 reset
rsetboot node-chiikawa-usagi-8888sg-s423750x1408664 net -u
rpower node-chiikawa-usagi-8888sg-s423750x1408664 reset

MAAS和Foreman沒有用過,就不細究了