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

# This function is a place holder for customer define functions.
# You should define all actions you want to happen here, after the service is
# halted.
#
function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
: # do nothing instruction, because a function must contain some command.
${XENPATH}/xenhost.sh stop
}
Where
${XENPATH} is an absolute path to the Xen Legacy Scripts.
Refer to Appendix III for details on the monitor script (cmxenvmd).
The ‘monitor’ script must be registered as a ‘SERVICE_CMD’ in SG Package Control Script.
Modify the package configuration file with the following entires:
SERVICE_NAME cmxenvmd
SERVICE_FAIL_FAST_ENABLED no
SERVICE_HALT_TIMEOUT 300
The package control script must contain the following entries
SERVICE_NAME[0]="cmxenvmd"
SERVICE_CMD[0]="$SGSBIN/cmxenvmd"
SERVICE_RESTART[0]="0"
Note: Once a VM is launched as a package under Serviceguard for Linux, you should never start or
stop a VM manually using the ‘xm’ command. A manual start or stop of a virtual machine would
lead to virtual machine package failure. If a VM is already started manually, it must be stopped
before starting the VM through the package control script.
Distribute the package control script and apply the package configuration using the command:
cmapplyconf –P pkg.conf
Basic Principles of Xen Control and Management
The Xen control and management script used the ‘xm’ command to start, stop and monitor Xen virtual
machine guests.
Xen VM Startup
A Xen VM can be started by using the command:
xm create <xen vm guest config filename>
10