<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HP power protector doesn't run my batch file in Servers - General</title>
    <link>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6039747#M7067</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;woooo thank you very much !&lt;/P&gt;&lt;P&gt;It work now :)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just two details&lt;/P&gt;&lt;P&gt;first, the path specified 3 time at the end of the document is wrong for me :&lt;/P&gt;&lt;P&gt;/usr/local/HP/PowerProtector/bin/virt_tools/shtdownESXi.pl&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;-&amp;gt; /usr/local/HP/PowerProtector/bin/shutdownESXi.pl&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;(no virt_tools and u to shutdownESXi.pl)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;and second, there is a bug with perl when the shutdownESXi.pl run :&lt;/P&gt;&lt;P&gt;'https://&amp;lt;xx.xx.xx.xx&amp;gt;:443/sdk/vimService.wsdl'; at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 545.&lt;/P&gt;&lt;P&gt;There is a simple way to correct it : just add at the top of the shutdownESXi.pl script :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[EDIT] third, ssh is not allowed on VMa after an installation we need to edit /etc/hosts.allow and add a ligne :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sshd: ALL: ALLOW&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;It work fine for me now :)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2013 15:09:55 GMT</pubDate>
    <dc:creator>John2</dc:creator>
    <dc:date>2013-04-24T15:09:55Z</dc:date>
    <item>
      <title>HP power protector does not run a script</title>
      <link>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6005581#M7025</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made a script for a SSH connection to the server which looks like :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;plink -v -I c:\...\****.ppk root@192.168.1.1 &amp;lt;command&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;(-v for the detail or the connection, -I for an authentication key, the .ppk)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use an another bat for a test with these commands :&lt;/P&gt;&lt;P&gt;shutdown : OK&lt;/P&gt;&lt;P&gt;mkdir : OK&lt;/P&gt;&lt;P&gt;calc : KO&lt;/P&gt;&lt;P&gt;plink,putty : KO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there something that block my command ?&lt;/P&gt;&lt;P&gt;What can I do ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT :&lt;/P&gt;&lt;P&gt;vm with hppp : windows 7&lt;/P&gt;&lt;P&gt;server ESXi : hp proliant ml110&lt;/P&gt;&lt;P&gt;ups : hp T750 g2&lt;/P&gt;</description>
      <pubDate>Thu, 11 Apr 2013 07:56:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6005581#M7025</guid>
      <dc:creator>John2</dc:creator>
      <dc:date>2013-04-11T07:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: HP power protector doesn't run my batch file</title>
      <link>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6025395#M7051</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried with a .js script based on the sample of hppp :&lt;/P&gt;&lt;PRE&gt;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 &amp;amp;&amp;amp; /sbin/poweroff");  
  	
  },
  onStop: function() // Ender function (optional)
  {
    // Use this place to insert finalization code
  }
}&lt;/PRE&gt;&lt;P&gt;KO, don't work&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if i change the command :&lt;/P&gt;&lt;P&gt;exec("shutdown -s -t 30");&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; KO&lt;/P&gt;&lt;P&gt;exec("shutdown -m \\192.168.1.2 -t 30 -t 30); &amp;nbsp;&amp;nbsp; KO&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you know something wich can help me don't be shy please :)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2013 09:00:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6025395#M7051</guid>
      <dc:creator>John2</dc:creator>
      <dc:date>2013-04-10T09:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: HP power protector doesn't run my batch file</title>
      <link>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6036469#M7060</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer to the following document &amp;nbsp;-&amp;nbsp;&lt;A target="_blank" href="http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?spf_p.tpst=kbDocDisplay&amp;amp;spf_p.prp_kbDocDisplay=wsrp-navigationalState%3DdocId%253Demr_na-c03600516-5%257CdocLocale%253Den%257CcalledBy%253DSearch_Result&amp;amp;javax.portlet.begCacheTok=com.vignette.cachetoken&amp;amp;javax.portlet.endCacheTok=com.vignette.cachetoken"&gt;HP Power Protector Software - Shutdown Script Does Not Work&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lincy&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2013 03:36:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6036469#M7060</guid>
      <dc:creator>Lincy_Zachariah</dc:creator>
      <dc:date>2013-04-22T03:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: HP power protector doesn't run my batch file</title>
      <link>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6039747#M7067</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;woooo thank you very much !&lt;/P&gt;&lt;P&gt;It work now :)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;just two details&lt;/P&gt;&lt;P&gt;first, the path specified 3 time at the end of the document is wrong for me :&lt;/P&gt;&lt;P&gt;/usr/local/HP/PowerProtector/bin/virt_tools/shtdownESXi.pl&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;-&amp;gt; /usr/local/HP/PowerProtector/bin/shutdownESXi.pl&lt;/STRONG&gt;&lt;/STRONG&gt;&amp;nbsp;(no virt_tools and u to shutdownESXi.pl)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;and second, there is a bug with perl when the shutdownESXi.pl run :&lt;/P&gt;&lt;P&gt;'https://&amp;lt;xx.xx.xx.xx&amp;gt;:443/sdk/vimService.wsdl'; at /usr/lib/perl5/5.10.0/VMware/VICommon.pm line 545.&lt;/P&gt;&lt;P&gt;There is a simple way to correct it : just add at the top of the shutdownESXi.pl script :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;[EDIT] third, ssh is not allowed on VMa after an installation we need to edit /etc/hosts.allow and add a ligne :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sshd: ALL: ALLOW&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;It work fine for me now :)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2013 15:09:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/6039747#M7067</guid>
      <dc:creator>John2</dc:creator>
      <dc:date>2013-04-24T15:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: HP power protector doesn't run my batch file</title>
      <link>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/7022088#M9171</link>
      <description>&lt;P&gt;Hi john,&amp;nbsp;&lt;/P&gt;&lt;P&gt;how do you do it.&lt;/P&gt;&lt;P&gt;i have same problem using the sample script.&lt;/P&gt;&lt;P&gt;on my case i realy need to use this sample script to shutdown ESX 6.0 with all vms, 3par and&amp;nbsp; storeonce.&lt;/P&gt;&lt;P&gt;i have 1 script based in powershell, to do the job but all the options that i try do execute failed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 21:38:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/servers-general/hp-power-protector-does-not-run-a-script/m-p/7022088#M9171</guid>
      <dc:creator>opedro</dc:creator>
      <dc:date>2018-10-16T21:38:53Z</dc:date>
    </item>
  </channel>
</rss>

