Designing High Availability Solutions with HP Serviceguard and HP Integrity Virtual Machines

16
Figure 11: Dynamic memory allocation in an HP-UX VM guest
In the event of a Serviceguard package failover, the external script for the Serviceguard package uses an hpvmmgmt
command to dynamically allocate an amount of memory (in 64MB chunks) to a specified target value (in this
example, the full amount of memory used at VM guest startup), as shown in step 2. The following is a start_command
function example in an external_script for a Serviceguard modular package to perform this operation:
function start_command
{
sg_log 5 start_command
# ADD your package start steps here
# Increase VM Guest dynamic memory to the value allocated at VM #
start
/opt/hpvm/bin/hpvmmgmt x ram_target=start
return 0
}
At this point, the failover application now has sufficient memory available to run and can be started by the
Serviceguard package, as shown in step 3.
When the application package is failed back to its original node, an hpvmmgmt command in the stop_command
function in an external_script for a Serviceguard modular package script can be used to reduce the VM guest memory
back to a comfortable minimum value, as shown below:
function stop_command
{
sg_log 5 stop_command
# ADD your package halt steps here
# Reduce VM Guest dynamic memory to comfortable minimum
/opt/hpvm/bin/hpvmmgmt x ram_target=0
return 0
}
VM Host
Serviceguard Package Failover
1 2
3
VM Guest
Target
Max
Target
Max
Target
Min
VM Host
Serviceguard Package Failover
1 2
3
VM Guest
Target
Max
Target
Max
Target
Min