I was relocating my servers in a new rack and configuration and decided to put all my ILO ports to a different router with no DHCP. Obviously I ended up with some fake IP6 address defaulted to the ILO device.
To make the changes to ILO without a server reboot we have the nice hponcfg command under Linux and a windows utility with that name also.
Under Windows there is a nice graphical interface but I am going to focus on Linux command line.
Procedure to assign a new IP to ILO without server restart.
STEP 0: Install hponcfg
We assume that all the HP utility packages are installed including the hponcfg rpm package. The hponvfg package can be found on HP site in the HP Proliant servers software support sections.
STEP 1: Obtain the management processor configuration xml file.
[root@nas2 ~]# hponcfg -w ilo-nas2.xml
As a result we get:
[root@nas2 ~]# less ilo-nas2.xml <GATEWAY_IP_ADDRESS VALUE = "0.0.0.0"/> <DNS_NAME VALUE = "ILOCZ1443001K"/> <PRIM_DNS_SERVER value = "192.168.1.1"/> <DHCP_ENABLE VALUE = "Y"/> <DOMAIN_NAME VALUE = ""/> <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 = "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 = "voinageo" USER_LOGIN = "voinageo" 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>
We can see above that by default DHCP client is enabled not static IP and because we do not have a DHCP server active a bogus 0.0.0.0 IP appears.
STEP 2: Create the configuration XML
Based on the above XML change the XML and set-up:
1. Static IP
<IP_ADDRESS VALUE = “192.168.5.2”/>
2. Net mask
<SUBNET_MASK VALUE = “255.255.255.0”/>
3. The Gateway IP
<GATEWAY_IP_ADDRESS VALUE = “192.168.5.1”/>
4. The name of ILO device. We give a nice name to easy identify it.
<DNS_NAME VALUE = “ILO-NAS2″/>
5. The primary DNS server , the same as the gateway in my case.
<PRIM_DNS_SERVER value = “192.168.5.1”/>
6. Turn off DHCP client
<DHCP_ENABLE VALUE = “N”/>
7. Remove the <USER_INFO section
The final XML looks like:
[root@nas2 ~]# less ilo-nas2.xml <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.5.2"/> <SUBNET_MASK VALUE = "255.255.255.0"/> <GATEWAY_IP_ADDRESS VALUE = "192.168.5.1"/> <DNS_NAME VALUE = "ILO-NAS2"/> <PRIM_DNS_SERVER value = "192.168.5.1"/> <DHCP_ENABLE VALUE = "N"/> <DOMAIN_NAME VALUE = ""/> <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 = "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> </LOGIN> </RIBCL>
STEP 3: Apply the new configuration file
[root@nas2 ~]# hponcfg -f ilo-nas2.xml HP Lights-Out Online Configuration utility Version 4.5.0 Date 07/17/2015 (c) Hewlett-Packard Company, 2015 Firmware Revision = 2.40 Device type = iLO 4 Driver name = hpilo DHCP is currently disabled, enable DHCP to use any DHCP setting. Integrated Lights-Out will reset at the end of the script. Please wait while the firmware is reset. This might take a minute Script succeeded
STEP 4: Check the new IP
[root@nas2 ~]# ping 192.168.5.2 PING 192.168.5.2 (192.168.5.2) 56(84) bytes of data. 64 bytes from 192.168.5.2: icmp_seq=1 ttl=253 time=0.713 ms