Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antoni/f7131151379219ada1d7964412bbee05 to your computer and use it in GitHub Desktop.
Save antoni/f7131151379219ada1d7964412bbee05 to your computer and use it in GitHub Desktop.
IPMI simulator
This document describes about installation and configuration of IPMI simulator.
We need: qemu-kvm, OpenIPMI, OpenIPMI-tools
1) Install the qemu-kvm. We need the qemu, which have the IPMI pacthes.
Use the source https://github.com/cminyard/qemu/tree/stable-2.2-ipmi
./configure, make and make install
2) Download the OpenIPMI libraries, from http://sourceforge.net/projects/openipmi/
Follow the process documented in lanserv/README.vm
./configure --prefix=/opt/openipmi/usr --sysconfdir=/opt/openipmi/etc \
--with-perlinstall=/opt/openipmi/usr/lib/perl \
--with-pythoninstall=/opt/openipmi/usr/lib/python
make and make install.
If you got the following errors while compiling:
1)/usr/bin/ld: cannot find -lOpenIPMIutils
export CC="gcc -lrt" and reconfigure.
3) Configure the IPMI siulator:
Create a qemu disk to use:
qemu-img create -f qcow2 -o size=1G /opt/KVM/disk1.qcow2
We need kernel images, download one from : wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-kernel
edit the /opt/openipmi/etc/ipmi/lan.conf
change the startcmd, use the qemu compiled.
/usr/local/bin/qemu-system-x86_64 --enable-kvm -drive file=/opt/KVM/Test4sda -nographic -net nic,model=e1000,macaddr=52:54:00:12:34:59 -net user,hostfwd=tcp::5556-10.0.2.15:22 -chardev socket,id=ipmi0,host=localhost,port=9011,reconnect=10 -device isa-ipmi,chardev=ipmi0,interface=bt,irq=5 -serial mon:tcp::9012,server,telnet,nowait
/usr/local/bin/qemu-system-x86_64 --enable-kvm -drive file=/opt/KVM/disk1.qcow2,format=qcow2 -nographic -net nic,model=e1000,macaddr=52:54:00:12:34:59 -net user,hostfwd=tcp::5555-10.0.2.15:22 -chardev socket,id=ipmi0,host=localhost,port=9002,reconnect=10 -device isa-ipmi,chardev=ipmi0,interface=bt,irq=5 -serial mon:tcp::9003,server,telnet,nowait -kernel /opt/cirros-0.3.4-i386-kernel --append 'root=/dev/hda console=ttyS0,115200'
Serial console is configured to /dev/ttyUSB0 in the lan.conf file, Find if your serial console is configured as such (or) change.
I changed my serial console as
sol "/dev/ttyS0" 38400 history=4000 historyfru=10
4) Run IPMI_SIM
/opt/openipmi/usr/bin/ipmi_sim
5) Connect to the simulator using ipmitool as below:
ipmitool -I lanplus -H localhost -p 9011 -U cirros power status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment