This is intended to help fairly knowledgeable people get IPMI working on their hosts so they can issue remote commands to their hardware. I focus on Red Hat Enterprise Linux on a Dell, but it is likely to work on other hosts, distributions, and OSes, too. This works for me on Dell PowerEdge 1850, PowerEdge 2850, Dell PowerEdge 1950, and Dell PowerEdge 2950 hardware.
Dell PowerEdge 1650, 2650, and 1750 servers have an older implementation of IPMI which will let you issue commands locally, but not to these models over the network.
Before you begin:
The Baseboard Management Controller (BMC) is the thing that implements IPMI. It piggybacks on the first built-in NIC so you have to have that attached to the network on the hosts you wish to manage. It uses its own IP address (so you need an extra one).
If you are new to this get a server that is nearby to act as your test machine. Most of the IPMI commands that shut the host down also kill the BMC. If that happens you’ll need to go power the machine on manually. Until you figure out exactly what is okay and what isn’t you’ll be pushing the power button a lot.
You will need a Linux host to send the IPMI commands from. Undoubtedly there are ways to send these commands from other operating systems, but as I am a Linux guy I’ll use that as my example. Feel free to post comments addressing other OSes.
Getting the OS prepared:
1) Install IPMItool and the startup scripts. On Red Hat Enterprise Linux install the OpenIPMI, OpenIPMI-tools, OpenIPMI-libs, and OpenIPMI-devel packages. That will get you everything you need. There are similar packages available for other distributions (SuSE, Ubuntu, CentOS, etc.). You’ll need IPMItool on any machine you want to configure, and any machine you want to send commands from.
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 BMC for Remote Usage:
1) There are two ways to configure the BMC. You can configure it through the boot-time menu (Ctrl-E), where you can set the management password and IP address information. Or, you can configure it with ipmitool from the OS. Replace my sample IP address, gateway, and netmask with your own:
/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) Secure the BMC, so unauthorized people can’t power cycle your machines. 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 root 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
1) You can set an environment variable, IPMI_PASSWORD, with the password you used above. That will save some typing:
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 root -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’re 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 root -H 192.168.40.88 -a chassis power off
/usr/bin/ipmitool -I lan -U root -H 192.168.40.88 -a chassis power cycle
/usr/bin/ipmitool -I lan -U root -H 192.168.40.88 -a sel list
For me, a “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
Hopefully this helps a little. If you find any errors in this please leave me a comment or send me an email. Thanks!