Tripp Lite SV20KM1P1B Users Guide for PowerAlert Network Shutdown Agent PANSA - Page 13

PANSA for Non-vMA Operating Systems

Page 13 highlights

4. VMware Implementation (ESXi Server Environments) 4.1.3 Modifying and Configuring Scripts PANSA manages and monitors a device-typically a UPS-and then optionally executes a command or script that instructs the computer to perform some process upon receiving a critical event, such as a power outage. The PANSA installation provides sample command-line scripts that trigger the ESXi shutdown. However, these scripts must be modified and configured for use in your environment as follows: 1. From the vMA terminal, change to the /var/tripplite/poweralert directory cd /var/tripplite/poweralert 2. Copy the desired script to the /home/vi-admin directory cp shutdownesxi.sh /home/vi-admin/shutdownesxi.sh or cp shutdownvms.sh /home/vi-admin/shutdownvms.sh Note: Use shutdownesxi.sh if the ESXi servers are not part of an HA cluster and shutdownvms.sh if the ESXi servers are part of an HA cluster 3. Change to the home directory cd /home/vi-admin. 4. Change the script attributes by using the command sudo chmod 755 shutdownesxi.sh or sudo chmod 755 shutdownvms.sh 5. Edit the configuration file by typing sudo vi shutdownesxi.sh or sudo vi shutdownvms.sh 6. Press the Insert key to change vi to Insert mode and change the parameters in the selected script as required. See comments in the scripts or Appendix A in this document for details. 7. Save the changes to the script by typing :wq =carriage return (e.g. press the "Enter" or "Return" key on your keyboard). Note: It is recommended that you test your modified script before use within PANSA to ensure successful performance. Note: Each script can be extended to perform whatever actions are desired. Sample scripts, which include shutting down multiple hosts and shutting down hosts in High Availability (HA) clusters, can be found in Appendix A. 4.2 PANSA for Non-vMA Operating Systems PANSA can be installed on any supported virtual or physical machine with network access to the ESXi hosts and provide the same functionality as the vMA. In addition to the prerequisites described in the vMA configuration, the VMware vSphere CLI will need to be installed on the same operating system as where PANSA will be installed. This section outlines the steps required to install PANSA on a nonvMA virtual machine. Step 1. Install VMware Tools on the target virtual machine (refer to Step 2 in Section 4.1.1 for details). Step 2. Configure shutdown settings on the host ESXi server (refer to Step 3 in Section 4.1.1 for details). Step 3. Install VMware's vSphere CLI. VMware's vSphere CLI provides the same scripting functionality as is built into the vMA. Visit VMware's web site to download and install the vSphere CLI onto the target virtual machine. Step 4. Install the version of PANSA respective to the target VM's operating system. Note: Beginning with version 6.5 of the VMware vSphere CLI, users are required to install Perl (ActivePerl or Strawberry Perl version 5.14 or later as of this writing) separately from the VMware vSphere CLI. Users may prefer to install an earlier version of the VMware vSphere CLI instead. Currently, version 6.0, which includes Perl, can be found at the link below: https://my.vmware.com/web/vmware/details?downloadGroup=VCLI600&productId=491 The PANSA download contains all files required for installation and configuration onto the VM or physical machine. If the VM or physical machine is using Windows, refer to Section 2. for installation and configuration instructions. In Windows, the sample script files will install with PANSA and be found at "C:\Program Files (x86)\TrippLite\PowerAlert". In Linux, the script files will install with PANSA and be found at / var/tripplite/poweralert. If the VM or physical machine is using Linux, refer to Section 3. for installation and configuration instructions. 13

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21

13
4. VMware Implementation (ESXi Server Environments)
4.1.3 Modifying and Configuring Scripts
PANSA manages and monitors a device—typically a UPS—and then optionally executes a command or script that instructs the computer to
perform some process upon receiving a critical event, such as a power outage. The PANSA installation provides sample command-line scripts
that trigger the ESXi shutdown. However, these scripts must be modified and configured for use in your environment as follows:
1. From the vMA terminal, change to the /var/tripplite/poweralert directory
cd /var/tripplite/poweralert
2. Copy the desired script to the /home/vi-admin directory
cp shutdownesxi.sh /home/vi-admin/shutdownesxi.sh
or
cp shutdownvms.sh /home/vi-admin/shutdownvms.sh
Note:
Use shutdownesxi.sh if the ESXi servers are not part of an HA cluster and shutdownvms.sh if the ESXi servers are part of an HA cluster
3. Change to the home directory
cd /home/vi-admin
.
4. Change the script attributes by using the command
sudo chmod 755 shutdownesxi.sh
or
sudo chmod 755 shutdownvms.sh
5. Edit the configuration file by typing
sudo vi shutdownesxi.sh
or
sudo vi shutdownvms.sh
6. Press the Insert key to change vi to Insert mode and change the parameters in the selected script as required. See comments in the
scripts or Appendix A in this document for details.
7. Save the changes to the script by typing
:wq<CR>
<CR>=carriage return (e.g. press the “Enter” or “Return” key on your keyboard).
Note:
It is recommended that you test your modified script before use within PANSA to ensure successful performance.
Note:
Each script can be extended to perform whatever actions are desired. Sample scripts, which include shutting down multiple hosts and shutting down
hosts in High Availability (HA) clusters, can be found in Appendix A.
4.2 PANSA for Non-vMA Operating Systems
PANSA can be installed on any supported virtual or physical machine with network access to the ESXi hosts and provide the same
functionality as the vMA. In addition to the prerequisites described in the vMA configuration, the VMware vSphere CLI will need to be
installed on the same operating system as where PANSA will be installed.
This section outlines the steps required to install PANSA on a non-
vMA virtual machine.
Step 1.
Install VMware Tools on the target virtual machine (refer to Step 2 in
Section 4.1.1
for details).
Step 2.
Configure shutdown settings on the host ESXi server (refer to Step 3 in
Section 4.1.1
for details).
Step 3.
Install VMware’s vSphere CLI.
VMware’s vSphere CLI provides the same scripting functionality as is built into the vMA. Visit VMware’s web site to download and install the
vSphere CLI onto the target virtual machine.
Step 4.
Install the version of PANSA respective to the target VM’s operating system.
Note:
Beginning with version 6.5 of the VMware vSphere CLI, users are required to install Perl (ActivePerl or Strawberry Perl version 5.14 or later
as of this writing) separately from the VMware vSphere CLI. Users may prefer to install an earlier version of the VMware vSphere CLI instead.
Currently, version 6.0, which includes Perl, can be found at the link below:
The PANSA download contains all files required for installation and configuration onto the VM or physical machine. If the VM or physical
machine is using Windows, refer to
Section 2
. for installation and configuration instructions. In Windows, the sample script files will install
with PANSA and be found at “C:\Program Files (x86)\TrippLite\PowerAlert”. In Linux, the script files will install with PANSA and be found at /
var/tripplite/poweralert. If the VM or physical machine is using Linux, refer to
Section 3
. for installation and configuration instructions.