How to Configure IPMI settings from a running Linux OS

Getting the OS prepared:

1) Install IPMItool. On CentOS Linux, install the OpenIPMI-tools, OpenIPMI-libs, and OpenIPMI-devel packages. You’ll need IPMItool on any machine you want to configure, and any machine you want to send commands from.

 

yum install OpenIPMI-tools
yum install OpenIPMI-libs
yum install OpenIPMI-devel 
yum install ipmitool

2) Enable the IPMI service:

/sbin/chkconfig ipmi on

3) Start the IPMI service, which will load the kernel modules for you:

/sbin/service ipmi start

 

Configure the IPMI controller for Remote Usage:

1) It may be easiest to configure the controller through its BIOS -- it's part of the main BIOS on SuperMicro and HP systems, it has its own separate BIOS which you can access with ctrl-E on a Dell, and it's accessible via the front panel LCD interface on Sun systems. On some systems, including HP DL165 G7's, you may not be able to set the password through the BIOS, but once we've set the network through the BIOS or through IPMItool, we can use the manufacturer's default password to log into the web or SSH interface and then change the password.

 

/usr/bin/ipmitool -I open lan set 1 ipsrc static 
/usr/bin/ipmitool -I open lan set 1 ipaddr 192.168.40.88
/usr/bin/ipmitool -I open lan set 1 defgw ipaddr 192.168.40.1
/usr/bin/ipmitool -I open lan set 1 netmask 255.255.255.0
/usr/bin/ipmitool -I open lan set 1 access on

2) Set passwords on the controller. To do this you want to change the default SNMP community, the “null” user password, and the root user password. First, set the SNMP community, either to a random string or something you know:

 

/usr/bin/ipmitool -I open lan set 1 snmp YOURSNMPCOMMUNITY

Then set the null user password to something random. Replace CRAPRANDOMSTRING with something random and secure:

 

/usr/bin/ipmitool -I open lan set 1 password CRAPRANDOMSTRING

Last, set the ADMIN user password to something you know:

 

/usr/bin/ipmitool -I open user set password 2 REMEMBERTHIS

Double-check your settings with:

 

/usr/bin/ipmitool -I open lan print 1

NOTE: This method has been tested on SuperMicro and Dell systems. Command syntax may be different on some systems -- for example, use "ipmitool -I open lan print", without the "1", on HP DL165's -- and not all features may be available on all systems.

Trying it:

1) You can set an environment variable, IPMI_PASSWORD, with the password you used above. That will save some typing:

 

export IPMI_PASSWORD="REMEMBERTHIS"

If you use this substitute the “-a” in the following commands with a “-E”.

2) From another machine issue the following command, obviously replacing the IP with the target BMC’s IP:

 

/usr/bin/ipmitool -I lan -U ADMIN -H 192.168.40.88 -a chassis power status

You should get something like:

 

Chassis Power is on

If you get anything else, or nothing, double-check to make sure the BMC is set right, you entered the right password, and the IP it has is reachable from the machine you are on. You can double-check your work via the Ctrl-E boot menu, too.

Beyond that, get familiar with:

 

/usr/bin/ipmitool -I lan -U ADMIN -H 192.168.40.88 -a chassis power off

/usr/bin/ipmitool -I lan -U ADMIN -H 192.168.40.88 -a chassis power cycle

/usr/bin/ipmitool -I lan -U ADMIN -H 192.168.40.88 -a sel list

“chassis power off” command kills the box. “SEL” is the system event log.

You can issue all of these commands locally, too:

/usr/bin/ipmitool sel list
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Adding a range/block of ips

As an example to add a /24 253 ips to a linux server follow these setups. We'll use...

How can I check my hard disk usage in Linux?

Once you are connected to the server via SSH, run the following command:# df -hThis will output...

Test If Linux Server SCSI / SATA Hard Disk Going Bad

One of our regular sends us a question: How can I test if my hard disk is going bad? I see few...

How to Find Out Hard Disk Specs / Details on Linux

Linux comes with various commands to find out information about your hard drive. I recommend...

Monitoring Hard Drive Health on Linux with smartmontools

S.M.A.R.T. is a system in modern hard drives designed to report conditions that may indicate...

Powered by WHMCompleteSolution