Admin:IPMI

From VirtualSquare

Jump to: navigation, search

Contents

[edit] local IPMI

This page details how to set up and operate IPMI

IPMI is available on varie, eventuali, annessi, connessi, quantaltro, perlopiu, perlomeno, peraltro.

[edit] Setup

At least two kernel modules need to be loaded to access ipmi from userspace: ipmi_si and ipmi_devintf.

The userspace tool of choice is ipmitool but there are many others around.

[edit] Operations

There are many operations available, the interesting ones are:

Check the power status

# ipmitool chassis status
System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : previous
Last Power Event     : command
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false

Turn on/off or cycle the power
warning: power off and cycle will kill the power without asking questions! you have been warned.

# ipmitool power on (or cycle or off)

Check the status of sensors

# ipmitool sdr
Power Unit       | 0x00              | ok
BMC Watchdog     | 0x00              | ok
Scrty Violation  | 0x00              | ok
Physical Scrty   | 0x00              | ok
POST Error       | 0x00              | ok
Critical Int     | 0x00              | ok
Memory           | 0x00              | ok
Logging Disabled | 0x00              | ok
Baseboard 1.2V   | 1.20 Volts        | ok
Baseboard 1.25V  | 1.26 Volts        | ok
Baseboard 1.8V   | 1.80 Volts        | ok
Baseboard 1.8VSB | 1.79 Volts        | ok
Baseboard 2.5V   | 2.52 Volts        | ok
Baseboard 3.3V   | 3.40 Volts        | ok
Baseboard 3.3AUX | 3.29 Volts        | ok
Baseboard 5.0V   | 5.04 Volts        | ok
Baseboard 5VSB   | 5.08 Volts        | ok
Baseboard 12V    | 12.03 Volts       | ok
Baseboard 12VRM  | 12.03 Volts       | ok
Baseboard -12V   | -12.04 Volts      | ok
Baseboard VBAT   | 3.15 Volts        | ok
Baseboard Temp   | 30 degrees C      | ok
Basebrd FanBoost | 30 degrees C      | ok
Proc Missing     | 0x00              | ok
ACPI State       | 0x01              | ok
System Event     | 0x00              | ok
Button           | 0x00              | ok
SMI Timeout      | 0x00              | ok
Sensor Failure   | 0x00              | ok
NMI State        | 0x00              | ok
SMI State        | 0x00              | ok
FSB Mismatch     | 0x00              | ok
Processor 1 Stat | 0x80              | ok
Processor 2 Stat | 0x00              | ok
Processor Vccp   | 1.47 Volts        | ok
Processor Hot    | 0x01              | ok
DIMM 1B          | 0x04              | ok
DIMM 1A          | 0x04              | ok
DIMM 2B          | 0x00              | ok
DIMM 2A          | 0x00              | ok
DIMM 3B          | 0x00              | ok
DIMM 3A          | 0x00              | ok

Check the events logged by IPMI

# ipmitool sel list | tail -5
24a8 | 03/23/2010 | 09:44:46 | System Event #0x83 | Timestamp Clock Sync | Asserted
24bc | 03/23/2010 | 09:45:10 | System Event #0x83 | OEM System boot event | Asserted
24d0 | 03/24/2010 | 13:32:52 | System Event #0x83 | Timestamp Clock Sync | Asserted
24e4 | 03/24/2010 | 13:32:53 | System Event #0x83 | Timestamp Clock Sync | Asserted
24f8 | 03/24/2010 | 13:33:17 | System Event #0x83 | OEM System boot event | Asserted

[edit] LAN

It is possible (and desiderable) to operate IPMI remotely via LAN, to do this the interfaces need to be configured.

Once configured IPMI will then steal ethernet packets with the correct MAC/IP address, protocol (UDP) and port (623) and deliver them to commands.

[edit] Setup

The first step is to identify the channel where the ethernet interface is:

# ipmitool channel info 6
Channel 0x6 info:
  Channel Medium Type   : 802.3 LAN
  Channel Protocol Type : IPMB-1.0
  Session Support       : multi-session
  Active Session Count  : 0
  Protocol Vendor ID    : 7154
  Volatile(active) Settings
    Alerting            : disabled
    Per-message Auth    : enabled
    User Level Auth     : enabled
    Access Mode         : always available
  Non-Volatile Settings
    Alerting            : disabled
    Per-message Auth    : enabled
    User Level Auth     : enabled
    Access Mode         : always available

This represents an ethernet interface on channel 6, in our case there's another on channel 7.

Then it is necessary to configure the channel:

ipmitool lan set 6 ipsrc static
ipmitool lan set 6 ipaddr XXX.YYY.ZZZ.WWW
ipmitool lan set 6 netmask 255.255.255.0
ipmitool lan set 6 macaddr aa:bb:cc:dd:ee:ff
ipmitool lan set 6 arp generate on
ipmitool lan set 6 arp interval 60
ipmitool lan set 6 password XXX
ipmitool lan set 6 auth callback,user,operator,admin md5
ipmitool lan set 6 user

And then activate access on the channel:

ipmitool lan set 6 access on

And check if everything is correct

# ipmitool lan print 6
Set in Progress         : Set Complete
Auth Type Support       : NONE MD2 MD5 PASSWORD 
Auth Type Enable        : Callback : MD5 
                        : User     : MD5 
                        : Operator : MD5 
                        : Admin    : MD5 
                        : OEM      : 
IP Address Source       : Static Address
IP Address              : XXX.YYY.ZZZ.WWW
Subnet Mask             : 255.255.255.0
MAC Address             : aa:bb:cc:dd:ee:ff
SNMP Community String   : 
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control         : ARP Responses Disabled, Gratuitous ARP Enabled
Gratituous ARP Intrvl   : 60.0 seconds
Default Gateway IP      : 0.0.0.0
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
Cipher Suite Priv Max   : Not Available

NB: the default gateway hasn't been set on purpose, this way packets cannot flow outside of the LAN

[edit] Operations

At this point all IPMI operations are available also remotely by providing a password to ipmitool

another_host# IPMI_PASSWORD=XXX ipmitool -E -H XXX.YYY.ZZZ.WWW chassis status
System Power         : on
Power Overload       : false
Power Interlock      : inactive
Main Power Fault     : false
Power Control Fault  : false
Power Restore Policy : previous
Last Power Event     : command
Chassis Intrusion    : inactive
Front-Panel Lockout  : inactive
Drive Fault          : false
Cooling/Fan Fault    : false

take appropriate measures to protect the password, anyone in LAN with that can play with the machine power

[edit] Serial over LAN

note the isol command is specific to intel implementation of SOL in ipmi v1.5, with ipmi 2.0 the sol command should be used

It is possible to access the machine serial port via IPMI on LAN. First activate it

# ipmitool isol set enabled true
# ipmitool isol info
Enabled                         : true
Privilege Level                 : USER
Bit Rate (kbps)                 : 19.2

Now access the serial from a remote host

remote# IPMI_PASSWORD=XXX ipmitool -E -H XXX.YYY.ZZZ.WWW isol activate
[SOL Session operational.  Use ~? for help]

Debian GNU/Linux lenny/sid eventuali ttyS1

eventuali login:

Of course you want to have getty listening, check /etc/inittab

note the escape character is ~ which plays nice tricks with ssh escape chars, so beware and use ~~. to terminate ipmitool

Personal tools