HP自己封装了一个iLO,底层还是ipmi,iLO2在linux只有fence命令支持,或者用web界面!
安装fence和cman软件包,光盘里没有,我整理了下rpm做了个源
# cat > /etc/yum.repos.d/fence.repo << _Longgeek_
[fence]
name=Fence Repo
baseurl=http://download.longgeek.com/Cman_Fence/
gpgcheck=0
_Longgeek_
安装fence-agents和cman
# yum -y install fence* cman
# fence_ilo -h
Usage:
fence_ilo [options]
Options:
-o, --action=<action> Action: status, reboot (default), off or on
-a, --ip=<ip> IP address or hostname of fencing device
-l, --username=<name> Login name
-p, --password=<password> Login password or passphrase
-S, --password-script=<script> Script to run to retrieve password
-z, --ssl Use ssl connection
-r, --ribcl-version=<version> Force ribcl version to use
-4, --inet4-only Forces agent to use IPv4 addresses only
-6, --inet6-only Forces agent to use IPv6 addresses only
-u, --ipport=<port> TCP port to use
-v, --verbose Verbose mode
-D, --debug-file=<debugfile> Debugging to output file
-V, --version Output version information and exit
-h, --help Display this help and exit
--power-timeout <seconds> Test X seconds for status change after ON/OFF
--shell-timeout <seconds> Wait X seconds for cmd prompt after issuing command
--login-timeout <seconds> Wait X seconds for cmd prompt after login
--power-wait <seconds> Wait X seconds after issuing ON/OFF
--delay <seconds> Wait X seconds before fencing is started
--retry-on <attempts> Count of attempts to retry power on
控制开关机
# fence_ilo -a 172.16.0.221 -l Administrator -p FW2363V8 -o reboot 重启(默认)
fence_ilo -a 172.16.0.221 -l Administrator -p FW2363V8 -o off 关机
fence_ilo -a 172.16.0.221 -l Administrator -p FW2363V8 -o on 开机
在cobbler中也支持iLO,看了下官方的wiki,基本上所有的都支持。
配置让cobbler能管理节点的电源
# cobbler system edit --name www.longgeek.com --power-type=ilo --power-address=172.16.0.221 --power-user Administrator --power-pass FW2363V8
# cobbler system poweroff --name www.longgeek.com
# cobbler system poweron --name www.longgeek.com
# cobbler system reboot --name www.longgeek.com
看了一下cobbler的官方wiki,有个�Cnetboot-enabled选项,机器第一启动项是网络启动的情况下,只要pxe完操作系统,重启的时候加载cfg文件网络引导改成本地硬盘启动,这样就避免了反复的pxe。
# cobbler system edit --name www.longgeek.com --netboot-enabled=1
# cobbler sync