IPMI设置与使用(远程控制服务器)
如果服務(wù)器crash了或者就hang住了,我們不必要跑到機房去按電源鍵的,因為我們也想“運籌帷幄之中,決勝千里之外”嘛。我們可以用IPMI,它可以讓我們遠程用一條命令開啟(關(guān)閉、重啟)一臺服務(wù)器,也可以檢查服務(wù)器的狀態(tài)。
IPMI簡介:from wikipedia
TheIntelligent Platform Management Interface (IPMI)is a standardized computer system interface used by system administrators to manage a computer system and monitor its operation.
The development of this interface specification was led by Intel Corporation and is supported by more than two hundred computer systems vendors.[1]. Dell, Hewlett-Packard, Intel, and NEC Corporation announced IPMI v1.0 on 1998-09-16, v1.5 on 2001-03-01, and v2.0 on 2004-02-14.
Thebaseboard management controller(BMC)is the intelligence in the IPMI architecture. It is a specialized microcontroller embedded on the motherboard of a computer, generally a server. The BMC manages the interface between system management software and platform hardware.
Different types of sensors built into the computer system report to the BMC on parameters such as temperature, cooling fan speeds, power status, operating system (OS) status, etc.
服務(wù)器端IPMI的配置:
我目前測試SNB-EP平臺的機器,可以直接在BIOS中設(shè)置IPMI即可,都不必到OS中去進行設(shè)置了.(盡量將第一個網(wǎng)絡(luò)接口插上網(wǎng)線,有人說是通過第一個網(wǎng)口來控制的,這個我不確定。)
開啟服務(wù)器,按F2進入BIOS,選擇:Server ManagementàBMC LAN Configuration激活I(lǐng)PMI。
可以IP地址,比如改為192.168.111.111,子網(wǎng)掩碼:255.255.0.0(當(dāng)然也可以設(shè)置為dynamic動態(tài)獲取IP)。
在下面User configuration設(shè)置中Enable一些user,將有管理權(quán)限的用戶enable起來,也可以設(shè)置管理密碼、修改用戶名等工作。
設(shè)置好后,就reboot系統(tǒng),在局域網(wǎng)中另外的系統(tǒng)上ping一下剛才設(shè)置的IP 192.168.111.111,看看通不通,如果ping不通,可以試試去將server的電源線拔掉,并按開機安按鈕讓其放電,然后再重新插上電源線,開機。(我就遇到這樣的問題)
對于不能再BIOS中直接enable BMC user的機器,可以先將BMC的IP什么的設(shè)好(這時在子網(wǎng)中應(yīng)該能ping通BMC的IP了),然后到linux操作系統(tǒng)中進行一些額外的設(shè)置。
load impi drivers:
modprobe ipmi_msghandler
modprobe ipmi_devintf
modprobe ipmi_si
install ipmitool: maybe use rpm package to install
ipmitool lan print 1# to find the LAN channel
configure IP address setting:
dynamic:ipmitool lan set 1 ipsrc dhcp
static :
# ipmitool lan set 1 ipaddr 192.168.111.111
# ipmitool lan set 1 netmask 255.255.0.0
# ipmitool lan set 1 defgw ipaddr 192.168.0.1
Establish an administration account with username and password.
Set BMC to require password authentication for ADMIN access over LAN. For example:
# ipmitool lan set 1 auth ADMIN MD5,PASSWORD
List the account slots on the BMC and identify an unused slot:
# ipmitool channel getaccess 1
Assign the administrator user name and password and enable messaging for the identified slot.
# ipmitool user set name 4 myuser
# ipmitool user set password 4 mypassword
# ipmitool user enable 4
# ipmitool channel setaccess 1 4 callin=off ipmi=on link=on privilege=4
Verify the setup after you complete configuration using the command ipmitool lan print.
# ipmitool lan print 1
# ipmitool channel getaccess 1 4
在客戶端的IPMI遠程操作:
在遠程操作的機器上也需要安裝impitool,然后通過一些命令來操作被控制的機器。
# ipmitool -H yourIP -U myuser -P mypassword power status(查看服務(wù)器的電源狀態(tài))
# ipmitool -H yourIP -U myuser -P mypassword power reset(關(guān)閉電源并重啟機器)
# ipmitool -H yourIP -U myuser -P mypassword power on(開電源啟動機器)
# ipmitool -H yourIP -U myuser -P mypassword power on(關(guān)閉電源)
# ipmitool -H 192.168.12.84 -I lanplus -U test -P 123456 sdr type Temperature(服務(wù)器溫度)
其他更多功能,可以man ipmitool
一些參考資料:
http://wiki.adamsweet.org/doku.php?id=ipmi_on_linux
http://www.6curl.com/ipmi-config-error/
http://www.ibm.com/developerworks/cn/linux/l-ipmi/index.html
http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaai%2Fipmi%2Fliaaiipmipassword.htm
總結(jié)
以上是生活随笔為你收集整理的IPMI设置与使用(远程控制服务器)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 重拳出击!2022年关闭537万个水军账
- 下一篇: 799 元:小米 米家扫拖机器人 1T