Setting an address on the HP iLO from Linux

So, we put this nice DL360 G7 in production, and found that networking on the iLO (integrated lights-out management) was not configured correctly. Now, the box was already running software, so it was a bit unpopluar to reboot it just to get iLO access again. Just for fun (sorry, I had not high hopes on their Linux support), I called HP support. They stated of course that this was not possible without rebooting the server and access the iLO setup through its BIOS.

Now, the HP iLO 3 should support IPMI, so after a bit of fiddling around, I came up with this, and it actually works. The following was executed on RHEL5.

First find the LAN channel

# for i in `seq 1 14`; do ipmitool lan print $i 2>/dev/null | grep -q ^Set && echo Channel $i; done

Channel 2

So, on this system, channel 2 is the LAN channel.

# ipmitool lan print 2

Set in Progress         : Set Complete
Auth Type Support       : 
IP Address Source       : DHCP Address
IP Address              : 0.0.0.0
Subnet Mask             : 0.0.0.0
MAC Address             : c0:ff:ee:c0:ff:ee
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Default Gateway IP      : 0.0.0.0
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
Cipher Suite Priv Max   : Not Available

Okay, so if you have a DHCP server on your management network, you may be content with this, and just give it an address by DHCP. I wanted to set a static address, though.

# ipmitool lan set 2 ipsrc static
# ipmitool lan set 2 ipaddr 192.168.42.36
# ipmitool lan set 2 netmask 255.255.255.0
# ipmitool lan set 2 defgw ipaddr 192.168.42.1
# ipmitool mc reset cold

That’s it actually. Exchange the LAN channel and network addresses with your own, of course.

11 Responses to “Setting an address on the HP iLO from Linux”

  1. Gerben Welter says:

    There’s actually another way (at least on an iLO 2 equipped system) if you have installed the HPONCFG tool and the iLO driver from the Proliant Support Pack:

    http://h18006.www1.hp.com/products/servers/management/ilobest-practice.html

    With the HPONCFG tool you can export the iLO configuration, modify it and import it again. I’ve also done this on a running RHEL 5 system

  2. ingvar says:

    Gerben, thanks for the update. Still no bonus points to HP support for not being able to point to that article, nor for hinting that ipmitool could do this.

    For tasks as this, I would prefer a decent free software tool (ipmitool) over the HP tool, though.

    Ingvar

  3. Willem says:

    Thank you both. Both ipmitool and hponcfg sure beat ssh-ing into the ilo card. I’l update my kickstart scripts soon :-)

  4. Richard says:

    If the :

    ipmitool mc reset cold

    .. doesn’t work for you (like me) , you can ssh into the iLO port using the username/password and run the following:

    reset map1

    for a similar effect.

  5. arl says:

    Btw. hponcfg sucks heavily. Do not install it and AVOID proliant support pack too,
    because it contains this s.

    You should never install it to 64-bit machine because it is 32-bit.
    Will never ever install *any* 32-bit binaries into 64-bit box.

    It does really not help naming rpm as noarch. This is the way you should not do,
    “HP Linux engineer: world is much better place if you’d shoot yourself”

    Really don’t know what is so hard. Good hardware but miserable Linux support.

    This has continued for years now .. and it seems those ppl do not test thing at all.

    They finally managed to port hpacucli as 64-bit. Now it may be installed into
    customers’ machines.

    HP: if you cannot do it, provide openly sources.

    //arl

  6. Toomas says:

    How do I set the VLAN tag? I tried the obvious:

    ipmitool lan set 2 vlan id 4066

    (yes we use such high VLAN ID’s) but that does not have any effect; subsequent

    ipmitool lan print

    still shows:

    802.1q VLAN ID : Disabled
    802.1q VLAN Priority : 0

  7. tom says:

    Have used ipmitool many times but for some reason never needed the

    ipmitool mc reset cold

    command, but thank you so much for outlining, helped me with an important client :)

  8. pedro says:

    thanks for all this.
    I have a somewhat related problem.
    when I run:
    #ipmitool -v lan set 2 auth ADMIN MD5

    I get:
    Get Channel Info command failed: Parameter out of range
    Get LAN Parameter ‘Auth Type Enable’ command failed: Unknown (0×80)

    doing lan print 2
    I notice there is no support listed next to Auth Type Support
    I was expecting to see None, MD2, MD5 and PASSWORD

    Am I missing something?

    thanks
    P.

  9. Guillaume says:

    Thanks for all this.

    It’s perfect, when the server is very far away

    For create user, use this :

    ipmitool user list 2
    ipmitool user set name 2 manager
    ipmitool user set password 2
    ipmitool channel setaccess 2 2 link=on ipmi=on callin=on privilege=4
    ipmitool user list 2

    G.

  10. Cameron Kerr says:

    Thanks. I found that if you get the following error:

    “`
    Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
    “`

    then you need to enable the following modules

    “`
    modprobe ipmi_devintf
    modprobe ipmi_si
    “`

    (ref: http://serverfault.com/questions/480371/ipmitool-cant-find-dev-ipmi0-or-dev-ipmidev-0)

  11. gaz says:

    Absolutely brilliant info – thank you for this post! Works great with HP iLO4 on a DL380 Gen8

Leave a Reply