STONITH (Shoot The Other Node in the Head) is a fencing technique for remotely powering down a node in a cluster. LifeKeeper can provide STONITH capabilities by using external power switch controls, IPMI-enabled motherboard controls and hypervisor-provided power capabilities to power off the other nodes in a cluster.
IPMI (Intelligent Platform Management Interface) defines a set of common interfaces to a computer system which can be used to monitor system health and manage the system. Used with STONITH, it allows the cluster software to instruct the switch via a serial or network connection to power off or reboot a cluster node that appears to have died thus ensuring that the unhealthy node cannot access or corrupt any shared data.
vCLI (vSphere Command-Line Interface) is a command-line interface supported by VMware for managing your virtual infrastructure including the ESXi hosts and virtual machines. You can choose the vCLI command best suited for your needs and apply it for your LifeKeeper STONITH usage between VMware virtual machines.
VMware vSphere SDK Package or VMware vSphere CLI. (vSphere CLI is included in the same installation package as the vSphere SDK).
Monitored Virtual Machine
- VMware Tools
After installing LifeKeeper and configuring communication paths for each node in the cluster, install and configure STONITH.
Install the LifeKeeper STONITH script by running the following command:
(*For IPMI usage only) Using BIOS or the ipmitool command, set the following BMC (Baseboard Management Controller) variables:
Use Static IP
Add Administrator privilege level to the user
Enable network access to the user
Example using ipmitool command
(For detailed information, see the ipmitool man page.)
|# ipmitool lan set 1 ipsrc static
# ipmitool lan set 1 ipaddr 192.168.0.1
# ipmitool lan set 1 netmask 255.0.0.0
# ipmitool user set name 1 root
# ipmitool user set password 1 secret
# ipmitool user priv 1 4
# ipmitool user enable 1
Edit the configuration file.
Update the configuration file to enable STONITH and add the power off command line. Note: Power off is recommended over reboot to avoid fence loops (i.e. two machines have lost communication but can still STONITH each other, taking turns powering each other off and rebooting).
# LifeKeeper STONITH configuration
# Example1: ipmi command
# node-1 ipmitool -I lanplus -H 10.0.0.1 -U root -P secret power off
# Example2: vCLI-esxcli command
# node-2 esxcli --server=10.0.0.1 --username=root --password=secret vms vm kill --type='hard' --world-id=1234567
# Example3: vCLI-vmware_cmd command
# node-3 vmware-cmd -H 10.0.0.1 -U root -P secret <vm_id> stop hard
minute-maid ipmitool -I lanplus -H 192.168.0.1 -U root -P secret power off
vm1 esxcli --server=10.0.0.1 --username=root --password=secret vms vm kill --type='hard' --world-id=1234567
vSphere CLI commands run on top of vSphere SDK for Perl. <vm_id> is used as an identifier of the VM. This variable should point to the VM's configuration file for the VM being configured.
To find the configuration file path:
Type the following command:
vmware-cmd -H <vmware host> -l
This will return a list of VMware hosts.
Example output from vmware-cmd -l with three vms listed:
Find the VM being configured in the resulting list.
Paste the path name into the <vm_id> variable. The example above would then become:
vmware-cmd -H 10.0.0.1 -U root -P secret /vmfs/volumes/4e08c1b9-d741c09c-1d3e-0019b9cb28be/lampserver/lampserver.vmx stop hard
Note: For further information on VMware commands, use vmware-cmd with no arguments to display a help page about all options.
When LifeKeeper detects a communication failure with a node, that node will be powered off and a failover will occur. Once the issue is repaired, the node will have to be manually powered on.
© 2018 SIOS Technology Corp., the industry's leading provider of business continuity solutions, data replication for continuous data protection.
Open topic with navigation