Hpqlocfg batch management HP ILO practice

Time:2021-6-4

preface

HP ILO, Dell Idrac, IBM / Lenovo IMM and other names should not be unfamiliar to server hardware engineers. Of course, when the server is purchased and put on the shelves on a large scale, many small partners are expected to crash. OOB out of band management IP needs to be manually configured, and NTP and license also need to remember the configuration. If you forget, cough, it will be miserable. This time, we encountered that NTP time synchronization was not configured, which led to the display of time zone and time directly affecting the judgment of log collection in case of hardware failure. In order to avoid waste of human resources, we searched the Internet and found that HP ILO has its own batch management client program. I hope you can draw inferences from one instance and improve the efficiency of operation and maintenance.

HP lights out configuration utility batch management HP ILO 2 / 3 / 4

Update record

April 1, 2018 – first draft

Read the original-https://wsgzao.github.io/post…

Extended reading

HP ilo4 batch management-http://blog.51cto.com/gregdef…

Download HP ILO management software and templates

The information in extended reading has expired. Cpqlocfg is now renamed hpqlocfg, following the author’s idea. Thank you

RECOMMENDED * HP Lights-Out Configuration Utility
https://support.hpe.com/hpsc/…

HP lights out XML scripting sample for windows
https://support.hpe.com/hpsc/…

Practice method

Copy hpqlocfg.exe and related DLL files to the current path of the script

file://C:\Users\wsgzao\Desktop\ilo_ntp    (1 folders, 12 files, 211.96 KB, 3.70 MB in total.)
│  172.25.240.45    266 bytes
│  HPQLOCFG.exe    59.00 KB
│  HPQLOCFG.exe.config    712 bytes
│  HPSSLConnection.dll    13.50 KB
│  ilo_ntp.log    0 bytes
│  ip.txt    150 bytes
│  log.txt    2.24 KB
│  Parser.dll    133.00 KB
│  README.txt    2.03 KB
│  SetNTP.bat    181 bytes
│  SetNTP.xml    555 bytes
Operation steps.txt 381 bytes
└ - HP official documents (0 folders, 3 files, 3.50 MB, 3.50 MB in total.)
        HPE ILO 4 script and command line guide.pdf 2.95 MB
        SP58155.exe    392.67 KB
        windows-LOsamplescripts4.80.0.zip    168.34 KB

Writing XML file setntp.xml

<RIBCL VERSION="2.0">
    <LOGIN USER_LOGIN="iloadmin" PASSWORD="iloadmin">
        <RIB_INFO MODE="write">
            <MOD_NETWORK_SETTINGS>
                <DHCP_SNTP_SETTINGS value="No"/>
                <DHCPV6_SNTP_SETTINGS value="No"/>
                <SNTP_SERVER1 value="%ntp1%"/>
                <TIMEZONE value="Asia/Shanghai"/>
            </MOD_NETWORK_SETTINGS>
            <MOD_GLOBAL_SETTINGS>
                <PROPAGATE_TIME_TO_HOST VALUE="No" /> 
            </MOD_GLOBAL_SETTINGS>
        </RIB_INFO>
    </LOGIN>
</RIBCL>

Write batch setntp.bat

@echo off
for /f %%a in (ip.txt) do (
    set ip=%%a
    set ntp="172.25.240.254"
    call hpqlocfg -s %%ip%% -l log.txt -f SetNTP.xml -u iloadmin -p iloadmin -t ntp1=%%ntp%%
)

Two amendments

  1. Modify ip.txt and add information
  2. Modify set NTP in setntp.bat

Implementation method

SetNTP.bat