Upgrading Firmware on ESXi

A bane of any system administrator’s existence is the constant stream of firmware updates to fix various bugs and issues that occur. One of these HBA Firmware updates is a fairly common issue where a new LUN or Target is not being discovered without a reboot. With Emulex there is a set of tools called the HBAanywhere that can be installed onto ESX Classic. Then you can perform an Emulex HBA Firmware upgrade without having to reboot the ESX Host.

Example script:

1
2
3
4
cd /usr/sbin/hbanywhere
./hbacmd listhbas
./hbacmd download 00:00:01:02:03:04:05 zd282a4.all
./hbacmd hbaattributes 00:00:01:02:03:04:05

With this you have just updated the firmware to 2.82a4 on an LPe11000-M4 card.

With ESXi it isn’t that easy since hbacmd isn’t available. The solution I came up with is to create a bootable WinPE CD with the Emulex Tools and firmware available on it. Then all you have to do is boot off this CD and you will be able to update your 10G CNA or your Emulex LPe12000 HBAs.

This script expects you to have the Windows AIK installed locally. Just update this script to point at the appropriate locations of the listed files.

CustomEmulexWinPE.cmd – Run this to create a bootable ISO that will install the Emulex WinPE utilities & drivers and then attempt to upgrade the 10G CNA & LPe12000 cards in the system.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
call "C:\Program Files\Windows AIK\Tools\PETools\pesetenv.cmd"
 
call copype x86 EmulexWinPE
 
imagex /mountrw Winpe.wim 1 mount
 
mkdir mount\Emulex
xcopy "setupElxAll-x86.exe" mount\Emulex\
xcopy /s "Firmware" mount\Emulex\
del mount\Windows\System32\startnet.cmd
xcopy "startnet.cmd" mount\Windows\System32\startnet.cmd
 
peimg /prep mount\Windows
imagex /unmount mount /commit
copy winpe.wim ISO\sources\boot.wim
 
oscdimg -n -betfsboot.com ISO EmulexWinPE.iso

startnet.cmd – This runs on boot and will attempt to update the 10G CNA & the Emulex LPe12000 cards in the system.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
wpeinit
 
\Emulex\setupElxAll-x86.exe /q
cd "\Program Files\Emulex\Util\elxApp"
 
winlpcfg download a=lpe12000-m8 i=\emulex\lpe12000\ud111a5.all
winlpcfg download a=lpe12000-m8 i=\emulex\lpe12000\ub202a2.prg
 
winlpcfg download n=1 i=\emulex\oce10102\s1462001.ufi
winlpcfg download n=2 i=\emulex\oce10102\s1462001.ufi
winlpcfg download n=3 i=\emulex\oce10102\s1462001.ufi
winlpcfg download n=4 i=\emulex\oce10102\s1462001.ufi
 
winlpcfg listhba

Once this script is done running you’ll have a EmulexWinPE.iso that you can mount and boot off of. It will automatically run and upgrade the firmware of the Emulex devices.

This basic setup should allow you to do anything scripting wise you need to do in a Windows environment to update the hardware configuration or run various diagnostics tests outside of ESXi.

Download Locations:
setupElxAll-x86.exe
Windows AIK
Emulex Firmware – Download as needed and update the location you copy it to your WinPE ISO file in the Startnet.cmd and in the CustomEmulexWinPE.cmd.

Emulex Supplied Hardware & HP PSP 8.25A don’t like each other

In one of the environments I work in, we use Emulex drivers on all Windows systems.   Along with that we use HP hardware.    HP provides this nice Proliant Support Pack (PSP) that makes things really nice and bundled together.   Along with that one can configure the PSP release around some parameters such as “Don’t Install the Qlogic drivers” or “Configure these mgmt agents with this as their master management server to send traps to” and so forth.  

In the past we would configure the HP enhanced drivers “Do Not Install”.   As these drivers don’t work real well with non-HP Emulex devices.  

Today I found out that you can not configure the Emulex Drivers in the PSP 8.25A release.   If you are using the Emulex supplied HBAs and are running the HP PSP pack, don’t use 8.25A.