Sorry, I was confusing :)
.visdkrc

In the attached external/vcenter I've hopefully merged all the hints.
Dejan, I've also considered your notes.

Just few comments:

1) you proposed:

my $regex = join "|" map { qr/\Q$_\E/ } values %$hosts; 
my $vms = Vim::find_entity_views(view_type => "VirtualMachine", filter
=> { name => qr/^($regex)$/i });

But I didn't succeed to make it working, instead I had to replace it
with:

my $regex = join "|" map { qr/\Q$_\E/i } values %$hosts; 
my $vms = Vim::find_entity_views(view_type => "VirtualMachine", filter
=> { name => qr/^($regex)$/ });

Is it right?

2) I've performed an lc on the keys of the virtual machine hash and on
whatever needed to make it working with VMware case insensitive virtual
machine matching

3) I've used VMware credstore to allow improve security by using
VI_CREDSTORE parameter.

4) I've managed runtime.powerState to prevent from doing anything when a
cluster node is suspended

5) I've added RESETPOWERON to control whether or not sending a PowerOnVM
when the node is found off on reset. This is also needed because,
differently from what specified on the docs, ResetVM on a closed virtual
machine gives out an exception. However, may be that cluster admins
would like to have the opportunity to shut down nodes and to prevent crm
from making them on again (of course they can rename VMs, but... you
know).

6) To make everyone happier, I did not change to given/when :)

I've tested it again i a 2-node cluster, crm stonith configuration is:

===
primitive vfencing stonith:external/vcenter \
params VI_SERVER="10.1.1.1" VI_CREDSTORE="/etc/vicredentials.xml"
HOSTLIST="vm1;vm2" RESETPOWERON="1" \
op monitor interval="60s"
clone Fencing vfencing
===

Best regards,

On Wed, 2011-04-06 at 16:41 +0200, Lars Ellenberg wrote: 

> On Tue, Apr 05, 2011 at 06:27:19PM +0200, Nhan Ngo Dinh wrote:
> > VMware perl library allows to use a .vimrc file in the user home,
> 
> Ouch.
> 
> I guess they all use emacs, then.
> Or notepad ;-)
> 


Attachment: vcenter
Description: Perl program

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to