Installing APC UPS PowerChute Network Shutdown Software on VMware vSphere Management Assistant for use with VMware ESXi Hosts Walkthrough Guide
The examples in this walkthrough use the current latest versions (01 Dec 2011) of PowerChute Network Shutdown v3.0.0 and vMA 188.8.131.52
Part 1: Download PowerChute Software
Go to: www.apc.com/tools/download
Select a Product Name = PowerChute Network Shutdown
Filter by Operating System = VMware ESXi
Download PowerChute Network Shutdown
The downloaded file will be named something like pcns300ESXi.tar.gz
*Note: Requires a login account for www.apc.com
Part 2: Download and deploy VMware vSphere Management Assistant (vMA)
*Note: If already have a vMA, please ignore this part
Go to: downloads.vmware.com
Select VMware vSphere → Select Drivers & Tools → Download VMware vSphere Management Assistant (vMA)
*Note: vMA version 5 will work fine in a vSphere 4.X environment
The downloaded file will be named something like vMA-184.108.40.206-472630.zip
Extract the files from the zip file
Deploy the vMA via a vSphere Client → File menu → Deploy OVF Template... and follow the prompts to complete, deploying from the .ovf file extracted previously.
Power on the vMA on a suitable virtual network, follow the prompts to apply a network configuration, provide a password for the vi-admin user, and this part is done!
*Note: vMA 5 uses virtual hardware version 4, so will run on old ESX 3.X hosts.
*Note: the vMA can be managed via https://IP_of_vMA:5480
Part 3: Uploading and installing PowerChute Network Shutdown into vMA
Use a tool lke WinSCP to copy the PowerChute Network Shutdown software (pcns300ESXi.tar.gz) to the tmp directory on the vMA
Using the vMA command line via the console or a remote SSH session, and logged in as vi-admin, run the following commands in turn:
sudo chmod 777 /etc/rc.d
sudo mkdir /etc/rc.d/init.d
sudo gunzip pcns300ESXi.tar.gz
sudo tar -xvf pcns3000ESXi.tar
Press any key to display and scroll through the End User License Agreement
Type yes to the question 'Do you agree to the above license terms? [yes or no]'
Press enter to accept the default installation directory (/opc/APC/PowerChute)
Type yes to the question 'Are you sure you want to install PCNS to /opt/APC/PowerChute [Yes|No]?'
Type /usr/java/jre-vmware/bin to the question 'Please enter java directory if you want to use your system java or press enter to install the bundled Java:'
*Note: vMA 220.127.116.11 comes with Java pre-installed and this is suitable for PCNS
Type q to skip entering an ESXi host IP for now
*Note: See Output in Appendix below
Part 4: Adding the ESXi Hosts
From the vMA command line, use the following command to add ESXi Hosts
vifp addserver IPADDRESSofESXiHOST
Part 5: Configuration via the PCNS Web UI
Connect to: https://vMA_IP_Address:6547 to access the Configuration Wizard, and follow through the Wizard to complete the configuration of PCNS.
Configuration Wizard: Welcome
Configuration Wizard: Security
Enter User Name (This must be the username used to log on to the Network Management Card (NMC) Web UI. It is used both to communicate with the NMC, and log into PCNS)
Enter Password (This password will be used to log into PCNS)
Enter Authentication Phrase (This must match the PowerChute authentication phrase configured on the NMC)
Configuration Wizard: UPS Electrical Configuration
Select how the UPS's are configured
Using power from a single UPS
Redundant: Two or more UPS providing redundancy, with multiple power cables from the computer
Parallel: Two or more UPS combined in parallel as a single power supply
Configuration Wizard: UPS Details
Enter NMC Protocol
Enter NMC Port
Enter NMC IP address(es)
Configuration Wizard: Miscellaneous
Choose whether PCNS will automatically check for updates
Choose whether the UPS should turn off after shutdown finishes
Configuration Wizard: Confirm
Appendix: vMA Command Line Output
login as: vi-admin
Welcome to vSphere Management Assistant
vi-admin@localhost:~> sudo chmod 777 /etc/rc.d
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
vi-admin@localhost:~> sudo mkdir /etc/rc.d/init.d
vi-admin@localhost:~> cd /tmp
vi-admin@localhost:/tmp> sudo gunzip pcns300ESXi.tar.gz
vi-admin@localhost:/tmp> sudo tar -xvf pcns300ESXi.tar
vi-admin@localhost:/tmp> cd ESXi
vi-admin@localhost:/tmp/ESXi> sudo ./install_en.sh
Do you agree to the above license terms? [yes or no]
Please enter the installation directory or press enter to install to the default directory (/opt/APC/PowerChute):
Are you sure you want to install PCNS to /opt/APC/PowerChute [Yes|No]?
Creating /opt/APC directory ...
PCNS will be installed to /opt/APC/PowerChute
Please enter java directory if you want to use your system java (example:/usr/local/bin/jre/jre1.6.0_24) or press enter to install the bundled Java:
Checking version of Java ...
Detected Java Version: 18.104.22.168
java version "1.6.0_20"
Java(TM) Platform, Standard Edition for Business (build 1.6.0_20-b02)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode)
Copying the installation files ...
Extracting PCNS files ...
PCNS is extracted to /opt/APC/PowerChute
Configuring startup files ...
Updating Linux symbolic link ...
PowerChute: unknown service
PowerChute: unknown service
In order for PCNS to shutdown the ESXi host, it must be added as a target server.
Please enter ESXi host IP (XXX.XXX.XXX.XXX) or (q) to skip:
Skipping configuration of ESXi Host Shutdown.
Configuring uninstall script ...
Setup the m11.cfg file
PowerChute Network Shutdown, v3.0.0
Copyright (c) 1999-2011, Schneider Electric. All Rights Reserved.
Installation has completed.
PowerChute Network Shutdown can be accessed through your browser at https://
Please complete the configuration wizard so that PowerChute Network Shutdown can protect your server.
vi-admin@localhost:/tmp/ESXi> vifp addserver 10.122.130.51
Thanks for the very nice instructions. I did not manage to user WinSCP or any other (S)FTP Software to connect to the vMA 5.0. How do you enable that.ReplyDelete
PS: Error message is somithing like "No connection could be made because the target machine actively refused it.
PPS: I did manage to do WinSCP into a vMA 4.x machine allright without changing any settings but there the APC Agent would not run smoothly...ReplyDelete
Hi Anonymous, thank you for the comment. By default the vMA 5.0 allows access via SSH and port number 22 which WinSCP uses by default, so you should be fine. If you can telnet to the vMA IP on port 22, double-check the credentials for the vi-admin user (try logging into the console.) The vMA 5.0 default password complexity policy is pretty strong. Cheers!ReplyDelete
I ran accross the same issue as I could not log into the the VMA via WinSCP, but figured it out...My VMA was on a different vLAN than my PC. When I logged into a PC on the same vLAN it worked fineReplyDelete
hi vidad, can help me or post how to install powerchute in redhat osReplyDelete
Hello Unknown, if you follow the above at part 1 (for the download from www.apc.com/tools/download), and choose Linux for operating system, then APCs website should give you the manual and the pcns220lnx. Without reading the instructions nor having a RedHat box, I'm guessing you need to extract from the downloaded file onto your RedHat server, and the run the install (./install or install) Cheers!Delete
i have same problem "I ran accross the same issue as I could not log into the the VMA via WinSCP, but figured it out...My VMA was on a different vLAN than my PC. When I logged into a PC on the same vLAN it worked fine"ReplyDelete
I have noticed that rebooting VMA machine causes port 6547 to be no longer opened and hence no management of pcns is available. Is it OK? Does it mean that pcns is no longer running? How can I restart it, or open the 6547 port again? (Opening requires root account, which as I understand is disabled).
If just the managemement port 6547 is closed then should be fine. You should be able to login to the VMA (perhaps using a user account and 'su -' to root) and edit the firewall properties config file so that the port stays open.
Great write up. Appreciate your time in making this information available.
Great write up. I follwed it step by step and worked fime for me.ReplyDelete
I would like to know if I need to do anything after the install? How do I set the VM's to shut down gracefully in the event of power failure?
To shut down gracefully you only have to check the Virtual machine Startup and Shutdown Systems Settings in the configuration tab.ReplyDelete
Change the Shutdown Action to Guest Shutdown.
Awesome Artical Really i have searching this type of valuable information From a lot of days i found satisfaction when Read your blog Thanks for giving this type blog and also please Read link bvba Woodstone which provide information server monitoring software & Network monitoring tools: http://www.woodstone.nu/saliveReplyDelete
Thank You For Such a Great Information!!!!!ReplyDelete
Do You Have a Local business?????
Then List Your Business in amlooking4 to get More Visibility and Target your Potential Audience.
SignUp @ amlooking4.com