0

如何从 openBMC romulus 映像运行 IPMI 工具。根据教程,我成功地运行了 Hello World 程序。我想将 IPMI 工具命令从 romulus 运行到另一台服务器的 BMC。有什么方法可以做到这一点吗?由于不包括 ipmitool 命令。有什么方法可以将它包含在 romulus Image 中。

4

2 回答 2

2

ipmitool 实际上是为了在 BMC 之外使用来控制它。因此,在大多数用例中,您在计算机上安装 ipmitool 包(sudo apt install ipmitool),然后使用它与服务器通信。

IE:

ipmitool -I lanplus -U root -H <server> -P <password> chassis power status

如果您使用的是 QEMU,那么我相信您需要 hostfwd 端口 623 才能正常工作。不过,我个人之前还没有让 ipmitool 与 QEMU 会话交谈。

如果你真的想要 ipmitool 在你的 BMC 图像中,那么你可以将它作为 RDEPENDS 添加到包组文件中,类似于 facebook 在https://github.com/openbmc/meta-facebook/blob/master/meta-tiogapass/中所做的操作食谱-fbtp/packagegroups/packagegroup-fb-apps.bb

于 2020-03-04T16:42:01.500 回答
2

与其他一些 OpenBMC 平台一样,Romulus 中没有 ipmitool 的 OpenBMC 固件映像;并非所有平台都有 SPI FLASH 空间提供许多实用程序。您可以使用 ipmitool 从远程机器到如下所示的 Romulus。

ipmitool -I lanplus -C 17 -p 623 -U root -H <server> -P <password> bmc info

或者

ipmitool -I lanplus -C 17 -p 623 -U root -H <server> -P <password> raw 0x06 0x01

我选择将 -C 17 用于密码套件 17,因为 ipmitool 默认使用密码套件 3,并且出于安全原因,现代平台已弃用密码套件 3。密码套件 3 和 17 是最后 2 个具有任何安全强度的套件,而 17 是更强的(不要认为是强),现在套件 3 被认为是弱的。

以下是 ipmitool 命令:

usage: ipmitool [options...] <command>
       -h             This help
       -V             Show version information
       -v             Verbose (can use multiple times)
       -c             Display output in comma separated format
       -d N           Specify a /dev/ipmiN device to use (default=0)
       -I intf        Interface to use
       -H hostname    Remote host name for LAN interface
       -p port        Remote RMCP port [default=623]
       -U username    Remote session username
       -f file        Read remote session password from file
       -z size        Change Size of Communication Channel (OEM)
       -S sdr         Use local file for remote SDR cache
       -D tty:b[:s]   Specify the serial device, baud rate to use
                      and, optionally, specify that interface is the system one
       -4             Use only IPv4
       -6             Use only IPv6
       -a             Prompt for remote password
       -Y             Prompt for the Kg key for IPMIv2 authentication
       -e char        Set SOL escape character
       -C ciphersuite Cipher suite to be used by lanplus interface
       -k key         Use Kg key for IPMIv2 authentication
       -y hex_key     Use hexadecimal-encoded Kg key for IPMIv2 authentication
       -L level       Remote session privilege level [default=ADMINISTRATOR]
                      Append a '+' to use name/privilege lookup in RAKP1
       -A authtype    Force use of auth type NONE, PASSWORD, MD2, MD5 or OEM
       -P password    Remote session password
       -E             Read password from IPMI_PASSWORD environment variable
       -K             Read kgkey from IPMI_KGKEY environment variable
       -m address     Set local IPMB address
       -b channel     Set destination channel for bridged request
       -t address     Bridge request to remote target address
       -B channel     Set transit channel for bridged request (dual bridge)
       -T address     Set transit address for bridge request (dual bridge)
       -l lun         Set destination lun for raw commands
       -o oemtype     Setup for OEM (use 'list' to see available OEM types)
       -O seloem      Use file for OEM SEL event descriptions
       -N seconds     Specify timeout for lan [default=2] / lanplus [default=1] interface
       -R retry       Set the number of retries for lan/lanplus interface [default=4]

Interfaces:
        open          Linux OpenIPMI Interface [default]
        lan           IPMI v1.5 LAN Interface
        lanplus       IPMI v2.0 RMCP+ LAN Interface
        serial-terminal  Serial Interface, Terminal Mode
        serial-basic  Serial Interface, Basic Mode

Commands:
        raw           Send a RAW IPMI request and print response
        i2c           Send an I2C Master Write-Read command and print response
        spd           Print SPD info from remote I2C device
        lan           Configure LAN Channels
        chassis       Get chassis status and set power state
        power         Shortcut to chassis power commands
        event         Send pre-defined events to MC
        mc            Management Controller status and global enables
        sdr           Print Sensor Data Repository entries and readings
        sensor        Print detailed sensor information
        fru           Print built-in FRU and scan SDR for FRU locators
        gendev        Read/Write Device associated with Generic Device locators sdr
        sel           Print System Event Log (SEL)
        pef           Configure Platform Event Filtering (PEF)
        sol           Configure and connect IPMIv2.0 Serial-over-LAN
        tsol          Configure and connect with Tyan IPMIv1.5 Serial-over-LAN
        isol          Configure IPMIv1.5 Serial-over-LAN
        user          Configure Management Controller users
        channel       Configure Management Controller channels
        session       Print session information
        dcmi          Data Center Management Interface
        nm            Node Manager Interface
        sunoem        OEM Commands for Sun servers
        kontronoem    OEM Commands for Kontron devices
        picmg         Run a PICMG/ATCA extended cmd
        fwum          Update IPMC using Kontron OEM Firmware Update Manager
        firewall      Configure Firmware Firewall
        delloem       OEM Commands for Dell systems
        shell         Launch interactive IPMI shell
        exec          Run list of commands from file
        set           Set runtime variable for shell and exec
        hpm           Update HPM components using PICMG HPM.1 file
        ekanalyzer    run FRU-Ekeying analyzer using FRU files
        ime           Update Intel Manageability Engine Firmware
        vita          Run a VITA 46.11 extended cmd
        lan6          Configure IPv6 LAN Channels
于 2021-03-25T01:23:36.030 回答