preface

HP iLO, Dell iDRAC, IBM/Lenovo IMM and other names should be familiar to server hardware engineers. Of course, many partners will probably crash when the servers are purchased and put on the shelves in large scale. The IP of OOB out-of-band management needs to be manually configured. NTP and License also need to remember to configure, in case you forget, cough, that can be disastrous. This time, we encountered NTP time synchronization was not configured, leading to the display of time zone and time directly affecting the judgment of collecting logs when hardware failure. In order to avoid the waste of human resources, WE searched online and found that HP iLO has its own mass management client program, hoping that we can improve the efficiency of operation and maintenance by reference.

HP LIGHTs-out Configuration Utility Batch Management HP iLO 2/3/4


Update record

April 01, 2018 – First draft

Read the original – wsgzao. Making. IO/post/hpqloc…

Further reading

HP – blog.51cto.com/gregdefanhu ilo4 batch management…

Download the HP iLO management software and template

The information in the extended reading is out of date and cpQlocfg is now changed to HPQlocFG. Thanks for following the author’s ideas


It * HP towns – Out the Configuration Utility support.hpe.com/hpsc/swd/pu…

For Windows HP towns – Out XML Scripting Sample support.hpe.com/hpsc/swd/pu…

practice

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


File ://C:\Users\ wsGzao \ desk \ ilo_NTP (1 folders, 12 files, 311.9kb, 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 │ The readme.txt 2.03 KB │ SetNTP. Bat 181 bytes │ SetNTP. XML 555 bytes │ steps. TXT 381 bytes └ ─ HP official documents (0 folders, 3 files, 3.50 MB, 3.50 MB in total.) HPE is the iLO 4 script and command line guide. PDF 2.95 MB SP58155. Exe 392.67 KB Windows - LOsamplescripts4.80.0. Zip 168.34 KBCopy the code

Write the 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>
Copy the code

Write the 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%% )Copy the code

Two contents are modified


  1. Modify ip. TXT and add information
  2. Bat set NTP =”172.28.70.254″

Execution method


SetNTP.bat
Copy the code