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

# exit only when Vm is completely halted
return 1 ;;
*)
echo "ERROR: 255 Unrecoverable error occured "
return 255 ;;
esac
done
fi
}
################
# main routine
################
#
# Module script must be specified with three required entry points:
# start, stop, and validate.
#
# The variable to_exit indicates the success or failure of the entry
# point.
#
typeset -i to_exit=0
echo "sg_xen_vm"
case ${1} in
start)
sgx_start_vm
;;
stop)
sgx_stop_vm
;;
validate)
sgx_validate_vm
;;
*)
echo "ERROR: Illegal entry point specification $1."
to_exit=1
;;
esac
#
# Exit to indicate success/failure to the master_control_script.sh
#
exit $to_exit
21