操作目的

设备未接入带外管理口,无法从远端获取到设备硬件的健康状态。利用ipmitool工具获取服务器硬件的健康状态,并提供相应接口信息给zabbix服务,实现实时监控设备硬件健康的目的。

操作对象

| 服务器型号| 系统版本 |
| --- | --- |
| Cisco R210 | VMware ESXi, 6.5.0, 8294253|

操作准备

下载ipmitool工具

ipmitool-esxi-vib-1.8.11-2.zip

上传ipmitool工具

通过scp或者winscp方式上传到ESXi主机

ipmitool工具md5信息

解压zip包以后,你会得到如下文件:

ipmitool-1.8.11-2-offline_bundle.zip - offline bundle for Update Manager or ISO customization.
ipmitool-1.8.11-2.x86_64.vib - standalone VIB for CLI installation
readme.txt - installation instructions and examples

MD5 checksums

ipmitool-esxi-vib-1.8.11-2.zip = 444af4ce1dc68418583dba2926093980
ipmitool-1.8.11-2-offline_bundle.zip = 44cb77cc8bd7f969b8e74eb33aec8d71
ipmitool-1.8.11-2.x86_64.vib = 173db5b9f205d9c10d9458ff76d8954b

安装VIB的步骤如下

  1. 更改ESXi主机软件接受级别设置为【CommunitySupported】
[root@esx-e1:~] esxcli software acceptance set --level=CommunitySupported
Host acceptance level changed to 'CommunitySupported'.
  1. 使用如下指令进行安装
[root@esx-e1:~] esxcli software vib install -v /tmp/ipmitool-1.8.11-2.x86_64.vib
Installation Result
Message: Operation finished successfully.
Reboot Required: false
VIBs Installed: ipmitool_bootbank_ipmitool_1.8.11-2
VIBs Removed:
VIBs Skipped:

备注:如果安装提示,可以加上【–no-sig-check】参数

  1. 验证ipmitool工具的安装结果
[root@esx-e1:~] /opt/ipmitool/ipmitool
No command provided!
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
<snip>

也可以通过运行以下命令验证VIB的安装

[root@esx-e1:~] esxcli software vib get -n ipmitool
   ipmitool_bootbank_ipmitool_1.8.11-2
   Name: ipmitool
   Version: 1.8.11-2
   Type: bootbank
   Vendor: ipmitool
   Acceptance Level: CommunitySupported
   Summary: ipmitool 1.8.11 CLI utility
   Description: Used for managing IPMI baseboard controllers on the host.
   ReferenceURLs: kb|https://vswitchzero.com/ipmitool-vib
   Creation Date: 2019-08-20
   Depends:
   Conflicts:
   Replaces:
   Provides:
   Maintenance Mode Required: False
   Hardware Platforms Required:
   Live Install Allowed: True
   Live Remove Allowed: True
   Stateless Ready: True
   Overlay: False
   Tags: ipmi, tool, utility
   Payloads: ipmitool
  1. 可执行文件的路径
[root@esx-e1:~] ls -lha /opt/ipmitool/ipmitool
-r-xr-xr-x    1 root     root      787.6K Aug 20 16:00 /opt/ipmitool/ipmitool
  1. 卸载ipmitool工具
[root@esx-e1:~] esxcli software vib remove -n ipmitool
Removal Result
Message: Operation finished successfully.
Reboot Required: false
VIBs Installed:
VIBs Removed: ipmitool_bootbank_ipmitool_1.8.11-1
VIBs Skipped:

以上操作不需要重启操作系统 如果可执行文件不存在,您可以验证它是否已成功删除。

[root@esx-e1:/tmp] ls -lha /opt/ipmitool/ipmitool
ls: /opt/ipmitool/ipmitool: No such file or directory
最后修改:2021 年 05 月 12 日 02 : 18 PM
如果觉得我的文章对你有用,请随意赞赏