Check if your hardware is compatible
Most middle and all high-end models are IPMI compatible. To check if your server is, log into the dedibox website then: Quick access -> Server selection -> Hardware -> IPMI information and configuration. If the hardware is compatible an IP is already assigned to the IPMI controller.
Into the Access list -> Add IP address you can modify the IPs authorized to connect to the IPMI controller. The modification isn’t taken into account immediately, so maybe you have to wait a couple of hours.
Dedibox configuration
Under Debian the ipmitools
package provide the appropriate modules and tools to send and receive IPMI orders. But before using it you have to load two kernel modules:
# modprobe ipmi_si
# modprobe ipmi_devintf
Don’t forget to add them into the /etc/modules
file.
Then you must create an IPMI user:
# ipmitool -U root user set name 8 foobar
# ipmitool -U root user set password 8 foofoo
# ipmitool -U root user enable 8
Test your setup
You can check your setup using a simple status command:
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX chassis status
Serial Over Lan
SOL is a useful feature that give you access to the server’s serial port over its IPMI network address. If you configure the server OS to have a tty
on this physical interface, then you can do a lot of interesting stuff, like gathering data for troubleshoot a crashed server or live-checking the server boot process.
First modify the grub setting file /boot/grub/menu.lst
and add BEFORE the “AUTOMAGIC KERNELS LIST” section this line:
serial --unit=0 --speed=9600 --word=8 --parity=no --stop=1
terminal --timeout=15 serial console
Then replace the line
# defoptions=quiet
by
# defoptions=quiet console=tty0 console=ttyS0,9600n8
Don’t forget to make an update-grub
to apply the modifications.
Then modify the /etc/inittab
file to add the serial interface to the getty entries:
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
Reboot the server. Now that you have a working tty
on the serial port you can enable SOL like this:
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX sol activate
Usefull IPMI commands
Here a short list of some of the most useful IPMI commands:
– Do a complete electrical reset (stop, wait the start):
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX chassis power cycle
– Do an hardware power reset:
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX chassis power reset
– Do an ACPI reset:
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX chassis power soft
– Shutdown the server:
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX chassis power off
– Start the server:
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX chassis power on
– Get the server status:
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX chassis status
– Make an hardware self-check:
# ipmitool -I lanplus -U foobar -P foofoo -H XX.XX.XX.XX chassis selftest
Further Reading and sources