Hi,

On Thu, Apr 07, 2011 at 10:36:11AM +0200, Nhan Ngo Dinh wrote:
> To help people testing it, here is what to do in each cluster node.
> You can test it with ESX/ESXi or vCenter: it should work in both cases.
> 
> 1) install VMware vSphere CLI, which includes Perl SDK and
> administrative tools for generating the credentials XML file:
> http://www.vmware.com/download/download.do?downloadGroup=VCLI41 ,
> 
> 2) put vcenter script attached previously
> in /usr/lib/stonith/plugins/external/ or wherever the external stonith
> plugins are.
> 
> 3) create the credentials file with credstore_admin.pl:
> 
> /usr/lib/vmware-vcli/apps/general/credstore_admin.pl -s 10.1.1.1 -u
> myuser -p mypass
> 
> This should create $HOME/.vmware/credstore/vicredentials.xml . I suggest
> to copy it at least to /etc
> 
> cp -p $HOME/.vmware/credstore/vicredentials.xml /etc
> 
> 4) do the very first testing:
> 
> VI_SERVER=10.1.1.1 VI_CREDSTORE=/etc/vicredentials.xml
> HOSTLIST="hostname1=vmname1;hostname2=vmname2"
> RESETPOWERON=0 /usr/lib/stonith/plugins/external/vcenter gethosts
> 
> If everything works correctly you should get:
> 
> hostname1
> hostname2
> 
> You can even test "reset", "off" and "on" commands, to test (carefully!)
> the full chain. E.g.
> 
> VI_SERVER=10.1.1.1 VI_CREDSTORE=/etc/vicredentials.xml
> HOSTLIST="hostname1=vmname1;hostname2=vmname2"
> RESETPOWERON=0 /usr/lib/stonith/plugins/external/vcenter reset hostname2
> 
> 5) test if stonith can see the script:
> 
> stonith -t external/vcenter -n
> 
> 6) configure crm. In a 2-node configuration, with no previous stonith
> entry and with stonith-enabled set to false:
> 
> crm configure primitive vfencing stonith::external/vcenter params
> VI_SERVER="10.1.1.1" VI_CREDSTORE="/etc/vicredentials.xml"
> HOSTLIST="hostname1=vmname1;hostname2=vmname2" RESETPOWERON="0" op
> monitor interval="60s"
> 
> crm configure clone Fencing vfencing
> 
> crm configure property stonith-enabled="true"
> 
> ===
> I've tested it with VMware vCenter 4.1, the cluster is a 2-node cluster
> based on Debian 6.0 "Squeeze" with distribution clustering stack:
> CoroSync 1.2.1 / Pacemaker 1.0.9.1 . Cluster nodes are on different ESXi
> 4.1 servers.

You could actually reformat this slightly and we add that as
README.vcenter to the repository.

Cheers,

Dejan

> Nhan
> 
> 

> _______________________________________________________
> Linux-HA-Dev: [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to