Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1464
  • Last Modified:

VM Startup/Shutdown

We are running vCenter 5.1 with 3 ESXi hosts. We have about 50 VMs spread across the 3 hosts. We experienced a power loss, and all hosts went offline. Once the power cam back, all hosts came back online. Our environment has dependencies betweeen VMs. For example, the domain controllers need to come online first, then Exchange and so on.

I know I can configure Automatic startup/shutdown of VMs, but how do I make this setting global across all hosts in a datacenter? Time to time, we vMotion VMs across hosts to distribute resources evenly (we don't use DRS). Is there a way to tell vSphere to start VMs in a global order regardless of which host they are on?
0
pzozulka
Asked:
pzozulka
  • 3
  • 3
  • 2
4 Solutions
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Do you not have any UPS protection ?

VMware vSphere ESXi supports Auto Starting and Auto Stopping of VMs.

Auto Start and Shutdown Virtual Machines

Just log into your ESX server using the vSphere GUI Client, click on the host, then click the Configuration tab. In the 'Software' box, click the Virtual Machine Startup/Shutdown link. In the upper right click Properties.

http://www.vmadmin.co.uk/vmware/35-esxserver/111-esxautostartstop

You should be able to configure each host, to start and stop a specific VM.

HOWEVER, it would seem, you could be running a Cluster with VMware HA, because an uncontrolled shutdown, when VMware HA is configured protects the VMs, with HA, and in the event the hosts fail, the VMs will be restarted on hosts when they are restarted.....

Now, it's not supported in this case, for you to enable Auto Start and Stop when VMware HA is enabled.

see here

Note: The Virtual Machine Startup and Shutdown (automatic startup) feature is disabled for all virtual machines residing on hosts that are in (or moved into) a VMware HA cluster. Automatic startup is not supported when used with VMware HA. As a result, starting with vCenter Server 5.0 Update 1, the Allow virtual machines to start and stop automatically with the system is available though at this time does not have functionality when enabled.

Source
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=850
0
 
Zephyr ICTCloud ArchitectCommented:
Not counting HA, I think the only way is to use a script, if you have a UPS you could use the software that comes with it to start the script after restore of the power or such ...

A script that uses a txt file with the necessary servers in it, making sure that they are started in the necessary order.
0
 
pzozulkaAuthor Commented:
We have UPS(s), but after they run out of juice the hosts shutdown. This last power outage happened at night so there was not much we couldnt have done.

We enabled HA recently. Are you telling me there's no way for us to startup VMs automatically when the hosts power ON?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
pzozulkaAuthor Commented:
In other words, I understand that if we have HA enabled that the VM Startup/Shutdown feature is disabled on each host which is fine, but is there any way to do this from within HA?
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
There is no way to do this from HA yet, because under HA, an uncontrolled shutdown will power up all VMs...not just a select few, "because it gives you back the same state" at failure....

If you have GOOD UPS software...you can create rules, which will SHUTDOWN ALL VMs, to carry on conserving power for the IMPORTANT VMs, e.g. Domain Controllers and Exchange.

when the UPS batteries are then extended because you've reduced loading "it's called load shedding", then what the rules do, is MOVE ALL VMs to a single host, shutdown all the other hosts in the cluster maintaining the number required for important VMs.

FINALLY.......The VMs will be shutdown...

because everything was shutdown CONTROLLED

VMware HA WILL NOT restart VMs at Power ON, and then a script starts the VMs in your order you require

e.g. DC's first etc

VMware HA, DRS, and UPS Power Outage is a Design and Project to get working correctly...
0
 
pzozulkaAuthor Commented:
There is no way to do this from HA yet
When you say yet, are you aware of this feature coming soon?
0
 
Zephyr ICTCloud ArchitectCommented:
I wouldn't count on it arriving soon ... But who am I :)

Like Hancock and I said, UPS with the necessary software should be able to do what you're looking for, had to do it several times.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
It has been requested as a feature request, however it would appear, UPS vendors are now creating their own solutions to this complex issue of "load shedding" and VMware HA/DRS.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now