# HG changeset patch # User David Scott # Date 1270637206 -3600 # Node ID dddf116cddb5a77df6b6f831e50a9f9365b06d10 # Parent e80cc42b227116e59498beb8985fa7f198f307ef CA-39401: on server boot only start VMs with auto_poweron=true which have their affinity set to the local host. The auto_poweron=true mechanism made sense when all pools were of size 1. It's a bit odd with multi-host pools.. surely these days you would HA protect VMs you care about? This change makes the auto_poweron mechanism a bit less inexplicable. At some point we ought to merge this with HA. Signed-off-by: David Scott diff -r e80cc42b2271 -r dddf116cddb5 scripts/xapi-autostart-vms --- a/scripts/xapi-autostart-vms Wed Apr 07 11:46:02 2010 +0100 +++ b/scripts/xapi-autostart-vms Wed Apr 07 11:46:46 2010 +0100 @@ -15,5 +15,6 @@ /opt/xensource/bin/xapi-wait-init-complete ${XAPI_START_TIMEOUT_SECONDS} if [ $? -eq 0 ]; then # if xapi init completed then start vms (best effort, don't report errors) - xe vm-start other-config:auto_poweron=true power-state=halted --multiple >/dev/null 2>/dev/null || true + . /etc/xensource-inventory + xe vm-start other-config:auto_poweron=true affinity=${INSTALLATION_UUID} power-state=halted --multiple >/dev/null 2>/dev/null || true fi