<?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 Gracefully shutdown ESXi 6.7 with a script via SSH without entering maintenance mode in VMware vCenter™ Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-vCenter-Discussions/Gracefully-shutdown-ESXi-6-7-with-a-script-via-SSH-without/m-p/1863374#M28072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to write a (Python) script that ssh's to an ESXi 6.7 and shuts down the host and also shuts down the VMs according to the current system shutdown policy.&lt;/P&gt;&lt;P&gt;I'm running Dell customized image ESXi 6.7 in a Dell R710 with a dual Xeon X5650 and 144GB RAM and a Dell R720 with a dual Xeon E5-2660.&lt;/P&gt;&lt;P&gt;In fact what I want is the same that I can get with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shutdown via GUI&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Shut_via_GUI.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/13229i1505948E7ACB433D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Shut_via_GUI.png" alt="Shut_via_GUI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or Shutdown via console&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Shut_via_console.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/13230i49287595275C9C66/image-size/large?v=v2&amp;amp;px=999" role="button" title="Shut_via_console.png" alt="Shut_via_console.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have ssh enabled in the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already tryed:&lt;/P&gt;&lt;P&gt;1) &lt;SPAN style="font-family: 'courier new', courier;"&gt;host_shutdown.sh&lt;/SPAN&gt; (it just gets there indefinitely).&lt;/P&gt;&lt;P&gt;2) &lt;SPAN style="font-family: 'courier new', courier;"&gt;/bin/host_shutdown.sh&lt;/SPAN&gt; (it to gets there indefinitely).&lt;/P&gt;&lt;P&gt;3) &lt;SPAN style="font-family: 'courier new', courier;"&gt;halt&lt;/SPAN&gt; (shutdowns the server but it does not shuts down the VMs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;esxcli system shutdown poweroff --reason I_want_IT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the system must be in maintenance mode and I want to do it without entering maintenance mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After digging a lot I found a way to shutdown the hosts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;/sbin/shutdown.sh &amp;amp;&amp;amp; /sbin/poweroff&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It in fact shuts down the hosts, but I don't know if it is a safe way to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really would appreciate some opinion about it.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Paulo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 18 Aug 2019 04:28:17 GMT</pubDate>
    <dc:creator>ppsilva02</dc:creator>
    <dc:date>2019-08-18T04:28:17Z</dc:date>
    <item>
      <title>Gracefully shutdown ESXi 6.7 with a script via SSH without entering maintenance mode</title>
      <link>https://communities.vmware.com/t5/VMware-vCenter-Discussions/Gracefully-shutdown-ESXi-6-7-with-a-script-via-SSH-without/m-p/1863374#M28072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to write a (Python) script that ssh's to an ESXi 6.7 and shuts down the host and also shuts down the VMs according to the current system shutdown policy.&lt;/P&gt;&lt;P&gt;I'm running Dell customized image ESXi 6.7 in a Dell R710 with a dual Xeon X5650 and 144GB RAM and a Dell R720 with a dual Xeon E5-2660.&lt;/P&gt;&lt;P&gt;In fact what I want is the same that I can get with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Shutdown via GUI&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Shut_via_GUI.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/13229i1505948E7ACB433D/image-size/large?v=v2&amp;amp;px=999" role="button" title="Shut_via_GUI.png" alt="Shut_via_GUI.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or Shutdown via console&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Shut_via_console.png"&gt;&lt;img src="https://communities.vmware.com/t5/image/serverpage/image-id/13230i49287595275C9C66/image-size/large?v=v2&amp;amp;px=999" role="button" title="Shut_via_console.png" alt="Shut_via_console.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have ssh enabled in the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already tryed:&lt;/P&gt;&lt;P&gt;1) &lt;SPAN style="font-family: 'courier new', courier;"&gt;host_shutdown.sh&lt;/SPAN&gt; (it just gets there indefinitely).&lt;/P&gt;&lt;P&gt;2) &lt;SPAN style="font-family: 'courier new', courier;"&gt;/bin/host_shutdown.sh&lt;/SPAN&gt; (it to gets there indefinitely).&lt;/P&gt;&lt;P&gt;3) &lt;SPAN style="font-family: 'courier new', courier;"&gt;halt&lt;/SPAN&gt; (shutdowns the server but it does not shuts down the VMs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;esxcli system shutdown poweroff --reason I_want_IT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the system must be in maintenance mode and I want to do it without entering maintenance mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After digging a lot I found a way to shutdown the hosts:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;/sbin/shutdown.sh &amp;amp;&amp;amp; /sbin/poweroff&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It in fact shuts down the hosts, but I don't know if it is a safe way to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really would appreciate some opinion about it.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Paulo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Aug 2019 04:28:17 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCenter-Discussions/Gracefully-shutdown-ESXi-6-7-with-a-script-via-SSH-without/m-p/1863374#M28072</guid>
      <dc:creator>ppsilva02</dc:creator>
      <dc:date>2019-08-18T04:28:17Z</dc:date>
    </item>
    <item>
      <title>Re: Gracefully shutdown ESXi 6.7 with a script via SSH without entering maintenance mode</title>
      <link>https://communities.vmware.com/t5/VMware-vCenter-Discussions/Gracefully-shutdown-ESXi-6-7-with-a-script-via-SSH-without/m-p/1863375#M28073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0 0 10.66px;"&gt;&lt;SPAN style="margin: 0px; color: #000000; line-height: 107%; font-family: 'Arial',sans-serif;"&gt;This post already solved could help you.&lt;/SPAN&gt;&lt;SPAN lang="EN-US"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;A href="https://communities.vmware.com/thread/589657"&gt;How to shutdown VMs during host poweroff, without using autostart&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Alessandro Romeo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #666666; font-family: &amp;amp;font-size:14px; font-style: normal; font-weight: 400; margin-bottom: 2px; margin-right: 2px; margin-top: 2px; text-align: left; text-indent: 0px; border-color: #666666; border-style: none;"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #303336; font-family: Consolas,Menlo,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New,monospace,sans-serif; font-size: 13px; font-style: normal; font-weight: 400; text-align: left; text-indent: 0px; border-color: #303336; border-style: none;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Aug 2019 06:24:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCenter-Discussions/Gracefully-shutdown-ESXi-6-7-with-a-script-via-SSH-without/m-p/1863375#M28073</guid>
      <dc:creator>Alex_Romeo</dc:creator>
      <dc:date>2019-08-18T06:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Gracefully shutdown ESXi 6.7 with a script via SSH without entering maintenance mode</title>
      <link>https://communities.vmware.com/t5/VMware-vCenter-Discussions/Gracefully-shutdown-ESXi-6-7-with-a-script-via-SSH-without/m-p/1863376#M28074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi AlessandroRomeo68&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all, thank you for your help and I'm sorry for the time I took to reply.&lt;/P&gt;&lt;P&gt;In fact I had already seen that article.&lt;/P&gt;&lt;P&gt;But the difference in my scenario is that, as I stated at the beginning of my question, I want to shutdown the VMs accoding to the current system autostart policy ( I'm sorry I wrote "shutdown policy" in the first line.&lt;/P&gt;&lt;P&gt;Meanwhile I found this article: &lt;A href="https://daviddever.net/gracefully-stopping-esxi-host-with-usb-ups/" title="https://daviddever.net/gracefully-stopping-esxi-host-with-usb-ups/"&gt;https://daviddever.net/gracefully-stopping-esxi-host-with-usb-ups/&lt;/A&gt;&amp;nbsp; and this one: &lt;A href="https://administrator.de/forum/funktioniert-script-esx-msa-shutdown-stromausfall-385489.html" title="https://administrator.de/forum/funktioniert-script-esx-msa-shutdown-stromausfall-385489.html"&gt;https://administrator.de/forum/funktioniert-script-esx-msa-shutdown-stromausfall-385489.html&lt;/A&gt; (this one is in german but I used Google translator) and this: &lt;A href="http://www.designervisuals.com/Shutdown_ESXi_and_VMs_During_a_Power_Failure.html" title="http://www.designervisuals.com/Shutdown_ESXi_and_VMs_During_a_Power_Failure.html"&gt;http://www.designervisuals.com/Shutdown_ESXi_and_VMs_During_a_Power_Failure.html&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;They are mostly related to shutdown ESXi on UPS power failure, but the result is the same I want to accomplish.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'll presume that it will in fact shutdown all machines correctly and will use it in my script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2019 17:36:10 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCenter-Discussions/Gracefully-shutdown-ESXi-6-7-with-a-script-via-SSH-without/m-p/1863376#M28074</guid>
      <dc:creator>ppsilva02</dc:creator>
      <dc:date>2019-08-21T17:36:10Z</dc:date>
    </item>
  </channel>
</rss>

