<?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>article script shutdown vms and host.sh in VMware vCenter™ Documents</title>
    <link>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/ta-p/2785706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys ,&lt;/P&gt;&lt;P&gt;i've needed to write a script to shut down all virtual machines and an ESXi Host in a clean way using an UPS , so i've done some research , combined and upgraded several codes that i found in the internet , and came up with this little one , &lt;/P&gt;&lt;P&gt;the script shuts downs the online VMs then puts the host in the maintenance mode , shuts down the host and disable the maintenance mode, the last step allows the host to restart normally .&lt;/P&gt;&lt;P&gt;i hope this helps &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Oct 2016 14:44:48 GMT</pubDate>
    <dc:creator>Nouha</dc:creator>
    <dc:date>2016-10-31T14:44:48Z</dc:date>
    <item>
      <title>script shutdown vms and host.sh</title>
      <link>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/ta-p/2785706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Guys ,&lt;/P&gt;&lt;P&gt;i've needed to write a script to shut down all virtual machines and an ESXi Host in a clean way using an UPS , so i've done some research , combined and upgraded several codes that i found in the internet , and came up with this little one , &lt;/P&gt;&lt;P&gt;the script shuts downs the online VMs then puts the host in the maintenance mode , shuts down the host and disable the maintenance mode, the last step allows the host to restart normally .&lt;/P&gt;&lt;P&gt;i hope this helps &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 14:44:48 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/ta-p/2785706</guid>
      <dc:creator>Nouha</dc:creator>
      <dc:date>2016-10-31T14:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: script shutdown vms and host.sh</title>
      <link>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/tac-p/2785707#M56</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great Nouha&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the Script . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards &lt;/P&gt;&lt;P&gt;Sadiq&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Oct 2016 19:42:55 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/tac-p/2785707#M56</guid>
      <dc:creator>sadiq1435</dc:creator>
      <dc:date>2016-10-31T19:42:55Z</dc:date>
    </item>
    <item>
      <title>Re: script shutdown vms and host.sh</title>
      <link>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/tac-p/2785708#M57</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are welcome&lt;/P&gt;&lt;P&gt;i hope it was useful for you&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2016 16:49:11 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/tac-p/2785708#M57</guid>
      <dc:creator>Nouha</dc:creator>
      <dc:date>2016-11-22T16:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: script shutdown vms and host.sh</title>
      <link>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/tac-p/2785709#M58</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nouha,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script was useful, saves time during maintenance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Apr 2017 21:31:58 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/tac-p/2785709#M58</guid>
      <dc:creator>MDNaseer</dc:creator>
      <dc:date>2017-04-17T21:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: script shutdown vms and host.sh</title>
      <link>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/tac-p/2862897#M90</link>
      <description>&lt;P&gt;Hi Nouha,&lt;/P&gt;&lt;P&gt;So the principal idea of you is that; you read the status of the power input of the esxi server.&lt;/P&gt;&lt;P&gt;Is that right ?&lt;/P&gt;&lt;P&gt;with the line&amp;nbsp;&lt;/P&gt;&lt;P&gt;vim-cmd vmsvc/power.getstate $config | grep -i "on" &amp;gt; /dev/null 2&amp;lt;&amp;amp;1&lt;/P&gt;&lt;P&gt;STATUS=$ ?&lt;/P&gt;&lt;P&gt;so the first line asks to the power and waits and answer and this answer is captured&amp;nbsp; by STATUS =$ ? variable in the next line&lt;/P&gt;&lt;P&gt;is that right ?&lt;/P&gt;&lt;P&gt;so than you can start another script or some commands to turn of the vms and server itself.&lt;/P&gt;&lt;P&gt;I have no experience in this vmsvc but looks like worth to learn it.&lt;/P&gt;&lt;P&gt;In this scenario, no need to read the SNMP agent messages from UPS master agent.&lt;/P&gt;&lt;P&gt;Actually my second question would also be, how can we read the SNMP messages broadcastetd by UPS&amp;nbsp; ?&lt;/P&gt;&lt;P&gt;so than we can start some other scripts in case we catch those messages.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Volkan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 12:35:30 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-vCenter-Documents/script-shutdown-vms-and-host-sh/tac-p/2862897#M90</guid>
      <dc:creator>Solfver</dc:creator>
      <dc:date>2021-08-19T12:35:30Z</dc:date>
    </item>
  </channel>
</rss>

