天天看点

How to Use ipmitool to remote access SuperMicro Server

Use ipmitool to remotely control Server 

Dependence

Assume we need access remote server from local machine, following package and configuration should be matched on them individually. 

(following command are based on the SuperMicro X10 2U server, Host IP of the two servers are 192.168.1.114 and 192.168.1.115 respectively)

On local machine and remote server: install ipmitool.x86_64

Maybe you can run “yum install ipmitool.x86_64” to install it.

On remote server: we need set BMC LAN IP firstly.

Take remote server 192.168.1.114 for example:

ipmitool LAN set 1 ipaddr 192.168.1.80

Enable BMC LAN access:

ipmitool channel info

ipmitool channel info 1

ipmitool user list 1

ipmitool user enable 3

ipmitool channel setaccess 1 3 callin=on ipmi=on link=on privilege=4

Add BMC user name and password for LAN access:

ipmitool user priv 3 4 1

ipmitool user name 3 admin

ipmitool user set name 3 admin

ipmitool user set password 3 admin

Besides above, remote server's BMC and local machine should connect to same local network, then you can access remote server's BMC through LAN interface.

Frequent Usage

on local machine to access remote server:

access remote server's console, for example to access 192.168.1.64's console:

ipmitool -I lanplus -H 192.168.1.80 -U admin -P admin sol activate 

To access 192.168.1.65's console:

ipmitool -I lanplus -H 192.168.1.95 -U admin -P admin sol activate 

Control remote server to reset, power down or power cycle:

Take control 192.168.1.64 for example, 

ipmitool -I lanplus -H 192.168.1.80 -U admin -P admin chassis power reset;  # reset 192.168.1.64 

ipmitool -I lanplus -H 192.168.1.80 -U admin -P admin chassis power on;  # power on 192.168.1.64 

ipmitool -I lanplus -H 192.168.1.80 -U admin -P admin chassis power cycle;  # power off 192.168.1.64 for 1s then power it on;

ipmitool -I lanplus -H 192.168.1.80 -U admin -P admin chassis power off;  # power off 192.168.1.64 

ipmitool -I lanplus -H 192.168.1.80 -U admin -P admin sel elist;  # get System event log on 192.168.1.64

Control remote server from its peer node

Besides the common LAN interface to access remote node, SuperMicro's X10DRS server provides local BMC the ability to access its peer node. Take 192.168.1.64 and its peer node 192.168.1.65 for example, user can tell peer node to reset/power off/power cycle on local node. Following commands are frequently used:

ipmitool raw 0x30 0x70 0x21 0x0 # power reset peer node

ipmitool raw 0x30 0x70 0x21 0x1 # immediately power off peer node

ipmitool raw  0x30 0x70 0x21 0x2 # orderly power off peer node

ipmitool raw  0x30 0x70 0x21 0x3 # power on peer node

ipmitool raw  0x30 0x70 0x21 0x4 #  power cycle peer node

本文转自存储之厨51CTO博客,原文链接: http://blog.51cto.com/xiamachao/1728709,如需转载请自行联系原作者