Configure HP iLO in ESXi console

To configure a HP iLO board you can use a web browser of course. But how to access iLO when you did not set a correct IP address or Administrator password in BIOS using F8 key? Of course you can reboot and enter F8 at boot. But to restart a ESXi host just to enter a iLO IP address is not very elegant. Here I will explain how to configure iLO in ESXi shell.

When you installed Windows using Intelligent Provisioning or installed HP software after installation, you can use the graphical tool HP Lights-Out Online Configuration utility or HPONCFG in short. A version of this tool is also installed on ESXi host when you installed the host using a HP image of ESXi or installed offline bundle after installation using Update Manager or esxcli.

So you can use hponcfg to export iLO configuration of the host you are logged in to a text file:

  • log in ESXi console (SSH or ESXi Shell) as root on HP Proliant Server
  • run /opt/hp/tools/hponcfg -w /tmp/ilo.cfg

/tmp/ilo.cfg looks like:

<!-- HPONCFG VERSION = "4.4-0.0" -->
<!-- Generated 6/18/2015 21:16:48 -->
<RIBCL VERSION="2.1">
<LOGIN USER_LOGIN="Administrator" PASSWORD="password">
<DIR_INFO MODE="write">
<MOD_DIR_CONFIG>
<DIR_AUTHENTICATION_ENABLED VALUE = "N"/>
<DIR_LOCAL_USER_ACCT VALUE = "Y"/>
<DIR_SERVER_ADDRESS VALUE = ""/>
<DIR_SERVER_PORT VALUE = "636"/>
<DIR_OBJECT_DN VALUE = ""/>
<DIR_OBJECT_PASSWORD VALUE = ""/>
<DIR_USER_CONTEXT_1 VALUE = ""/>
<DIR_USER_CONTEXT_2 VALUE = ""/>
<DIR_USER_CONTEXT_3 VALUE = ""/>
</MOD_DIR_CONFIG>
</DIR_INFO>
<RIB_INFO MODE="write">
<MOD_NETWORK_SETTINGS>
<SPEED_AUTOSELECT VALUE = "Y"/>
<NIC_SPEED VALUE = "10"/>
<FULL_DUPLEX VALUE = "N"/>
<IP_ADDRESS VALUE = "192.168.1.1"/>
<SUBNET_MASK VALUE = "255.255.0.0"/>
<GATEWAY_IP_ADDRESS VALUE = "192.168.1.254"/>
...

To change settings of iLO just edit the the file and use hponcfg again to applie these settings to iLO. Command to do this: /opt/hp/tools/hponcfg -f /tmp/ilo.cfg -l /tmp/ilo_cfg.log. Parameter -l defines the log-file for this action.

Here are examples of useful tasks:

  • To reset the password of an iLO user, edit config-file to add these lines

<LOGIN USER_LOGIN="Administrator" PASSWORD="password">
<USER_INFO MODE="write">
<MOD_USER USER_LOGIN = "Administrator">
<PASSWORD VALUE = "newpassword"/>
</MOD_USER>
</USER_INFO>
</LOGIN>

  • To change IP configuration just edit the values for
    • IP_ADDRESS VALUE
    • SUBNET_MASK VALUE
    • GATEWAY_IP_ADDRESS VALUE
    • PRIM_DNS_SERVER VALUE
    • and so on
  • To add a new iLO user

<USER_INFO MODE="write">
<ADD_USER USER_NAME="NewUser" USER_LOGIN="NewUser"
PASSWORD="password">
<RESET_SERVER_PRIV value="Y" />
<ADMIN_PRIV value="Y" />
</ADD_USER>
</USER_INFO>
</LOGIN>

  • here are possible priviliges
    • ADMIN_PRIV
    • REMOTE_CONS_PRIV
    • RESET_SERVER_PRIV
    • VIRTUAL_MEDIA_PRIV
    • CONFIG_ILO_PRIV

To reset/restart iLO after changing settings, use command: /opt/hp/tools/hponcfg -r.
For more detailed information, look at this and this HP documents.

Notes

  • I had some strange behavour when I just sent settings I wanted to get changed. Stuff like lost IP address or different IP addresses for management processor when you look at hardware tab in vSphere Client. So I recommend to export config into file, edit the file to change setting or/and add new lines and send all settings back to iLO.
  • Username and password in section LOGIN is not important! Section has to be there and values has to be set but hey are not used to log in to iLO. Security is guaranteed by root logged in to ESXi.

Leave a Reply

Your email address will not be published. Required fields are marked *