Designing High-Availability for Xen Virtual Machines with HP Serviceguard for Linux

Appendix Section II
Xen Legacy Control Script (xenhost.sh)
The script was designed for the purpose of Xen VM Legacy Packages. The script functions may be
called from a Legacy Package Control Script through “customer_defined_run_cmds” and
“customer_defined_halt_cmds”. The script depends on the “xenhost.cnf” file for Xen environment
setup.
Template for “xenhost.sh” script
####################################################################
# (C) Copyright 2008 Hewlett-Packard Development Company, L.P.
# @(#) Serviceguard for Linux Xen Legacy Package Control Script.
# @(#) Product Name : HP Serviceguard for Linux
# @(#) Product Version : A.11.18.02
# @(#) Patch Name :
#
# *** Note: This file MUST NOT be edited. *****
#
# Any changes made to it will be overwritten when you upgrade to the
# next release of HP Serviceguard for Linux.
#
# Changing this file may lead to unrecoverable package startup
# and/or shutdown problems.
#
###################################################################
#######################################
#
# Source SG and Xen Environment Setup
#######################################
set -a
. ${SGCONFFILE:=/etc/cmcluster.conf}
. ${SGXCONFFILE:=./xenhost.cnf}
set +a
echo ${SG_XEN_BIN}
#######################################################################
###
#
# sg_validate_services() is called while validating the package
# configuration (through cmcheckconf/cmapplyconf)
#
#######################################################################
###
function sgx_validate_vm
{
17