VMware Cloud Community
meistermn
Expert
Expert
Jump to solution

Powershell script to update bios of HP

Before upgrading to vsphere 5.0 , iwanted to upgrade the bios per ilo of the hp dl 380 g6 hosts.

Is this possible?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

You can use plink.exe to connect to the iLO interface and then launch commands.

Damian has a nice example in Modifying HP c-Class Blades via iLO and PowerShell


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
12 Replies
LucD
Leadership
Leadership
Jump to solution

You can use plink.exe to connect to the iLO interface and then launch commands.

Damian has a nice example in Modifying HP c-Class Blades via iLO and PowerShell


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
meistermn
Expert
Expert
Jump to solution

Any link, how to update several bios, like descibed in the following link ? The whole story is, I'm  setting up about 40 ESXi servers in remote locations around the world. http://communities.vmware.com/message/1995925#1995925

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Do you have the Virtual Media licensed under ILO on these servers.

The following paper describes a method that uses the ILO's Virtual Media.

It would be a matter of sending the commands to the server with plink.exe over the ILO connection.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
david615
Enthusiast
Enthusiast
Jump to solution

I have write-up on using PLINK and updating HP BIOS on my blog with iLO CD mapping examples.

Thankfully, new BIOS updates DVDs are automated.  If you can script CD mapping you can practically automate the whole BIOS update process.

It is important to use plink.exe ver 0.60_q1.129.

http://powerclinic.blogspot.com/2012/02/plink-plink-ssh-commands-over.html

http://powerclinic.blogspot.com/
LucD
Leadership
Leadership
Jump to solution

Great, very useful post.

Would you mind elaborating why that specific plink version ?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
david615
Enthusiast
Enthusiast
Jump to solution

If I remember correctly, this particular version has support for -auto_store_key_incache option work with batch.

Unfortunately, I can't find any documentation that justifies this claim.  However, I tried newest version of plink.exe and the automated script failed miserablly.

http://powerclinic.blogspot.com/
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Thanks for the feedback David


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
meistermn
Expert
Expert
Jump to solution

Thanks for the tip.

Is it although possible through HP smart start scripting tools.

I also ask HP if they have a powershell script for this. Smiley Wink 

0 Kudos
david615
Enthusiast
Enthusiast
Jump to solution

NP Luc. This version of plink does not require you to login to target machine and accepting the certificate prior to running the automated script.  It auto-stores the host key when the option is used.  There are not much info out there but changes.txt file has version update info.  You can find the file when you download the putty package.

http://powerclinic.blogspot.com/
0 Kudos
david615
Enthusiast
Enthusiast
Jump to solution

You can create customized HP toolkit ISO and automate the server configuration suchs as BIOS, RAID etc.  Make it part of your server BIOS update script using plink.exe to mount the ISO via iLO.

http://powerclinic.blogspot.com/
0 Kudos
meistermn
Expert
Expert
Jump to solution

If I understood right the ssh method only works with plink.exe ver 0.60_q1.129 . Right ?

What about CPQLOCFG.EXE ?

I came acroos this link

http://discovery.bmc.com/community/forum/viewthread/300/P0/

Assuming the default iLO host name is being used, command line utilities may be used to access it, whether DHCP or static addressing is being used. CPQLOCFG.EXE , the HP Lights-Out Configuration Utility, may be run on a Microsoft Windows based computer, using the host name as a target: CPQLOCFG -u [username] -p [password] -s [IP address | DNS name] -f Get_Network.xml -l [logfilename] -v .

Download link for CPQLOCFG.EXE

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?swItem=MTX-aaf40a6c32534b2e...&

RECOMMENDED * HP Lights-Out XML Scripting Sample for Windows
http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=18...


http://mukundaa.wikispaces.com/file/view/Best20Practices.pdf


RML examples
Below are two examples of XML scripts executed using CPQLOCFG.EXE’s command line syntax.
CPQLOCFG.EXE calls the XML file using the –f switch. Example 1 uses XML file 1
“InserteVirtualeMedia.xml” and example 2 uses XML file 2 “getevmcdestatus.xml”.
Example 1: cpqlocfg.exe -s 16.100.200.199 -f InserteVirtualeMedia.xml
XML file 1: InserteVirtualeMedia.xml
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="adminname" PASSWORD="password">
<RIB_INFO MODE="write">
<INSERT_VIRTUAL_MEDIA DEVICE="FLOPPY" _
IMAGE_URL="http://16.100.200.33/images/Floppy/dos.bin"/>
</RIB_INFO>
</LOGIN>
</RIBCL>
Example 2: cpqlocfg.exe -s 16.100.200.199 -f getevmcdestatus.xml
XML file 2: getevmcdestatus.xml
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="user" PASSWORD="password">
<RIB_INFO MODE="read">
<GET_VM_STATUS DEVICE="CDROM"/>
</RIB_INFO>
</LOGIN>
</RIBCL>

0 Kudos
david615
Enthusiast
Enthusiast
Jump to solution

Nice find.  Thanks for posting it.  I will definitly try it out. It seems to be viable alternative for working on HP servers.

However, I find plink to be ultimate utility because anything that uses SSH can be scripted using plink.

http://powerclinic.blogspot.com/