Print | Rate this content

Scripting Toolkit for Windows - Using HPONCFG

Using HPONCFG

Hewlett Packard Enterprise offers support for the iLO features available on ProLiant servers with the HPONCFG utility.

HPONCFG is an online configuration tool used to set up and reconfigure iLO without requiring a reboot of the server operating system. The utility runs in a command-line mode and must be executed from an operating system command line on the local server. HPONCFG enables you to initially configure features exposed through the RBSU or iLO.

Before using HPONCFG, the iLO Management Interface Driver must be loaded on the server. HPONCFG displays a warning if the driver is not installed.

For more information, see the HPE iLO website

Click here to view the HPE iLO - The preferred IT administrator in every ProLiant server .

Also, see the HPE iLO 4 Scripting and Command Line Guide (for Gen8 and Gen9 servers)

Click here to view the Hewlett Packard Enterprise Information Library or the HP ProLiant Integrated Lights-Out 3 v1.20 Scripting and Command Line Guide (for G7 servers) on the Hewlett Packard Enterprise website .

Click here to view the HPE iLO - The preferred IT administrator in every ProLiant server .

HPONCFG command-line syntax

hponcfg [-help][/?][-reset][-f filename][-l filename]

[-w filename][-get_hostinfo][-m firmwarelevel]

Because the -w argument does not capture certain types of information, such as the administrator password, data files created with HPONCFG using the -w argument cannot then be used as input files for HPONCFG, unless they are modified first.

HPONCFG command-line arguments

Command-line argument
Description
/help or /h
These arguments display simple help messages.
-reset
This argument resets the iLO to factory defaults.
-f
filename
This argument sets the iLO configuration based on the information in the XML input file named filename.
-l
filename
This argument logs replies to the text log file named filename.
-w
filename
This argument writes the iLO configuration obtained from the device to the XML output file named filename.
-get_hostinfo
This argument returns the host server name and serial number.
-m
This argument indicates to HPONCFG the minimum firmware level that must be present in the management device to execute the RIBCL script. If the minimum level is not met, HPONCFG returns an error without performing any additional actions.
-mouse
This argument causes HPONCFG to configure the server for optimized mouse handling.
For a complete list of all command-line parameters, execute the /h utility.

HPONCFG return codes

Value
Meaning
0
The script was sent successfully to the device.
1
The script could not be sent to the device.

If the script itself fails, errors are reported in the log file created by HPONCFG.

HPONCFG command file contents

HPONCFG can be used to perform the following tasks:

  • Obtain an entire configuration

  • Obtain a specific configuration

  • Set a configuration

Obtaining an entire configuration

HPONCFG can be used to obtain an entire configuration from iLO. In this case, the utility executes from the command line without specification of an input file. The name of the output file is given on the command line. For example:

hponcfg -w config.xml

In this example, the utility indicates that it obtained the data successfully and wrote it to the output file as requested. The following is a typical example of the contents of the output file:

<HPONCFG VERSION = "1.1">

<!--- Generated 04/15/04 15:20:36 --->

<MOD_DIR_CONFIG>

<DIR_AUTHENTICATION_ENABLED VALUE = "N"/>

<DIR_LOCAL_USER_ACCT VALUE = "Y"/>

<DIR_SERVER_ADDRESS VALUE = ""/>

<DIR_SERVER_PORT VALUE = "25"/>

<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>

<MOD_NETWORK_SETTINGS>

<SPEED_AUTOSELECT VALUE = "Y"/>

<NIC_SPEED VALUE = "100"/>

<FULL_DUPLEX VALUE = "Y"/>

<IP_ADDRESS VALUE = "11.222.333.444"/>

<SUBNET_MASK VALUE = "222.222.222.0"/>

<GATEWAY_IP_ADDRESS VALUE = "11.100.200.2"/>

<DNS_NAME VALUE = "ILOD234KJ44D002"/>

<PRIM_DNS_SERVER value = "16.16.1.161"/>

