VMware ESXi 8.0 使用 IPMITool 工具

技术 · 2023-03-15

IPMITool 是一个用于控制服务器 IPMI 系统的开源工具,由于 ESXi 8.0 无法安装社区打包的 VIB 版本,所以需要手动编译二进制文件,再上传到 ESXi 使用。

使用 Ubuntu 18.04 编译:

apt install gcc-multilib libc6-i386 libc6-dev-i386 wget
wget https://github.com/ipmitool/ipmitool/archive/refs/tags/IPMITOOL_1_8_19.zip
unzip IPMITOOL_1_8_19.zip
cd ipmitool-IPMITOOL_1_8_19
./configure CFLAGS=-m64 LDFLAGS=-static
make

上传到 ESXi 8.0 后还需要手动允许第三方二进制文件才可以运行:

esxcli system settings advanced set -o /User/execInstalledOnly -i 0

# 关闭安全策略

esxcli system settings advanced set -o /User/execInstalledOnly -i 1

# 开启安全策略

IPMITool 常用命令:

ipmitool sensor list
# 查看传感器信息

ipmitool lan print
# 查看 ipmi 网络信息

ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddr <IP>
ipmitool lan set 1 netmask <NM>
ipmitool lan set 1 defgw ipaddr <GW>
# 配置静态 IP,可以配置 VLAN,1 代表通道。

ipmitool user list 1
# 查看用户列表

ipmitool user set password 1 <PW>
# 将用户 ID 为 1 的用户配置密码

ipmitool mc reset warm
# 重启 BMC
运维 服务器
Theme Jasmine. 由 Cloudflare 提供 CDN 加速 ICP 20232321