Unattended upgrade of HP management agents

After upgrading to ESX 3.5 to update3, I found out that the HP management agents needed to be upgraded to version 8.1.1, since this version supports ESX3.5 update3. So I downloaded the new agents and decided to install the latest HBAAPI libraries from Qlogic too. These HBA libraries are not part of the HP agents packages anymore since version 8.x. Download the libraries for the driver loaded in the vmkernel from the following links:

Link for Emulex libraries:
(Be sure to consult the README, because additional actions are required for Emulex)

Link for Qlogic libraries:

When walking through the README of the HP management agents it became clear to me that upgrading my agents is not supported and I had to uninstall the old agents first. So we have the following options available for (un)installing:


So obviously there is no silent uninstall option, so lets uninstall the old agents interactively then. When performing the uninstall I’m only asked if I want to continue for 2 times, so there must be a smarter solution for this. I don’t want to uninstall the agents manually on all my 60+ ESX hosts. After trying some shell options, I came up with this command line:

echo -e ‘y\ny’ | ./installvm811.sh -–uninstall

This command will echo my two answers to continue and pipe them to the install script. This seems to work although the colour scheme of my shell gets mixed up, but that is not what I worry about, since starting a new shell or issuing another command will set things back to normal.

To uninstall the Qlogic HBAAPI libraries just switch to the directory you unpacked the archive in and enter:


My system is now ready for installing the new agents. First we start with installing the new Qlogic HBAAPI libraries:


Next we’re up to installing the new HP management agents and since I don’t want do thing by hand I’m going for the silent installation. So we need a configuration file as input first. If you unpack your HP package there is an example file included called hpmgmt.conf.example. Edit this file to your own needs. All the options are well documented inside the file.

To automate the configuration of the System Management Homepage, we need a copy of the smhpd.xml file with the desired settings.
This file is located at /opt/hp/hpsmh/conf/
If  you do a test install, you can then configure the Systems Management Homepage through the web interface. After configuring save a copy of the smhpd.xml file into the same directory as the ./installvm811.sh script.

We can silently install the HP management agents with the following command:

./installvm811.sh --silent --inputfile hpmgmt.conf

We now have all the requirements in place to create our own unattended install script. Just put all the files somewhere where you can access them from your ESX host. I decided to include the version number into the names of the config files, so they’re named hmmgmt811.conf and smhpd811.xml.
After a struggle with the commandshell I came up with this script:

# +-----------------------------------------------------+
# | HP Insight Manager Agents unattend install Script   |
# |                                                     |
# | Version : 1.0                                       |
# | Author  : Arnim van Lieshout                        |
# +-----------------------------------------------------+

# +-----------------------------------------------------+
# | Setting some variables                              |
# +-----------------------------------------------------+


# +-----------------------------------------------------+
# | Download files                                      |
# +-----------------------------------------------------+

/usr/sbin/esxcfg-firewall --allowOutgoing

lwp-download http://repository.mydomain.com/hpagents/$HPPACKAGE /tmp/$HPPACKAGE
lwp-download http://repository.mydomain.com/hpagents/$HBAPACKAGE /tmp/$HBAPACKAGE
lwp-download http://repository.mydomain.com/hpagents/$HPCONFIG /tmp/$HPCONFIG
lwp-download http://repository.mydomain.com/hpagents/$HPSMHCONFIG /tmp/$HPSMHCONFIG

/usr/sbin/esxcfg-firewall --blockOutgoing

# +-----------------------------------------------------+
# | Unpack archives                                     |
# +-----------------------------------------------------+

cd /tmp
tar -zxvf $HPPACKAGE
mkdir /tmp/hbaapi
tar -C /tmp/hbaapi -zxvf $HBAPACKAGE
cp /tmp/$HPSMHCONFIG /tmp/hpmgmt/$HPVERSION/smhpd.xml

# +-----------------------------------------------------+
# | Uninstall old packages                              |
# +-----------------------------------------------------+

cd /tmp/hpmgmt/$HPVERSION
echo -e 'y\ny' | ./installvm${HPVERSION}.sh --uninstall
cd /tmp/hbaapi

# +-----------------------------------------------------+
# | Install new packages                                |
# +-----------------------------------------------------+

