VMware Cloud Community
kc5ruj
Contributor
Contributor
Jump to solution

DR during Storm Season

Sorry to ask what's probably a noob question, but I need some advice.  I have an ESXi 5 cluster with four hosts and about 60 guest VMs.  The data center is for a private higher ed school with a limited budget.  Because of that we do not have a backup generator and our UPS is old and inadequate.  Along with all that, we're entering severe weather season and I need to be prepared to shut down my ESX cluster quickly.  Here's my question.  Would it be advisable to configure the hosts to power down the guests when they are shutdown rather than shutting down each guest VM and then shutting down the hosts?  Can this be scripted?

Sorry to be so noobish, but each power outage we get is an impending disaster so I have to be as prepared as I can be.

Tony

Reply
0 Kudos
1 Solution

Accepted Solutions
kunaludapi
Expert
Expert
Jump to solution

I have create a script for the same, You can use powercli to automate shutting down all VMs and esxi host.

vGeek: Shutdow virtual datacenter quickly using script

--------------------------------------------------------------- Kunal Udapi Sr. System Architect (Virtualization, Networking And Storage) http://vcloud-lab.com http://kunaludapi.blogspot.com VMWare vExpert 2014, 2015, 2016 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

View solution in original post

Reply
0 Kudos
5 Replies
kunaludapi
Expert
Expert
Jump to solution

I have create a script for the same, You can use powercli to automate shutting down all VMs and esxi host.

vGeek: Shutdow virtual datacenter quickly using script

--------------------------------------------------------------- Kunal Udapi Sr. System Architect (Virtualization, Networking And Storage) http://vcloud-lab.com http://kunaludapi.blogspot.com VMWare vExpert 2014, 2015, 2016 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
Reply
0 Kudos
kc5ruj
Contributor
Contributor
Jump to solution

Awesome!  Thanks for the script.  that's just what I needed.

Tony

Reply
0 Kudos
kunaludapi
Expert
Expert
Jump to solution

If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

--------------------------------------------------------------- Kunal Udapi Sr. System Architect (Virtualization, Networking And Storage) http://vcloud-lab.com http://kunaludapi.blogspot.com VMWare vExpert 2014, 2015, 2016 If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".
Reply
0 Kudos
GAPCABIV
Enthusiast
Enthusiast
Jump to solution

I have a very similar script but it shuts VMs down based upon folders that they are in.  This way I can shutdown Web Servers before App Servers and App Servers before DB servers etc....  Then when it comes time to power on again, I start VMs in the reverse order, by folder still, than they were shutdown.

My ShutdownPriority folder numbers are listed in the notes of each VM and the first thing my script does is move VMs into the correct ShutdownPriority folder based upon the details in the notes section of the VM.  Once all the VMs are in the correct folder I send the command to shutdown all VMs in ShutdownPriority1 folder followed 1 minute later by the ShutdownPriority2 folder etc.. up to ShutdownPriority9.  Then vCenter and all the hosts are shutdown.

Powering on I bring up the hosts and vCenter then all the VMs in ShutdownPriority9, 8, 7...1.

I have had to use the script one time, during a planned datacanter outage a couple of years ago and everything worked like a charm!

Reply
0 Kudos
kc5ruj
Contributor
Contributor
Jump to solution

That makes sense because you definitely need to restart in a structured order.  Using folders is a great way to manage ESX.  I'm in the process of rebuilding our backup environment to base off folders rather than hosts or VMs.

So, to use this script do I need to reconfigure the power management settings for the hosts or VMs?

Reply
0 Kudos