The Ephebians made wine out of anything they could put in a bucket, and ate anything that couldn't climb out of one - Terry Pratchett, Pyramids


APC PCNS setup for VMware

Monday 16th March, 2009 | 9:27 pm

There’s a lot of confusion of APC’s PCNS software for VMware. Basically, ignore the generic instructions provided on the CD ;) This was tested on multiple ESX 3.5 Update 4 hosts and worked perfectly connected to a pair 2200′s. From what we could tell, the pay-for version is basically just PCNS 2.2.3 but with compatible VMware components. Nothing on the CD tells you this, and the instructions just add to the confusion. These setup steps figured out in conjunction with Kurt Bunker from GCS and posted here for reference.

Prior to configuring the PCNS software you need to configure the SNMP card with the following (note that the admin password and passphrase need to be the same on multiple APC units):

1. IP address
2. Administrative account password
3. Administrator Passphrase (minimum 15 char, Max 32)
4. Set APC SNMP settings for shutdown: UPS tab -> Configuration -> Shutdown -> Low Battery Duration

With the CD inserted, from the command line of your ESX host:

mount /dev/cdrom
cd /mnt/cdrom
./install.sh

During the install:

Instance '1'
Default install directory
Hit enter to automatically install JRE

Once install finished, open require firewall ports *before* running PCNSConfig.sh – you can only run the script once – even if you cancel out, it won’t run again unless you run the full uninstall script. If you’re unhappy about opening all these firewall rules, browse the forums to see exactly what they’re doing. We found they all needed to be open to function correctly.

esxcfg-firewall -o 80,tcp,out,"APC PowerChute Port 80"
esxcfg-firewall -o 2161,tcp,out,"APC PowerChute Port 2161"
esxcfg-firewall -o 2161,tcp,in,"APC PowerChute Port 2161"
esxcfg-firewall -o 2161,udp,out,"APC PowerChute Port 2161"
esxcfg-firewall -o 2161,udp,in,"APC PowerChute Port 2161"
esxcfg-firewall -o 3052,tcp,out,"APC PowerChute Port 3052"
esxcfg-firewall -o 3052,tcp,in,"APC PowerChute Port 3052"
esxcfg-firewall -o 3052,udp,out,"APC PowerChute Port 3052"
esxcfg-firewall -o 3052,udp,in,"APC PowerChute Port 3052"
esxcfg-firewall -o 6547,tcp,out,"APC PowerChute Port 6547"
esxcfg-firewall -o 6547,tcp,in,"APC PowerChute Port 6547"
esxcfg-firewall -o 6547,udp,out,"APC PowerChute Port 6547"
esxcfg-firewall -o 6547,udp,in,"APC PowerChute Port 6547"
esxcfg-firewall -o 6548,tcp,out,"APC PowerChute Port 6548"
esxcfg-firewall -o 6548,tcp,in,"APC PowerChute Port 6548"
esxcfg-firewall -o 6548,udp,out,"APC PowerChute Port 6548"
esxcfg-firewall -o 6548,udp,in,"APC PowerChute Port 6548"

With the ports open, configure the PCNS software:

cd /opt/APC/PowerChute/group1
./PCNSConfig.sh

During the configuration:

Select option '3' - Configure for multiple Smart-UPS devices
Enter IP address, port 80 (default), username, password, authentication passphrase
'Yes' to register settings
Enter IP of second card - username, password + phrase set already based on previous details
'No' to register another card
'Yes' to start the PCNS service

Note: you can start/stop/check status of thePCNS service in /etc/rc.d/init.d at any time such as /etc/rc.d/init.d/PowerChute start/status/stop

Can then load up http://esx-hostname:3052 in web browser and:

Configure Events - scroll down to UPS: On Battery
Click fourth column from the end
Check box for 'Yes, I want to shut down the system' and enter 60 seconds in box below
Select 'Configure Shutdown' from sidebar
Uncheck the box to 'Turn off the UPS after shutdown finishes'

Depending on what else you’ve tried to configure, these instructions might need tweaking to remove previous components, and the JRE might be picky. But, we pulled a UPS without the shutdown signal being sent, and then correctly initiated a shutdown when the second UPS became low on battery. Oh, and make sure you set your power management options in the BIOS correctly – as the UPS initiates a clean shutdown, when the power is restored, make sure the server is set to always power back on :-) On our R805′s, ‘Last’ is great in the event the power just drops whilst the server is running, but since it was shut down cleanly, will not power on with the UPS back online, needs to be set to ‘Always’.

    6 Responses to “APC PCNS setup for VMware”


  1. Gravatar ChrisM. (1 comment)
    United StatesInternet Explorer 7.0 Windows XP
    March 17th, 2009 at 3:44 pm
    Internet Explorer 7.0 Windows XP

    I just wanted to thank you for this docuement. This works for me to install the 2.2.3 version of the PCNS software.

  2. Gravatar Kirt S (1 comment)
    United StatesMozilla Firefox 3.0.10 Windows XP
    April 30th, 2009 at 9:09 am
    Mozilla Firefox 3.0.10 Windows XP

    I, too, thank you. I found the APC documentation just as confounding, (as always) and came to a similar conclusion. But there must be more to this – the only guest that went down cleanly on a test host was (of course) a Windows 2003 guest. A linux, solaris, and NetWare host were each cut off at the knees when the host shut off. The quest continues…

  3. Gravatar David I (1 comment)
    Great Britain (UK)Mozilla Firefox 3.5 Windows Vista
    July 10th, 2009 at 6:31 am
    Mozilla Firefox 3.5 Windows Vista

    I have managed to get all the way to brining up the web page on http://esx-hostname:3052 but am asked to log in. neither my root password nor the usual defaults of apc|apc seem to work. Can you advise?

    Also I am trying to register my ESX hosts with 2 ups as they are connected to both. The first has registered with no problems, but when trying to register the second it fails with “unable to communicate with management card”. Suggestions or help would be appreciated.

  4. Gravatar Rob (1 comment)
    United StatesGoogle Chrome 3.0.195.27 Windows Vista
    November 11th, 2009 at 1:32 pm
    Google Chrome 3.0.195.27 Windows Vista

    David,

    Did you ever work out your authentication issue when logging into esx-host:3052 ? I’m having the same issue.

  5. Gravatar wolfgang (1 comment)
    AustriaMozilla Firefox 3.5.8 Windows 7
    March 1st, 2010 at 6:43 am
    Mozilla Firefox 3.5.8 Windows 7

    you need to login with your apc username and password!

  6. Gravatar Steven (1 comment)
    CanadaGoogle Chrome 5.0.375.126 Windows XP
    August 13th, 2010 at 1:22 pm
    Google Chrome 5.0.375.126 Windows XP

    David,

    What happens if the power comes back after the shutdown, but at a point where the UPS hasn’t shutdown (not completely drained). We get many brief power outages.

    thanks

Leave a Reply


If you must, please use valid XHTML
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>