cd /tmp/hbaapi
cd /tmp/hpmgmt/$HPVERSION
./installvm${HPVERSION}.sh --silent --inputfile /tmp/$HPCONFIG

# +-------------------------------------------------------------+
# | For some apparent reason there is some sort of timing issue |
# | in the installation. restarting hpasm is a workaround       |
# +-------------------------------------------------------------+

service hpasm restart

You can download te script here.

The only thing left is distributing and executing this script on all of my ESX hosts. I use the plink.exe utility for this which is part of the putty package, but there are other alternatives. Feel free to use and change this script to your own needs. I used an http repository for storing my files since my complete unattended ESX installation is build on it, but you can use NFS or FTP also.

Oh and remember: I do not take any responsibilities for things that happen to your ESX servers due to using this script.

Related posts:

  1. Monitor ESX datastores using Hostmonitor Tweet A lot of customers I worked with use Advanced Hostmonitor from KS-Soft to monitor their Windows environment. So is the customer I  am currently working at. Advanced Hostmonitor is...
  2. Unable to login to your ESX server Tweet Ivo Beerens posted this article last week on the defunct cimservera processes that render an ESX Host unmanageable. See also this VMWare KB Article. Symptoms include: Unable to log...

10 Comments on “Unattended upgrade of HP management agents”

  1. #1 TechHead
    on Mar 22nd, 2009 at 1:19 pm

    Hi Arnim,

    Nice script! Will come in very useful.



  2. #2 tomas ten Dam
    on Mar 23rd, 2009 at 8:53 am

    Great usefull infomartion here! I am going to use this script!
    Also great for uda deployments to insert this script.


  3. #3 Arnim van Lieshout
    on Mar 27th, 2009 at 2:28 pm

    Thanks for the comment
    I’m glad you guys like it.

  4. #4 Dutch
    on Apr 15th, 2009 at 1:04 pm

    Nice uninstall trick! Up to HP Agents 8.2 it is :)
    (which makes it even more complex)

    Instead of plink, you might also use Mac-Ro-Knife (free) or Altiris / HP RDP

  5. #5 VirtualProUK
    on Nov 8th, 2009 at 1:17 pm

    Hi Arnim

    Great script, wish I had seen it sooner as I may have avoided my current issue.

    I’m having issues adding the Qlogic libraries, I only discovered the fact that the libs are not in HP Agents 8.2.0 after the agents had been installed and the servers put back in to usage.

    I stop HPASM and HPSMHD services and install the libraries and start them all back up in the order dictated within the HP read me.

    Still get no HBA’s within HP insight manager. I’m wondering if the libraries have to be in place before the installation to work. Or is it just that the ESX server needs a reboot to get it working?

    Any help you could offer would be much appreciated



  6. #6 VirtualProUK
    on Nov 8th, 2009 at 1:44 pm

    Completely ignore me, what an idiot!!

    Was testing on a development ESX box with an emulex HBA!?!?!

    Went to the production box installed in the same way and it worked perfectly.

    It’s been a long weekend of upgrading, think I need some rest

  7. #7 How to: Install QLogic HBA Libraries for HP Insight Manager on ESX 3.5 / 4 | VirtualPro
    on Nov 8th, 2009 at 11:53 pm

    [...] the libraries before installing HP Insight Manager as indicated by Arnim Van Lieshout in his great HP agent upgrade script post.  In my case I had already done the install, so in order to see the HBA’s and the connected HP [...]

  8. #8 Support your favourite blog. Vote Now! | Arnim van Lieshout
    on Jan 6th, 2010 at 10:51 am

    [...] Unattended upgrade of HP management agents [...]

  9. #9 Good Article – Unattended Upgrade of HP Management Agents on a VMware ESX host. | TechHead.co.uk
    on Jan 17th, 2010 at 10:51 pm

    [...] Van Lieshout has written a really good article on performing an unattended upgrade of HP management agents on a VMware ESX U3 host.  This can [...]

  10. #10 Unattended upgrade of HP management agents - Part 2 | Arnim van Lieshout
    on Mar 4th, 2010 at 10:02 am

    [...] 2010 by Arnim van Lieshout. It’s been a year since I blogged about my script to perform an unattended upgrade of the HP management agents 8.1.1 on ESX 3.5 U3. After HP upgraded their management agents to version 8.2.0 some things changed. [...]

Leave a Comment