Tripp Lite SV20KM1P1B Users Guide for PowerAlert Network Shutdown Agent PANSA - Page 16
APPENDIX A - Sample Scripts, Technical Support
View all Tripp Lite SV20KM1P1B manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 16 highlights
6. Technical Support Before contacting Tripp Lite Technical Support, refer to Section 5. for possible solutions. If you are still unable to resolve the problem, contact Tripp Lite Technical Support at: E-mail: [email protected] Web: The latest PowerAlert software updates are available at tripplite.com/software/ Technical Support Assistance: tripplite.com/support APPENDIX A - Sample Scripts The PANSA installation provides several sample command-line scripts for both Windows and Linux operating systems. In Windows, the sample script files will be found at "C:\Program Files (x86)\TrippLite\PowerAlert". In Linux, the script files will be found at /var/tripplite/ poweralert. This appendix describes these sample scripts. Also, refer to comments inside the file for further instructions on configuring the scripts for your environment. Note: Each sample script shown in this appendix requires that user names and passwords be entered in their appropriate command line spaces. Normal alphanumeric characters can generally be written as is; however, some special characters such as !, #, % and $ need to be prefixed with a backslash ("\"). For example, the password "h@ppy" must be typed as "h\@ppy" in the command line for the script to function correctly. 1. Shutdown ESXi Server(s) This script is used to shut down one or more ESXi servers, relying upon the pre-configured shutdown settings on each server to gracefully shut down the virtual machines running on each. This is the recommended script to use when installing PANSA for VMware in its recommended configuration (installing PANSA on a vMA). In these scripts, the only edits required are updating the values after --server, --username, and --password. The --server value (10.0.025 in the example) should be the IP address of the ESXi host, the --username value (xxxx in the example) should be the username of the ESXi host, and the --password value (xxxx in the example) should be the password for the ESXi host. Uncomment additional lines as needed to shut down other ESXi hosts. Linux Script: shutdownesxi.sh #!/bin/bash # Change directory to directory containing vicfg script files. cd /usr/bin # Resolves "server version unavailable" error caused by perl # module wanting to check a certificate, which many not be # available. export PERL_LWP_SSL_VERIFY_HOSTNAME=0 # Trigger the host to shut down based upon its preconfigured # settings. Be sure to change the server, username and password # parameters before use. ./vicfg-hostops --server 10.0.0.25 --username xxxx --password xxxx --operation shutdown --force # Duplicate the above line as needed to shut down additional # ESXi servers. #./vicfg-hostops --server 10.0.0.26 --username xxxx --password xxxx --operation shutdown --force #./vicfg-hostops --server 10.0.0.27 --username xxxx --password xxxx --operation shutdown --force #./vicfg-hostops --server 10.0.0.28 --username xxxx --password xxxx --operation shutdown --force Windows Script: shutdownesxi.bat #@echo off REM Use this file in place of the shutdownesxi.bat file REM included with PANSA 12.04.0058 REM Change directory to directory containing vicfg script files. cd "C:\Program Files (x86)\VMware\VMware vSphere CLI\bin" REM Users of 32 bit OS, uncomment the line below, comment out the line above REM cd "c:\program files \vmware\vmware vsphere cli\bin" REM Trigger the host to shut down based upon its preconfigured REM settings. Be sure to change the server, username and password REM parameters before use. REM User Input required change server, username, and password values perl vicfg-hostops.pl --server 10.0.0.25 --username xxxxx --password xxxxx --operation shutdown --force REM Duplicate the above line as needed to shut down additional REM ESXi servers. REM perl vicfg-hostops.pl --server 10.0.0.26 --username xxxxx --password xxxxx --operation shutdown --force REM perl vicfg-hostops.pl --server 10.0.0.27 --username xxxxx --password xxxxx --operation shutdown --force REM perl vicfg-hostops.pl --server 10.0.0.28 --username xxxxx --password xxxxx --operation shutdown --force 16