<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:clearspace="http://www.jivesoftware.com/xmlns/clearspace/rss" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Availability : How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts) : Comments</title>
    <link>http://viops.vmware.com/home/docs/DOC-1341#comments</link>
    <description>Comments on : How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</description>
    <language>en</language>
    <pubDate>Thu, 12 Mar 2009 11:45:21 GMT</pubDate>
    <generator>Clearspace 2.0.8 (http://jivesoftware.com/products/clearspace/)</generator>
    <dc:date>2009-03-12T11:45:21Z</dc:date>
    <dc:language>en</dc:language>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1562</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Thanks to William Lam (lamw), Innuendo_, llyubenov, Duncan Epping and Steve Chambers.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Thu, 12 Mar 2009 11:45:21 GMT</pubDate>
      <author>jholland</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1562</guid>
      <dc:date>2009-03-12T11:45:21Z</dc:date>
      <clearspace:dateToText>8 months, 2 weeks ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1565</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Thanks for putting this detailed document together, great work.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Fri, 13 Mar 2009 13:58:53 GMT</pubDate>
      <author>lamw</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1565</guid>
      <dc:date>2009-03-13T13:58:53Z</dc:date>
      <clearspace:dateToText>8 months, 2 weeks ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1661</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;I am always leery of disabling a firewall. Instead of disabling the firewall, I added two rules to the top of the INPUT chain in iptables. I didn't add it into the redhat chain that was already thee in case it gets auto generated. This seems to work so far. I have not yet tested a UPS-initiated shutdown. I did not add rules for SNMP or SNMPTRAPS because they seemed to already be there.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Here are the commands that I used. I hope this helps.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;sudo iptables -I INPUT  1 -p TCP --dport apcupsd -m state --state NEW -j ACCEPT&lt;/p&gt;&lt;p&gt;sudo iptables -I INPUT  2 -p UDP --dport apc-3052 -m state --state NEW  -j ACCEPT&lt;/p&gt;&lt;p&gt;sudo /etc/init.d/iptables save&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Tue, 12 May 2009 21:58:05 GMT</pubDate>
      <author>bbustin</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1661</guid>
      <dc:date>2009-05-12T21:58:05Z</dc:date>
      <clearspace:dateToText>6 months, 2 weeks ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1662</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Thanks Brian.  I tried adding rules to VIMA's firewall to allow the UPS to talk with apcupsd, but I could not get it to work properly.  If I get a chance to test this (may take a while as I do not have my spare UPS for testing anymore) or you can confirm that the UPS can communicate properly with the apcupsd daemon running on the VIMA VM I will add this into the document.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;There are details on testing this here:&lt;/p&gt;&lt;p&gt;&lt;a class="jive-link-external-small" dynsrc="#" href="http://www.apcupsd.com/manual/Testing_Apcupsd.html#SECTION000145000000000000000" lowsrc="#" src="#"&gt;http://www.apcupsd.com/manual/Testing_Apcupsd.html#SECTION000145000000000000000&lt;/a&gt;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Joseph.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Wed, 13 May 2009 08:34:48 GMT</pubDate>
      <author>jholland</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1662</guid>
      <dc:date>2009-05-13T08:34:48Z</dc:date>
      <clearspace:dateToText>6 months, 2 weeks ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1676</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;We performed a simulated power outage test of our entire infrastructure as hurricane season is imminent. The test consisted of making sure that our backups were completed and then unplugging both of our UPS from building power.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The VMs running on ESXi as well as the ESXi hosts themselves shut down properly.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It looks like the firewall rules work, but I would encourage someone else to test as well just to double-check.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Mon, 18 May 2009 20:10:55 GMT</pubDate>
      <author>bbustin</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1676</guid>
      <dc:date>2009-05-18T20:10:55Z</dc:date>
      <clearspace:dateToText>6 months, 1 week ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1691</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Hi, I'm using ESXi U4 and version 4 of this document (shutdown via ssh with a script running on ESXi host).&lt;/p&gt;&lt;p&gt;I'm testing the script connecting via ssh to the ESXi U4 host and manually typing in the relevant commands.&lt;/p&gt;&lt;p&gt;Unfortunately when I issue the final command to physically shutdown the host (/sbin/poweroff) it refuses to do it (Poweroff: No.)&lt;/p&gt;&lt;p&gt;To make it work I have to force  the shutdown with  /sbin/poweroff -f (which causes a non graceful shutdown)&lt;/p&gt;&lt;p&gt;is there a workaround to this? Or am I doing something wrong?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;These are the commands I've issued and related messages:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;    ~ # /sbin/shutdown.sh&lt;/p&gt;&lt;p&gt;    Running sfcbd-watchdog stop&lt;/p&gt;&lt;p&gt;    Stopping sfcbd&lt;/p&gt;&lt;p&gt;    Running wsmand stop&lt;/p&gt;&lt;p&gt;    Stopping openwsmand&lt;/p&gt;&lt;p&gt;    watchdog-openwsmand: Terminating watchdog with PID 1557&lt;/p&gt;&lt;p&gt;    Running sfcbd stop&lt;/p&gt;&lt;p&gt;    This operation is not supported.&lt;/p&gt;&lt;p&gt;    Please use /etc/init.d/sfcbd-watchdog start&lt;/p&gt;&lt;p&gt;    Running slpd stop&lt;/p&gt;&lt;p&gt;    Stopping slpd&lt;/p&gt;&lt;p&gt;    Running hostd stop&lt;/p&gt;&lt;p&gt;    watchdog-hostd: Terminating watchdog with PID 1475&lt;/p&gt;&lt;p&gt;    Running ntpd stop&lt;/p&gt;&lt;p&gt;    Stopping ntpd&lt;/p&gt;&lt;p&gt;    config implicitly loaded&lt;/p&gt;&lt;p&gt;    Saving current state in /bootbank&lt;/p&gt;&lt;p&gt;    Clock updated.&lt;/p&gt;&lt;p&gt;    Time: 09:22:18 Date: 05/20/2009 UTC&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;    ~ #/sbin/poweroff&lt;/p&gt;&lt;p&gt;    poweroff: No.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Wed, 20 May 2009 13:34:05 GMT</pubDate>
      <author>guidobras</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1691</guid>
      <dc:date>2009-05-20T13:34:05Z</dc:date>
      <clearspace:dateToText>6 months, 6 days ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1706</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Solved!&lt;/p&gt;&lt;p&gt;It was the "sleep 30", too short to allow my VM to complete a graceful shutdown&lt;/p&gt;&lt;p&gt;I used a longer sleep and all is OK now&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Mon, 25 May 2009 09:45:18 GMT</pubDate>
      <author>guidobras</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1706</guid>
      <dc:date>2009-05-25T09:45:18Z</dc:date>
      <clearspace:dateToText>6 months, 2 days ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1796</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Thanks for the very usefull scripts and example!&lt;/p&gt;&lt;p&gt;One question: How can I add a script for remote shutting down my storage? I think it must be done before shutting down the vMA server. Where can i integrate it?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Thu, 06 Aug 2009 10:37:37 GMT</pubDate>
      <author>FixR</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1796</guid>
      <dc:date>2009-08-06T10:37:37Z</dc:date>
      <clearspace:dateToText>3 months, 2 weeks ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1797</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Thanks for this helpful howto.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What version of apcupsd is right for ESX 3.5 hosts? I thought ESX (non-i) was based on something older than RHEL5 (and is i386 and not x86_64) but just checking...&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks again.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Tue, 11 Aug 2009 22:57:22 GMT</pubDate>
      <author>nycvelo</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1797</guid>
      <dc:date>2009-08-11T22:57:22Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1798</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;The apcupsd is not installed on the ESXi host, it's installed on VIMA/VMA which is based on RHEL5 and x86_64.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Wed, 12 Aug 2009 10:26:46 GMT</pubDate>
      <author>jholland</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1798</guid>
      <dc:date>2009-08-12T10:26:46Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1799</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;Thanks, Joseph! I did make one exception from your howto: Because I already have another machine connected to the monitored UPS, I installed and configued the VMA box as a client to this monitor box. Here's the relevant stuff from apcupsd.conf:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;UPSCABLE ether&lt;/p&gt;&lt;p&gt;UPSTYPE net&lt;/p&gt;&lt;p&gt;DEVICE myapcupsdmonitor.examplecom:3551&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I've tested this setup on other (physical) Linux boxes and it works fine.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I also added '/home/vi-admin/upsVIShutdown.pl' to apccontrol as per your howto.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;So here's my question: With my VMA box as a client, will that perl script still shutdown each guest VM or will I need apcupsd instances running on each VM?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I should mention that the guest VMs are a mix of Windows, FreeBSD and OpenBSD. The Windows guest machines will gracefully shut down when hitting stop from the ESX VI client; the BSD boxes don't, so I need to run shutdown on them before powering off from ESX VI.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks again!&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Thu, 13 Aug 2009 01:00:31 GMT</pubDate>
      <author>nycvelo</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1799</guid>
      <dc:date>2009-08-13T01:00:31Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1800</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;How can I add a script for remote shutting down my storage? I think it must be done before shutting down the vMA server. Where can i integrate it?&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Mon, 17 Aug 2009 08:31:23 GMT</pubDate>
      <author>FixR</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1800</guid>
      <dc:date>2009-08-17T08:31:23Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
    </item>
    <item>
      <title>RE: How to configure ESXi to shutdown using an APC SmartUPS (with lamw scripts)</title>
      <link>http://viops.vmware.com/home/docs/DOC-1341#comments-1801</link>
      <description>&lt;div class='jive-rendered-content'&gt;&lt;p&gt;@FixR - I have sent you a PM about this.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Anyway what OS does your storage server run, is it as easy as running a shutdown command via SSH? If so I think the best place for you to put this script/command is after the "/home/vi-admin/upsVIShutdown.pl" line in the "apcupsd.conf" file. See below:&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;doshutdown)&lt;/p&gt;&lt;p&gt;  echo "UPS ${2} initiated Shutdown Sequence" | ${WALL}&lt;/p&gt;&lt;p&gt;  /home/vi-admin/upsVIShutdown.pl&lt;/p&gt;&lt;p&gt;  /path/to/script/shutdown_storage.sh&lt;/p&gt;&lt;p&gt;  ${SHUTDOWN} -h now "apcupsd UPS ${2} initiated shutdown"&lt;/p&gt;&lt;p&gt;;;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The above "should" work, I'm not 100% though. Give it a shot and let me know how you get on.&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="min-height: 8pt; height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Joseph.&lt;/p&gt;&lt;/div&gt;</description>
      <pubDate>Mon, 17 Aug 2009 09:55:28 GMT</pubDate>
      <author>jholland</author>
      <guid>http://viops.vmware.com/home/docs/DOC-1341#comments-1801</guid>
      <dc:date>2009-08-17T09:55:28Z</dc:date>
      <clearspace:dateToText>3 months, 1 week ago</clearspace:dateToText>
    </item>
  </channel>
</rss>

