5.To modify the VM or vPar guest package to start or monitor specific applications in the VM or vPar guests, do one of the following:
•Manually edit the existing VM or vPar guest package configuration file:
To monitor specific applications in a VM or vPar guest, a cmappmgr entry is added to the services section of the VM or vPar guest package for each monitored application.
The following example shows the service entries for monitoring the VM or vPar guest mmpf121 (as automatically configured by using the cmdeployvpkg command) and how to add an xclock application as a monitored service for the VM or vPar guest package mmpf121 in HP Serviceguard modular package format:
service_name mmpf121
service_cmd $SGCONF/scripts/tkit/vtn/tkit_module.sh guest_monitor #service_restart
#service_fail_fast_enabled service_halt_timeout 300
service_name
service_cmd "/usr/sbin/cmappmgr
service_restart 3 #service_fail_fast_enabled service_halt_timeout 300
•Automatically edit the existing VM or vPar guest package configuration file:
To add the guest application monitor in the existing VM or vPar guest package configuration file, run the cmdeployvpkg command with the
NOTE: Option
For example:
◦
◦
To run the cmdeployvpkg in an interactive mode, use the following sample command:
#cmdeployvpkg -P vm1 -x merge -x appmon
To run the cmdeployvpkg in a quiet mode, use the following sample command:
#cmdeployvpkg
cmappmgr uses the following options:
•
•-cmappserver_timeout: cmappserver connection timeout (seconds)
•
The cmappmgr command line option cmappserver_timeout specifies the length of time in seconds. cmappmgr waits for a response from cmappserver before it terminates. This termination triggers either a service restart or a VM or vPar guest package failover, depending on the service_restart value and the number of times HP Serviceguard has restarted cmappmgr. The cmappserver_timeout value must be initially set large enough to account for the time required to start both the VM or vPar guest and the cmappserver daemon. This value must be set in the VM or vPar guest to prevent a false monitored application failure indication.