From: Matthew Ife Date: Fri, 01 May 2009 22:23:22 +0100 Subject: [Cluster-devel] Fencing Agent for Qemu Message-ID: <1241213002.9784.0.camel@home.localdomain> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I know there is a fencing agent for Xen but since Redhat have pretty much dropped all support for Xen now its not very effective for me to use it. Plus - I prefer KVM/Qemu. In order to save everyone else the effort, attached is a somewhat restrictive qemu fencing agent. Its plainly not meant to be used for production because the hypervisor connection is unauthenticated and unencrypted. To set this up (on F10) libvirt needs to be configured to listen for plain tcp connections within the virtual network that has been setup for the nodes to operate under. Also your nodes need libvirt-python installing to use the agent. The agent takes a number of parameters, "port", "ipaddr", "action". ipaddr refers to the hypervisor IP address for which the nodes are children of. port refers to the VM name given in the hypervisor for the victim node. action is the action to take, form "status", "reboot", "on", "off". I'm pretty sure my attempt at this is lacklustre as its my first go. However I can confirm its definitely working - at least for me! Attached is my very basic config for this and the agent itself. Put the agent in /sbin of course and named fence_qemu. Since I selfishly built it for my purposes only it doesn't do anything snazzy like ssh or provide auth. Its probably not difficult to add that though as all the facilities for that live in the libvirt bindings themselves. Hope this saves people some time / effort. Good Luck! -------------- next part -------------- A non-text attachment was scrubbed... Name: fence_qemu Type: text/x-python Size: 3100 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: cluster.conf Type: application/xml Size: 1140 bytes Desc: not available URL: