- Community Home
- >
- Servers and Operating Systems
- >
- HPE ProLiant
- >
- Servers - General
- >
- HP power protector does not run a script
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2013 06:48 AM - edited 04-11-2013 12:56 AM
03-22-2013 06:48 AM - edited 04-11-2013 12:56 AM
Hello everyone,
I'm currently trying to use a script on HP power protector for running some commands on my ESXi server in case of power failure from my ups and I need some help.
I made a script for a SSH connection to the server which looks like :
plink -v -I c:\...\****.ppk root@192.168.1.1 <command>
(-v for the detail or the connection, -I for an authentication key, the .ppk)
If I launch the script on windows or I run the command on the console it work fine but when I use the "test shutdown" link on hppp nothing seems to work.
I tried to use an another bat for a test with these commands :
shutdown : OK
mkdir : OK
calc : KO
plink,putty : KO
Is there something that block my command ?
What can I do ?
--
best regards
John
EDIT :
vm with hppp : windows 7
server ESXi : hp proliant ml110
ups : hp T750 g2
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2013 02:00 AM
04-10-2013 02:00 AM
Re: HP power protector doesn't run my batch file
Hello
I tried with a .js script based on the sample of hppp :
UserScript = { name: "shutdownvm", enabled: true, // Set this property to true to enable the script. onEvent: true, // If true the script is called each time an event occurs. delay: 0, // This property can be used to delay first execution of the action in milliseconds. interval: 10000, // and every 10s from that onStart: function() // Startup function (optional) { // Use this place to insert initialization code }, action: function() // Script action definition { exec("plink -v -i c:\...\****.ppk root@192.168.1.1 /sbin/shutdown.sh && /sbin/poweroff"); }, onStop: function() // Ender function (optional) { // Use this place to insert finalization code } }
KO, don't work
if i change the command :
exec("shutdown -s -t 30"); KO
exec("shutdown -m \\192.168.1.2 -t 30 -t 30); KO
if you know something wich can help me don't be shy please :)
--
best regards
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2013 08:36 PM
04-21-2013 08:36 PM
SolutionHi,
Please refer to the following document - HP Power Protector Software - Shutdown Script Does Not Work
Thanks & regards,
Lincy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-24-2013 05:48 AM - edited 04-24-2013 08:09 AM
04-24-2013 05:48 AM - edited 04-24-2013 08:09 AM
Re: HP power protector doesn't run my batch file
Hello,
woooo thank you very much !
It work now :)
just two details
first, the path specified 3 time at the end of the document is wrong for me :
/usr/local/HP/PowerProtector/bin/virt_tools/shtdownESXi.pl
-> /usr/local/HP/PowerProtector/bin/shutdownESXi.pl (no virt_tools and u to shutdownESXi.pl)
and second, there is a bug with perl when the shutdownESXi.pl run :
'https://<xx.xx.xx.xx>:443/sdk/vimService.wsdl'; at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 545.
There is a simple way to correct it : just add at the top of the shutdownESXi.pl script :
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
[EDIT] third, ssh is not allowed on VMa after an installation we need to edit /etc/hosts.allow and add a ligne :
sshd: ALL: ALLOW
It work fine for me now :)
Best regards
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2018 02:38 PM
10-16-2018 02:38 PM
Re: HP power protector doesn't run my batch file
Hi john,
how do you do it.
i have same problem using the sample script.
on my case i realy need to use this sample script to shutdown ESX 6.0 with all vms, 3par and storeonce.
i have 1 script based in powershell, to do the job but all the options that i try do execute failed.