Using the fence_vmware_soap fence agent against VMWare VSphere or ESXi fails with "Unable to obtain correct plug status or plug is not available" in RHEL
Environment
- Red Hat Enterprise Linux (RHEL) 5.6+ with the High Availability Add on
- Red Hat Enterprise Linux (RHEL) 6.2+ with the High Availability Add on
fence_vmware_soapas the configured fenced agent- VMWare ESXi / vSphere 4.1, 5.0, 5.1
Issue
-
When I attempt to fence a node with
fence_vmware_soap, I get the following error:Unable to obtain correct plug status or plug is not available
Resolution
Update to cman-2.0.115-96.el5 from RHBA-2012-0167 for RHEL 5 or later for this change.
Update to fence-agents-3.1.5-10.el6_2.2 from RHBA-2012-0483 for RHEL 6 ZStream or later for this change.
Previously, the fence_vmware_soap utility did not expose valid virtual machine names for fencing. The fence_vmware_soap() function
has been updated to support unique virtual machine names.
If the VM name is not unique then specify the full datacenter path for the VM in the plug (-n) attribute for fence_vmware_soap. For example, if calling the agent from the command line:
$ fence_vmware_soap --ip 192.168.2.5 --username Administrator --password mypass -z --action reboot --plug /datacenter/vm/CLUSTER_NODE_1
If configuring the fence device in the /etc/cluster/cluster.conf:
...
<clusternodes>
<clusternode name="node1.example.com" nodeid="1" votes="1">
<fence>
<method name="1">
<device name="vmware-fence" plug="/datacenter/vm/CLUSTER_NODE_1"/>
</method>
</fence>
</clusternode>
[...]
</clusternodes>
<fencedevices>
<fencedevice agent="fence_vmware_soap" name="vmware-fence" ipaddr="192.168.143.5" login="Administrator" passwd="mypass" ssl="1"/>
</fencedevices>
...
A workaround would be to do the following if those errata is not installed which is to use the UUID of the virtual machine instead of the name. The command to run manually for testing would look like this:
$ fence_vmware_soap --ip 192.168.2.5 --username Administrator --password mypass -z --action reboot --uuid "11111-1111-1111-1111-111111"
The tag to use your /etc/cluster/cluster.conf files is uuid.
<fencedevice agent="fence_vmware_soap" uuid="11111-1111-1111-1111-111111" ipaddr="192.168.143.5" login="Administrator" password="mypass" ssl="1"/>
Root Cause
The VMware interface that the fence agent uses requires a full path to the VM, however current versions of fence_vmware_soap do not specify the full path. It must be specified manually in the plug attribute.
Diagnostic Steps
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.