Site icon techbeatly

How to get or set iLO details from Linux and Windows (when you lost iLO access)

As an sysadmin, its always headache to deal with remote systems as rely on remote consoles (HP iLO, Dell iDRAC etc) for servers to access in case there is an issue on server access. And because of that its mandatory to keep remote console connection up and accessible all the time.

Here I am explaining simple method to get HP iLO information or set iLO information from your operating system (you might found this already in another portals but adding in my own collection)

We have scenarios as below,

All above cases we need to access and configure this iLO network details from operating system as we dont have iLO connection in hand.

What tool we are going to use ?

We have a great tool from HP, called hponcfg (read hponcfg docs for more details) by which you can automate most of your iLO configuration tasks.

(Also read about HPREST)

rpm -Uvh hponcfg-4.3.1-0.x86_64.rpm
Retrieving hponcfg-4.3.1-0.x86_64.rp m
Preparing... ########################################### [100%]
 1:hponcfg ########################################### [100%]

How to get current details from iLO ?

Once you installed hponcfg, its straight forward; just run the command with an output filename

[root@ams-002 ~]# hponcfg -w myilo.xml
HP Lights-Out Online Configuration utility
Version 4.3.1 Date 05/02/2014 (c) Hewlett-Packard Company, 2014
Firmware Revision = 2.53 Device type = iLO 4 Driver name = hpilo
Management Processor configuration is successfully written to file "myilo.xml"

Windows :

C:\Program Files\HP\hponcfg>hponcfg /w myilo.xml

Display the content of file

[root@ams-002 ~]# cat myilo.xml
<!-- HPONCFG VERSION = "4.3.1" -->
<!-- Generated 11/20/2017 17:5:29 -->
<RIBCL VERSION="2.1">
 <LOGIN USER_LOGIN="Administrator" PASSWORD="password">
 <DIR_INFO MODE="write">
 <MOD_DIR_CONFIG>
 <DIR_AUTHENTICATION_ENABLED VALUE = "Y"/>
 <DIR_LOCAL_USER_ACCT VALUE = "Y"/>
 <DIR_SERVER_ADDRESS VALUE = "linux.colorvibes.in"/>
 <DIR_SERVER_PORT VALUE = "636"/>
 <DIR_OBJECT_DN VALUE = ""/>
 <DIR_OBJECT_PASSWORD VALUE = ""/>
 <DIR_USER_CONTEXT_1 VALUE = "OU=User Accounts,OU=User Directory,DC=linux,DC=colorvibes,DC=in"/>
 <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 = "10.1.10..8"/>
 <SUBNET_MASK VALUE = "255.255.255.0"/>
 <GATEWAY_IP_ADDRESS VALUE = "10.1.10..1"/>
 <DNS_NAME VALUE = "ams-002"/>
 <PRIM_DNS_SERVER value = "10.1.20.1"/>
 <DHCP_ENABLE VALUE = "N"/>
 <DOMAIN_NAME VALUE = ""/>
 <DHCP_GATEWAY VALUE = "N"/>
 <DHCP_DNS_SERVER VALUE = "N"/>
 <DHCP_STATIC_ROUTE VALUE = "N"/>
 <DHCP_WINS_SERVER VALUE = "N"/>
 <REG_WINS_SERVER VALUE = "Y"/>
 <PRIM_WINS_SERVER value = "0.0.0.0"/>
 <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>
 </RIB_INFO>
 <USER_INFO MODE="write">
 <ADD_USER
 USER_NAME = "admin"
 USER_LOGIN = "admin"
 PASSWORD = "%user_password%">
 <ADMIN_PRIV value = "Y"/>
 <REMOTE_CONS_PRIV value = "Y"/>
 <RESET_SERVER_PRIV value = "Y"/>
 <VIRTUAL_MEDIA_PRIV value = "Y"/>
 <CONFIG_ILO_PRIV value = "Y"/>
 </ADD_USER>
 </USER_INFO>
 </LOGIN>
</RIBCL>

How to configure new IP/Mask on iLO ?

To configure the IP/Mask details, we need to prepare the xml file with those information. Sample file below

cat >myserver-ilo-config.xml
<RIBCL VERSION="2.0">
 <LOGIN USER_LOGIN="user" PASSWORD="password">
 <RIB_INFO MODE="WRITE" >
 <MOD_NETWORK_SETTINGS>
 <IP_ADDRESS VALUE = "10.1.10.10"/>
 <SUBNET_MASK VALUE = "255.255.255.0"/>
 <GATEWAY_IP_ADDRESS VALUE = "10.1.10.1"/>
 <PRIM_DNS_SERVER value = "10.1.20.1"/>
 <DHCP_ENABLE VALUE = "N"/>
 </MOD_NETWORK_SETTINGS>
 </RIB_INFO>
 </LOGIN>
 </RIBCL>

Please note, the USER_LOGIN and PASSWORD tags are required but can be any value.

Execute the configuration as below with our xml file.

[root@ams-002 ~]# hponcfg -f cn1-ilo-config.xml
HP Lights-Out Online Configuration utility
Version 4.3.1 Date 05/02/2014 (c) Hewlett-Packard Company, 2014
Firmware Revision = 2.53 Device type = iLO 4 Driver name = hpilo
<INFORM> DHCP is currently disabled, enable DHCP to use any DHCP setting.</INFORM>
<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

Windows

C:\Program Files\HP\hponcfg>hponcfg /f cn1-ilo-config.xml

That’s it; you have the iLO set with new IP/Mask/Gateway and just try to access it.

 

Note : If you have already access to this iLO, you can do it directly using GUI or via CLI as below

Change the IP

set /map1/enetport1/lanendpt1/ipendpt1 IPv4Address=<ilo IP> SubnetMask=<ilo subnet mask>

Change gateway IP

set /map1/gateway1 AccessInfo=<iLO gateway>
Exit mobile version