Date: Feb 17 2014 How this package was built: 1) Installed Centos 3.9 and all development tools from the Centos 3.9 install CDs under Virtualbox 2) Pulled latest apcupsd from svn repository 3) ./configure followed by make 4) make install, then created oem.tgz file by doing the following: cp /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf.new modify apcupsd.conf to remove serial entry cd /root mkdir oem cd oem mkdir sbin mv /sbin/apcupsd sbin mv /sbin/apctest sbin mv /sbin/apcaccess sbin mv /sbin/smtp sbin mkdir etc mv /etc/apcupsd etc cd etc mkdir rc.local.d cd rc.local.d vi S70apcupsd.sh #!/bin/sh apcupsd=/usr/sbin/apcupsd echo "***************" echo "starting APCUPSD" echo "***************" $apcupsd chmod a+x S70apcupsd.sh cd /root/oem tar cvf - * | gzip -9 > ../oem.tgz (this creates the new oem.tgz) copy the new oem.tgz file to the website and rename it. How to install: To install the VMWare ESXi client on ESXI 4.1 (and it may work on 5.0, but not 5.1 or later) do the following: First, the instructions are different for a plain vanilla ESXi 4.11 vs a Dell or HP release of ESXi. The reason is that those companies add software that talks to their hardware, into their customized version of ESXi. So an oem.tgz file will already exist. You DO NOT want to overwrite that! Instead you want to merge it with your oem.tgz You will need to modify the apcupsd.conf file before installing it. Use an editor on a Unix/Linux box so that the unix textfile is preserved. We will call that box the staging system. You will need the tech support shell running on the ESXi system. Download oem.tgz.apcupsd.vmware411 to the staging system, rename to oem.tgz extract and modify by doing the following: mkdir oem cd oem tar xvf ../oem.tgz cd .. ren oem.tgz oem.tgz.bak (to protect from overwrite) cd oem/etc/apcupsd/apcupsd.conf add monitor statement for your UPS to apcupsd cd ../../ Recreate the oem.tgz file tar cvf - * | gzip -9 > ../oem.tgz Now you have your oem.tgz file configured for your ESXi system. You can skip ahead to install this on a vanilla ESXi system without an existing oem.tgz or to merge it with an existing oem.tgz, do the following: ssh to esxi server cd bootbank at esxi command line: scp oem.tgz yourusername@172.16.1.42:oem.tgz (assuming 172.16.1.42 is the staging system) This will overwrite the oem.tgz file you just created, on the staging system Now go back to the staging system. You should have the oem.tgz file from the ESXi system, and a directory named oem that contains the contents of the oem.tgz file that had apcupsd in it and that you modified. cd oem tar xvf ../oem.tgz (this merges the existing oem with the apcupsd one. If the existing oem.tgz is empty then don't merge them) tar cvf - * | gzip -9 > ../oem.tgz (this creates the new oem.tgz) on esxi do: cd bootbank scp yourusername@172.16.1.42:oem.tgz oem.tgz cd .. tar tzvf /bootbank/oem.tgz (this makes sure it's OK) Logout of the esxi system Go into vsphere client and shutdown the guests then restart the ESXi server SSH back into ESXi and ~ # ps | grep apcupsd to be sure it's running. NOTE: This only shuts down esxi gracefully. If the guests do not have vmware client running on them they won't be gracefully shut down. So run apcupsd on any guests without vmware tools, too.