Popular Posts

Showing posts with label HP ILO. Show all posts
Showing posts with label HP ILO. Show all posts

Oct 22, 2020

Script to Update iLO Firmware

 Script to Update iLO Firmware


APPLIES TO :  HP iLO

ISSUE :  How to update iLO firmware for many servers in one go. 

GOAL :  Automate with scripts to update the iLO firmware. 

SOLUTION :  Create scripts using HP provided tools to automate the iLO firmware upgrade. 

Prerequisites :   A Linux jump server which can reach all the console IP's
                              or any Linux terminal - preferably Cygwin installed in your laptop.
                              Download Firmware rpm file
                              Download linux-LOsamplescripts5.30.0.tgz tool from HP

1. Download the rpm file of firmware.
            Link to down load the iLO Firmware version 2.30 (firmware-ilo5-2.30-1.1.x86_64.rpm)

2. Download HP tool to pass on the firmware in xml
            Download link linux-LOsamplescripts5.30.0.tgz

3. Extract the HP tool to get the Update_Firmware.xml file and locfg.pl file
            tar zxvf linux-LOsamplescripts5.30.0.tgz

4. Extract the rpm file to get the binary file
            $ rpm2cpio firmware-ilo5-2.30-1.1.x86_64.rpm | cpio -idmv
            ./usr/lib/x86_64-linux-gnu/firmware-ilo5-2.10-1.1
            ./usr/lib/x86_64-linux-gnu/firmware-ilo5-2.10-1.1/.cpq_package.inc
            ./usr/lib/x86_64-linux-gnu/firmware-ilo5-2.10-1.1/.setup
            ./usr/lib/x86_64-linux-gnu/firmware-ilo5-2.10-1.1/CP038707.xml
            ./usr/lib/x86_64-linux-gnu/firmware-ilo5-2.10-1.1/hpsetup
            ./usr/lib/x86_64-linux-gnu/firmware-ilo5-2.30-1.1/ilo5_230.bin
            ./usr/lib/x86_64-linux-gnu/firmware-ilo5-2.10-1.1/payload.json
            ./usr/lib/x86_64-linux-gnu/firmware-ilo5-2.10-1.1/setup
            ./usr/lib/x86_64-linux-gnu/hp-scexe-compat
            cpio: ./usr/lib/x86_64-linux-gnu/hp-scexe-compat/CP038707.scexe not created: newer or same age version exists
            ./usr/lib/x86_64-linux-gnu/hp-scexe-compat/CP038707.scexe
            ./usr/lib/x86_64-linux-gnu/scexe-compat
            cpio: ./usr/lib/x86_64-linux-gnu/scexe-compat/CP038707.scexe not created: newer or same age version exists
            ./usr/lib/x86_64-linux-gnu/scexe-compat/CP038707.scexe
            66357 blocks
            

5. Edit the file Update_Firmware.xml and provide the path of binary file which is extracted from the rpm
            <UPDATE_RIB_FIRMWARE IMAGE_LOCATION="/home/judi/ilo5_230.bin"/>

6. Execute manually in one server to test the xml file and firmware update.
            perl /home/judi/linux-LOsamplescripts5.30.0/locfg.pl -s 192.168.1.11 -f /home/judi/windows-LOsamplescripts4.50.0/Update_Firmware.xml -u ilousername -p ilopasswd

7. Now check the firmware version of that server.
            curl -ks "https://192.168.1.10/redfish/v1/Managers/1/" -k -u ilousername:ilopasswd | python -m json.tool | grep "FirmwareVersion"

8. Upon confirmation the functionality, write a script to update the firmware to all servers
            for i in `cat /home/judi/server_list`; do
                    perl /home/judi/linux-LOsamplescripts5.30.0/locfg.pl -s $i -f /home/judi/windows-LOsamplescripts4.50.0/Update_Firmware.xml -u ilousername -p ilopasswd
                    if [ $? -eq 0 ] ; then
                       echo "$i         - Done" >> /home/judi/log.out
                    else
                       echo "$i         - NOT" >> /home/judi/log.out
                    fi
            done 

9. Check the log.out file to know the status of the firmware update


~Judi~

Oct 5, 2020

Downloading the iLO Active Health System Log AHS by using cURL

 Download the Active Health System Log from iLO


1.    To download the entire Active Health System Log:

        curl "https://<iLO_IP_address>/ahsdata/ahs.ahs?downloadAll=1" -k -v -u <username>:<password> -o <filename>.ahs


2.    To download the Active Health System Log for the last seven days, and include a case number and contact information:

        curl "https://<iLO_IP_address>/ahsdata/ahs.ahs?days=<number_of_days>&case_no=<number>&contact_name=<name>&phone=<phone_number>&email=<email_address>&co_name=<company>" -k -v -u <username>:<password> -o <filename>.ahs

        curl "https://192.168.1.10/ahsdata/ahs.ahs?days=7&case_no=5642885983&contact_name=Judi&phone=09765898746&email=judi@judi.com&co_name=JUDI" -k -v -u iLOusername:iLOPassword -o 5642885983_CC200A1H76.ahs

Popular Posts