motogobi.com

Setting up PowerChute Network Shutdown in VMWare ESX 3.5

I currently admin a sizable VMWare ESX deployment hosting a couple dozen domains and over a hundred Windows servers. Most are for testing and could be rebuilt pretty quickly, but some are for production deployment – at least one of which is fairly irreplaceable. This past summer our office suffered some extended outages due to city-wide power interruptions, so it was a no-brainer to approve the purchase of PowerChute services for these servers. Turns out, APC is lagging a little on getting an ESX 3.5-compatible current version of PCNS out there so I decided to get v2.2.1 running on my five ESX hosts.

Here’s how I did it – mostly for my own future reference:

Step 1 – get the software

Obtain the PCNS 2.2.1 rpm (not 2.2.3, which won’t install) from APC:

ftp://ftp.apcc.com/apc/public/software/unix/linux/pcns/221vmware

Upload this to your ESX server using some utility like FileZilla or WinSCP over port 22. I just placed it in /tmp

Step 2 – open ESX firewall for PCNS

Now, open up some ports in the ESX firewall after opening up an SSH session to ESX (please note that the quotes in these statements will not copy over, it seems, in PuTTY. Make sure the config changes you submit have quotes in them):

esxcfg-firewall -o 80,tcp,out,”APC PowerChute Port 80″
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″

Step 3 – Install PNCS and configure

Switch the to directory you placed the rpm in and install using the following command:

rpm -ihv pcns-2.2.1-100.i386.rpm

Start the PCNS configuration script using the following command:

/usr/local/bin/PowerChute/PCNSConfig.sh

Some things to look out for when setting up PCNS using that command-line wizard:

  • I picked option 3 when running the script since I had 2 APCs to configure. Presumably you could pick option one for a single APC setup.
  • The script asks for the IP of the management card on the APC, the user name and password (I used the admin username/password) and then the Authentication Phrase. This phrase needs to be set up in the APC’s management interface prior to trying to connect this PCNS client – setup uses this phrase to register the client with the APC.
  • Once you finish the install script, it’ll ask you if you’d like to start the PCNS service – do so, then go to the URL of the PCNS web console for your ESX server: http://yourvmhostname:3052 and log in using the admin credentials you specified prior.

Step 4 – disable UPS shutdown

The final step that I chose based on this excellent writeup of installing PCNS was to disable the default behavior of shutting down the UPS once the client has shut down during a power event. Since I have several physical servers connected to these UPSes, I really didn’t want to mess with actually shutting down the APC itself automatically. To disable this, simply connect to the client web management console (the port 3052 link in step 3), navigate to “Configure Shutdown,” uncheck the box next to “Turn off the UPS after the shutdown finishes” and apply.

Further thanks for Stefan Schuller’s post on setting up PCNS and the commented link to the 2.2.1 rpm…


Categorised as: Virtualization


11 Comments

  1. [...] run a decent-sized, fairly simple ESX environment as I’ve mentioned before – so simple, in fact, that the powers that be feel I’m fine admin’ing at all [...]

  2. Jay says:

    hey, great instructions, im failing on install though, it is giving me 3 errors:
    cannot get exclusive lock on /var/lib/rpm/packages
    cannot open packages index using db3 – operation not permitted
    connot open packages database in /var/lib/rpm

    can you help?

  3. mike says:

    Sure, Jay – I checked around a little on that second error:

    cannot open packages index using db3

    This might point to problems with your rpm database on that ESX host. Have you tried the following?

    rpm –rebuilddb

    (there are two dashes in the front of rebuilddb)

    – mike

  4. Steffen says:

    Hello Mike,

    yes this works! (ESX 3.5 / Smart UPS 6000)
    Good Instruction, thank you!

    Steffen

  5. Chase Hansen says:

    Has this been tested on ESX 3.5U3?

  6. Just FYI, version 2.2.3 of PCNS works fine on ESX 3.5. I have just installed and configured it on my two ESX servers without any issues, although using a slightly different method to the one you described above.

    I simply copied the entire contents of the install CD to /tmp and then ran:

    [root@culonesx01 tmp]# chmod +x install.sh
    [root@culonesx01 tmp]# ./install.sh

    Toby

  7. PS. Additional ports need to be opened with version 223. Use these commands on the server to configure the firewall.

    esxcfg-firewall -o 80,tcp,out,”APC PowerChute Port 80″
    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″

  8. Jon V says:

    Hey, if you don’t power off the UPS, how does the server know when to turn back on after power is restored?

    I thought receiving power, is what told the server to start up?

  9. [...] …when I flipped the page over on my desk calendar this morning and noticed that the January 31st Virtualization Tip of the Day has this to say: It’s a best practice to keep the number of COS software installations to a minimum. Here’s a case that’s justified for some environments to ensure graceful host shutdowns. Mike at motogobi has done some leg work & put up a procedure: http://www.motogobi.com/2008/11/13/setting-up-powerchute-network-shutdown-in-vmware-esx-35/ [...]

  10. Hi there, I found this blog while in search of tips regarding blooms for a wedding ceremony. You have wonderful photographs this blog. What exactly are their titles it would be great to find out? I’d personally like to use some of them in my own arrangements. Thank you. Emma Alvarez

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>