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 – https://wsgzao.github.io/post/hpqlocfg/
Further reading
HP ilo4 batch management – http://blog.51cto.com/gregdefanhua/2089408
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
RECOMMENDED * HP Lights-Out Configuration Utility https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_d7e7146b56324eb0879f0a98e2#tab1
HP Lights-out XML Scripting Sample for Windows https://support.hpe.com/hpsc/swd/public/detail?swItemId=MTX_f045db3f567040f291bf645684#tab1
practice
Copy hpqlocfg. exe and related DLL files to the current script path
File ://C:\Users\wsgzao\ desk \ ILo_NTP (1 folders, 12 files, 211.9kb, 3.70 MBinTotal.) │ 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 ├ ─ ├ ─ └ (0 folders, 3 files, 7.08 MB, 7.08 MB.inTotal.) 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
- Modify ip. TXT and add information
- Bat set NTP =”172.28.70.254″
Execution method
SetNTP.batCopy the code