Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking at implementing xenserver and would like to know how to get xenserver to gracefully shutdown all vms after a power failure.

share|improve this question

The solutions offered are too simplistic to work in practical situations.

We use the Pacemaker cluster resource manager to manage our virtual machines. Nagios monitors the APC UPSes we have via their network management cards, and runs a script when power failure is imminent to put dom0 servers (also pacemaker nodes) into standby, effectively migrating all resources including virtual machines away from them.

Pacemaker handles the case where resources cannot migrate anywhere relatively gracefully by doing a quick shutdown of the domU machines. As soon as the pcmk node/dom0 machines come back up, the 'resources' (aka domU VMs) get started again where permitted by the pacemaker cluster rules.

share|improve this answer

I guess I'm missing the point. Most of these solutions promote a separate Windows machine to run a script.

What assures me: 1) The Windows box doesn't lose power before the XS UPS triggers battery low? 2) If multiple XS hosts, each with separate UPS devices -- do I need a separate Windows machine for each?

Seems like a solutions based on the XS physical machine would be superior. Respond to a signal you're about to be impacted (battery low) -- each pool member need only coordinate with others (within the pool). Theoretically, it is enough to take care of VMs running on your own server and shutdown. (Gets more complicated if the master is already down -- when processing as a pool member (now in emergency mode)).

In my view the "solutions" offered are too simplistic.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.