Thursday, May 2, 2013

IPMItool

to get the current IPaddress:

ESXi#/ipmitool  lan print 1
~ # /ipmitool lan print 1| egrep "IP Address|Subnet|Gateway IP|VLAN"
IP Address Source       : Static Address
IP Address              : 112.18.12.167
Subnet Mask             : 255.255.254.0
Default Gateway IP      : 112.18.12.1
Backup Gateway IP       : 0.0.0.0
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0


~ # /ipmitool  lan set 1 ipsrc static
~ # /ipmitool lan set 1 netmask 255.255.248.0
Setting LAN Subnet Mask to 255.255.248.0
~ # /ipmitool lan set 1 ipaddr 101.23.40.47 
~ # /ipmitool lan set 1 defgw ipaddr 101.23.40.1


 Locator LED :
/ipmitool chassis identify force

Set the locator LED off

/ipmitool chassis identify 0

Set the locator LED upto 255 seconds

 /ipmitool chassis identify 255


 SEL events:

/ipmitool sel list
/ipmitool -v sel list
 ( more verbose)

sensor readings

/ipmitool sensor list

Reset the BMC:

/ipmitool mc reset cold
/ipmitool  raw 0x06 0x02

To find the serial number of the system:

/ipmitool fru list
To reset the server

/ipmitool chassis power off/off/cycle/reset
/ipmitool chassis power diag -to send NMI to ESXi(server) - to create purple screen of death or bsod in MS


IPMI policy when the power is restored:


~ # /ipmitool chassis policy
chassis policy <state>
   list        : return supported policies
   always-on   : turn on when power is restored
   previous    : return to previous state when power is restored
   always-off  : stay off after power is restored

IPMI network connectivity:
ipmitool –H <target node IPMI IP> –U admin –P admin raw 0x0c 0x01 0x01 0xff 0x01                        : Dedicate-NIC
ipmitool –H <target node IPMI IP> –U admin –P admin raw 0x0c 0x01 0x01 0xff 0x00                        : Shared-NIC

Command change ipmi port from “Dedicated port” to “Shared port”

Remote
#ipmitool –H <target node ipmi IP> –U admin –P admin raw 0x0c 0x01 0x01 0xff 0 0 00


IPMI Power supply commands
/ipmitool -v sdr type "Power Supply"


~ # /ipmitool  raw 0x06 0x52 0x07 0x70 0x01 0x0c - top power supply good
 01
~ # /ipmitool raw 0x06 0x52 0x07 0x72 0x01 0x0c -bottom power supply bad.
 00

4 comments:

  1. Very useful, thanks!

    ReplyDelete
  2. Our ESXi 5.1 systems don't seem to have ipmitool :-/

    ReplyDelete
    Replies
    1. Nutanix systems we use ipmitool which uses /dev/ipmi directly.
      Same commands will work from another host(linux) with ipmitool installed. You need to use ipmitool -H -I options.

      Delete