Setting up RHEL 6 Cluster Fencing on vCenter VMware VMs
My reference below is based on the posting here (thanks to this author for sharing this invaluable info):
This has been tested and validated on ESXi 5.5, RHEL 6.5 with a 3-node cluster. Was very useful and saved lot of time.
vCenter Account: root (create your own username with similar privileges to stop/restart nodes if you don’t want to use root)
node1: node1.domain.com (Named node1 in vCenter)
node2: node2.domain.com (Named node2 in vCenter)
node3: node3.domain.com (Named node3 in vCenter)
Key Tip: fencing may fail using the system name, use UUIDs instead.
Retrieve UUID of your 3-nodes
On node1.domain.com, run the following (use ssl or it will not likely retrieve anything):
fence_vmware_soap --ip vcenter.domain.com --username root --password password --ssl -z --action list |grep node node1,564dbfa6-7885-b25f-5812-4dae4269a1d6 node2,564d7630-a1a1-a090-46af-d3532adff0fc node3,564d2c92-23d6-6094-2bc4-ff503470cdec
Note the node and UUID associated with it.
Test fencing from node1 to node3:
fence_vmware_soap --ip 10.95.108.66 --username root --password password -z --action off --uuid 564d2c92-23d6-6094-2bc4-ff503470cdec fence_vmware_soap --ip 10.95.108.66 --username root --password password -z --action on --uuid 564d2c92-23d6-6094-2bc4-ff503470cdec
After successful tests, add Fencing in LUCI:
- Add a fence device that tells your cluster how to log into your VC
- Attach a fencing method to each node and give it the UUID you used earlier to
Log into LUCI and select your cluster, then select the Fence Devices tab. Select Add.
Fill out the form exactly as shown:
Fence type: VMWare (SOAP Interface)
Name: fence_node1 (Just needs to be descriptive)
IP Address or Hostname: node1.domain.com
IP Port (optional): blank
Leave the rest as they are or blank
Now, go to Manage Clusters in LUCI and select your first node by clicking on the name. At the bottom of the screen for your node, select Add Fence Method. Give it a name, the name doesn’t matter unless you are planning on using multiple methods. Submit your change. Now select Add Fence Instance that appears inside the method box and fill it out exactly as described below:
Select the fencing device you configured in step 1
VM Name: Leave blank
VM UUID: 564dbfa6-7885-b25f-5812-4dae4269a1d6
Use SSL: Check it on. Fencing will not work without this checked.
Do the same for node2, node3. Check the bottom of this dialog for each node while your here and verify that all your required daemons are running before testing fencing.