hponcfg

The hponcfg utility allows a sys-admin to configure a server’s HP iLO hardware straight from its host server via the command line. It does the magic by reading in a pre-configured XML file with the required settings. In this particular example we are going to be setting the iLO’s hostname.

First we create the XML file that hponcfg will use to set the hostname. Here we will call the XML file change_hostname.xml.

<RIBCL VERSION=”2.0″>
<LOGIN USER_LOGIN=”admin” PASSWORD=”somecoolpassword”>
<RIB_INFO MODE=”write”>
<MOD_NETWORK_SETTINGS>
<DHCP_DOMAIN_NAME value=”No”/>
<DNS_NAME value=”blackbox-con”/>
<DOMAIN_NAME value=”my.domain.net”/>
</MOD_NETWORK_SETTINGS>
</RIB_INFO>
</LOGIN>
</RIBCL>

In this example the admin user that is setup on the iLO has a password of somecoolpassword. This is the account that will actually login to the iLO and do the thing. We want to turn off getting a DHCP domain name so we give DHCP_DOMAIN_NAME a value of No. The DNS_NAME is the hostname and the DOMAIN_NAME is the domain name and tied together you get the fully qualified domain name i.e. blackbox-con.my.domain,net.

Our second step is to run the hponcfg command that reads in the XML config file and updates the hostname accordingly.

> hponcfg -f change_hostname.xml
HP Lights-Out Online Configuration utility
Version 4.3.0 Date 12/10/2013 (c) Hewlett-Packard Company, 2014
Firmware Revision = 1.13 Device type = iLO 4 Driver name = hpilo
<INFORM>Integrated Lights-Out will reset at the end of the script.</INFORM>

Please wait while the firmware is reset. This might take a minute
Script succeeded

By running this command, we have renamed our iLO hardware to blackbox-con.my.domain.net. Presumably the actual host’s hostname would be something blackbox.my.domain.net and we would want to make them both unique.

And there you have it. We have just renamed our iLO hostname.

Leave a comment