ipmi

Created 星期六 26 三月 2016

安装加载

apt-get install openipmi ipmitool -y
modprobe ipmi_msghandler
modprobe ipmi_devintf
modprobe ipmi_si
modprobe ipmi_poweroff
modprobe ipmi_watchdog

常用操作

设置pxe 启动

ipmitool -H 10.89.155.172 -U ADMIN chassis bootdev pxe

重启设备

ipmitool -H 10.89.155.172 -U ADMIN power reset

设置ip信息

ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddr 192.168.100.2
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw ipaddr 192.168.100.254

初始批量脚本

#!/bin/bash
for i in `cat 59-ipmi.txt`; 
do 
ipmitool -I lanplus -H $i -U root -P 'Huawei12#$' chassis bootdev pxe
ipmitool -I lanplus -H $i -U root -P 'Huawei12#$' power reset
done

光驱挂载

ipmcset -t vmm -d connect -v nfs://<NFS SERVER IP>/<NFS PATH>/<iso NAME>.iso