赞
踩
记录一下在centos7.9操作系统上部署ipmitool环境。
使用物理机部署ipmitool环境
# 安装相关软件
yum install -y OpenIPMI ipmitool
#检查安装结果
ipmitool -V
modprobe ipmi_watchdog
modprobe ipmi_poweroff
modprobe ipmi_devintf
modprobe ipmi_msghandler
modprobe ipmi_si
systemctl start ipmievd.service
systemctl status ipmievd.service
正常输出
[root@node01 ~]# systemctl status ipmievd.service
● ipmievd.service - Ipmievd Daemon
Loaded: loaded (/usr/lib/systemd/system/ipmievd.service; enabled; vendor preset: enabled)
Active: active (running) since 一 2023-03-27 16:42:05 CST; 23h ago
Process: 2644 ExecStart=/usr/sbin/ipmievd $IPMIEVD_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 2645 (ipmievd)
CGroup: /system.slice/ipmievd.service
└─2645 /usr/sbin/ipmievd sel daemon pidfile=/var/run/ipmievd.pid
3月 27 16:42:05 node01 systemd[1]: Starting Ipmievd Daemon...
3月 27 16:42:05 node01 ipmievd[2645]: Reading sensors...
3月 27 16:42:05 node01 systemd[1]: Started Ipmievd Daemon.
3月 27 16:42:06 node01 ipmievd[2645]: Waiting for events...
ipmitool mc info
ipmitool lan print
# 查看对应机器的电源状态
ipmitool -H xxx.xxx.xxx.xxx -I lanplus -U AD***** -P AD***** power status
输出
[root@node01 ~]# ipmitool mc info Device ID : 32 Device Revision : 1 Firmware Revision : 1.71 IPMI Version : 2.0 Manufacturer ID : 10876 Manufacturer Name : Supermicro Product ID : 2327 (0x0917) Product Name : Unknown (0x917) Device Available : yes Provides Device SDRs : no Additional Device Support : Sensor Device SDR Repository Device SEL Device FRU Inventory Device IPMB Event Receiver IPMB Event Generator Chassis Device Aux Firmware Rev Info : 0x11 0x00 0x00 0x00 [root@node01 ~]# ipmitool lan print Set in Progress : Set Complete Auth Type Support : NONE MD2 MD5 PASSWORD Auth Type Enable : Callback : MD2 MD5 PASSWORD : User : MD2 MD5 PASSWORD : Operator : MD2 MD5 PASSWORD : Admin : MD2 MD5 PASSWORD : OEM : MD2 MD5 PASSWORD IP Address Source : Static Address IP Address : 192.168.150.xxx Subnet Mask : 255.255.255.0 MAC Address : 3c:ec:ef:xx:xx:xx SNMP Community String : public IP Header : TTL=0x00 Flags=0x00 Precedence=0x00 TOS=0x00 BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled Default Gateway IP : 192.168.150.254 Default Gateway MAC : 00:00:00:00:00:00 Backup Gateway IP : 0.0.0.0 Backup Gateway MAC : 00:00:00:00:00:00 802.1q VLAN ID : Disabled 802.1q VLAN Priority : 0 RMCP+ Cipher Suites : 1,2,3,6,7,8,11,12 Cipher Suite Priv Max : XaaaXXaaaXXaaXX : X=Cipher Suite Unused : c=CALLBACK : u=USER : o=OPERATOR : a=ADMIN : O=OEM Bad Password Threshold : 3 Invalid password disable: yes Attempt Count Reset Int.: 300 User Lockout Interval : 300 [root@node01 ~]# ipmitool -H 192.168.150.xxx -I lanplus -U ADMIN -P ADMIN12#$ power status Chassis Power is on
使用虚拟机部署ipmitool环境
# 安装相关软件
yum install -y OpenIPMI ipmitool
#检查安装结果
ipmitool -V
安装没有报错
modprobe ipmi_watchdog
modprobe ipmi_poweroff
modprobe ipmi_devintf
modprobe ipmi_msghandler
modprobe ipmi_si
出现报错
modprobe: ERROR: could not insert 'ipmi_si': No such device
systemctl start ipmievd.service
systemctl status ipmievd.service
异常输出
[root@XXXX ~]# systemctl start ipmievd.service
Job for ipmievd.service failed because the control process exited with error code. See "systemctl status ipmievd.service" and "journalctl -xe" for details.
[root@nginx ~]# systemctl status ipmievd.service
● ipmievd.service - Ipmievd Daemon
Loaded: loaded (/usr/lib/systemd/system/ipmievd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since 四 2024-06-13 15:46:38 CST; 25ms ago
Process: 4516 ExecStart=/usr/sbin/ipmievd $IPMIEVD_OPTIONS (code=exited, status=1/FAILURE)
6月 13 15:46:38 nginx systemd[1]: Starting Ipmievd Daemon...
6月 13 15:46:38 nginx ipmievd[4516]: Could not open device at /dev/ipmi0 or /dev/ipmi/0...ory
6月 13 15:46:38 nginx systemd[1]: ipmievd.service: control process exited, code=exited ...s=1
6月 13 15:46:38 nginx systemd[1]: Failed to start Ipmievd Daemon.
6月 13 15:46:38 nginx systemd[1]: Unit ipmievd.service entered failed state.
6月 13 15:46:38 nginx systemd[1]: ipmievd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
检查message日志文件,存在以下提示
Jun 13 15:46:28 nginx kernel: ipmi_si: Unable to find any System Interface(s)
Jun 13 15:46:38 nginx systemd: Starting Ipmievd Daemon...
Jun 13 15:46:38 nginx ipmievd: Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
经过对比,物理机上存在这个设备,虚拟机上没有。
# 物理机执行结果 ll /dev/ipmi0 crw------- 1 root root 240, 0 Jun 11 11:21 /dev/ipmi0 # 使用命令检查ipmi设备 dmidecode |grep -iA6 ipmi IPMI Device Information Interface Type: KCS (Keyboard Control Style) Specification Version: 2.0 I2C Slave Address: 0x10 NV Storage Device: Not Present Base Address: 0x0000000000000CA2 (I/O) Register Spacing: Successive Byte Boundaries # 虚拟机执行结果 ll /dev/ipmi0 ls: 无法访问/dev/ipmi0: 没有那个文件或目录 # 使用命令检查ipmi设备,返回值为空 dmidecode |grep -iA6 ipmi
先记录下物理机上的部署过程,初步调试虚拟机上还是有点问题的
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。