Skip to content

Instantly share code, notes, and snippets.

@bot11
Created June 2, 2015 10:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bot11/3c385eea081609a8a7f4 to your computer and use it in GitHub Desktop.
Save bot11/3c385eea081609a8a7f4 to your computer and use it in GitHub Desktop.
openipmi_lan.conf
# A configuration file for lanserv or ipmi_sim to configure the various
#communication parameters for the device.
# This is a name used to identify this instance, and used to create
# the default name of the emulator startup command file and eventually # the storage facility for permanent storage.
name "mybmc"
#
# Work on the BMC first
set_working_mc 0x20
# Define a LAN channel on channel 1
startlan 1
# Define an IP address and port to listen on. You can define more
# than one address/port to listen on multiple addresses. The ::
# listens on all addresses.
addr :: 623
# Maximum privilege limit on the channel.
priv_limit admin
# Allowed IPMI 1.5 authorization types
# allowed_auths_callback none md2 md5 straight
# allowed_auths_user none md2 md5 straight
# allowed_auths_operator none md2 md5 straight
# allowed_auths_admin none md2 md5 straight
# guid for IPMI 2.0 authorization You can also use a string
guid a123456789abcdefa123456789abcdef
#guid "I_AM_A_REAL_BMC!"
# You can specify a BMC key for IPMI 2.0 authorization. See the
# spec for details.
#bmc_key "abcdefghijklmnopqrst"
# A program to get and set the LAN configuration of the interface.
#lan_config_program "/usr/local/bin/ipmi_sim_lancontrol eth0"
lan_config_program "./ipmi_sim_lancontrol em1"
endlan
#chassis_control "./ipmi_sim_chassiscontrol 0x20"
# Define a serial VM inteface for channel 15 (the system interface) on
# port 9002, just available to the local system (localhost).
serial 15 0.0.0.0 9002 codec VM ipmb 0x20
# startcmd is what to execute to start a VM associated with the
# codec above (localhost 9002). It also starts a console serial port
# on port 9003 that is also used as the monitor interface
# startcmd "/usr/local/bin/qemu-system-x86_64 --enable-kvm -hda /opt/cirros-0.3.0-x86_64-disk.img -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 --append 'root=/dev/hda console=ttyS0,115200'"
startcmd "/usr/local/bin/qemu-system-x86_64 --enable-kvm -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 -initrd /opt/cirros/cirros-0.3.4-x86_64-initramfs -kernel /opt/cirros/cirros-0.3.4-x86_64-kernel --append 'root=/dev/hda console=ttyS0,115200'"
# startcmd "qemu-system-x86_64 -hda /opt/cirros-0.3.0-x86_64-disk.img -nographic --enable-kvm -chardev socket,id=ipmi0,host=localhost,port=9002,reconnect=10 -device isa-ipmi,chardev=ipmi0,interface=bt,irq=5 -device e1000,netdev=net0,mac=DE:AD:BE:EF:A3:D1 -netdev tap,id=net0 -device ich9-usb-ehci1 -serial mon:tcp::9003,server,telnet,nowait -m 256 -smp 1"
# Start startcmd at startup? Default is false.
startnow true
# The amount of time to wait for the startcmd to do a graceful shutdown
# on a powerdown request. The simulator will send a request to the
# target, wait this amount of time, and then do a SIGTERM kill on the
# process. If this is zero, a SIGTERM will not be done (nor will a SIGKILL).
# Note that if the simulator does not have a connection to the VM, the
# graceful shutdown is skipped and a SIGTERM is done immediately.
# Default time is 60 seconds.
#poweroff_wait 30
# The amount of time to wait for SIGTERM to kill the process. If the process
# does not terminate in this period of time, send a SIGKILL kill. If this
# is zero, don't send the SIGKILL. Default time is 20 seconds.
#kill_wait 5
# Now add some users. User 0 is invalid, user 1 is the special "anonymous"
# user and cannot take a username. Note that the users here are only
# used if the persistent user config doesn't exist.
# # valid name passw priv-lim max-sess allowed-auths
user 1 true "" "test" user 10 none md2 md5 straight
user 2 true "admin" "password" admin 10 none md2 md5 straight
# sol "/dev/ttyS0" 115200 history=4000 historyfru=10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment