1

I’m learning how to fence pacemaker using fence_virtualbox from [ClusterLabs] Fence agent for VirtualBox, but I can’t get it working. When I try to run stonith_admin –-reboot <node id> it failed.

Currently, my setup is:

Node ID:        VM name:
orcllinux1      OL7
orcllinux2      OL7_2

I set it up using:

pcs stonith create fence_vbox fence_virtualbox pcmk_host_map=”orcllinux1:OL7,orcllinux2:OL7_2” pcmk_host_list=”orcllinux1,orcllinux2” pcmk_host_check=static_list ipaddr=”192.168.57.1” login=”root”

But stonith_admin –-reboot <node id> resulting in this error: Error

I tried to use the fence_virtualbox manually using:

fence_virtualbox -s 192.168.57.1 -p OL7 -o=reboot

and it succeeded.

Is my stonith create syntax wrong? What's the right syntax if it's wrong?

1
  • I resort to change my virtual guest name accordingly with my node ID (orcllinux1 and orcllinux2). Then I add it using pcs stonith create fence_vbox fence_virtualbox ipaddr=”192.168.57.1". This works perfectly when I run stonith_admin –-reboot <node id> but still doesn't answer my question (if it's different name with node ID). Any further help would be appreciated. – Christophorus Reyhan Jan 11 at 3:46
0

This worked for me:

pcs stonith create myfence_vbox fence_vbox identity_file=/root/.ssh/id_rsa ipaddr=192.168.1.20 login=bk201 host_os=linux pcmk_host_map="node1:6051319b-6d94-4469-93ec-b918d047e849 node2:8cbc8c1c-2da0-4ae6-a902-fcc15dfa7745"

To get a list of UUIDs for each VM, run: fence_vbox -o list -l bk201 -x -a 192.168.1.20 -k /root/.ssh/id_rsa

Tested with stonith_admin --reboot node2 from node1 and node2 rebooted.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.