<DHCP_ENABLE VALUE = "Y"/>

<DOMAIN_NAME VALUE = "americas.cpqcorp.net"/>

<DHCP_GATEWAY VALUE = "Y"/>

<DHCP_DNS_SERVER VALUE = "Y"/>

<DHCP_STATIC_ROUTE VALUE = "Y"/>

<DHCP_WINS_SERVER VALUE = "Y"/>

<REG_WINS_SERVER VALUE = "Y"/>

<PRIM_WINS_SERVER value = "16.16.6.161"/>

<STATIC_ROUTE_1 DEST = "0.0.0.0" GATEWAY = "0.0.0.0"/>

<STATIC_ROUTE_2 DEST = "0.0.0.0" GATEWAY = "0.0.0.0"/>

<STATIC_ROUTE_3 DEST = "0.0.0.0" GATEWAY = "0.0.0.0"/>

</MOD_NETWORK_SETTINGS>

<ADD_USER

USER_NAME = "Administrator"

USER_LOGIN = "Administrator"

PASSWORD = "">

</ADD_USER>

<ADD_USER

USER_NAME = "Landy9"

USER_LOGIN = "mandy9"

PASSWORD = "">

</ADD_USER>

<RESET_RIB VALUE = "Y"/>

</HPONCFG>

For security reasons, the user passwords are not returned.

Obtaining a specific configuration

A specific configuration can be obtained using the appropriate XML input file. For example, the contents of a typical XML input file, get_global.xml, are the following:

<!-- Sample file for Get Global command -->

<RIBCL VERSION="2.0">

<LOGIN USER_LOGIN="x" PASSWORD="x">

<RIB_INFO MODE="read">

<GET_GLOBAL_SETTINGS />

</RIB_INFO>

</LOGIN>

</RIBCL>

The XML commands are read from the input file get_global.xml
and are processed by the device:

HPONCFG /f get_global.xml /l log.txt > output.txt

The requested information is returned in the log file, which, in this example, is named log.txt. The contents of the log file are as follows:

<GET_GLOBAL_SETTINGS>

<SESSION_TIMEOUT VALUE="30"/>

<ILO_FUNCT_ENABLED VALUE="Y"/>

<F8_PROMPT_ENABLED VALUE="Y"/>

<REMOTE_CONSOLE_PORT_STATUS VALUE="3"/>

<REMOTE_CONSOLE_ENCRYPTION VALUE="N"/>

<PREFER_TERMINAL_SERVICES VALUE="N"/>

<HTTPS_PORT VALUE="443"/>

<HTTP_PORT VALUE="80"/>

<REMOTE_CONSOLE_PORT VALUE="23"/>

<TERMINAL_SERVICES_PORT VALUE="3389"/>

<VIRTUAL_MEDIA_PORT VALUE="17988"/>

<MIN_PASSWORD VALUE="4"/>

</GET_GLOBAL_SETTINGS>

Setting a configuration

A specific configuration can be sent to the iLO by using the command format:

HPONCFG /f add_user.xml /l log.txt

In this example, the input file has the following contents:

<!-- Add user with minimal privileges to test default setting of

assigned privileges to 'N' -->

<RIBCL version="1.2">

<LOGIN USER_LOGIN="x" PASSWORD="x">

<USER_INFO MODE="write">

<ADD_USER USER_NAME="Landy9" USER_LOGIN="mandy9"

PASSWORD="floppyshoes">

<RESET_SERVER_PRIV value="Y" />

<ADMIN_PRIV value="Y" />

</ADD_USER>

</USER_INFO>

</LOGIN>

</RIBCL>

The specified user will be added to the device.

HPONCFG command-line examples

For HPONCFG command line examples, see the appropriate user guide on the iLO 4 Information Library.

Click here to access Hewlett Packard Enterprise Information Library .

Provide feedback

Please rate the information on this page to help us improve our content. Thank you!