[Linux-HA] Vmware agent

Andrew Beekhof beekhof at gmail.com
Tue Oct 9 00:25:11 MDT 2007


On 10/8/07, Stefano Colombo <stefano.colombo at gruppocdm.it> wrote:
> Hi Andrew ,
>    I did it and got something working but still have problem/doubts
>   - When I use the stop command from the HB GUI the VM got stopped but then the resource goes in unmanaged state .

stop is broken

have a look for the ocf-tester script to verify your agent conforms to
the ocf standard


>   - How can I manually fail the resource from the GUI ?

you cant.  use the crm_resource tool (-F is the option you need)

>   - What can be the reason because sometimes the resource goes in unmanaged state ?
>
> Below the relevant part of modified Dummy script
>
> LOG_FILE="/DS1/LOG/test.log"
> VMDIR="/DS1/VMHOME"
>
> dummy_start() {
> echo `date ` >> $LOG_FILE
> echo "host : " `uname -n `>> $LOG_FILE
> echo "Starting VM : " ${OCF_RESKEY_vmname} >> $LOG_FILE
> VM=`echo ${OCF_RESKEY_vmname} | awk {'print tolower($_)'}`
>   /usr/bin/vmware-cmd /$VMDIR/$VM/$VM.vmx start
>  sleepsleep $OCF_RESKEY_delay
> exit $OCF_SUCCESS
> }
>
> dummy_stop() {
> echo `date ` >> $LOG_FILE
> echo "host : " `uname -n `>> $LOG_FILE
> echo "Stopping VM : " ${OCF_RESKEY_vmname} >> $LOG_FILE
> VM=`echo ${OCF_RESKEY_vmname} | awk {'print tolower($_)'}`
>      /usr/bin/vmware-cmd /$VMDIR/$VM/$VM.vmx stop ${OCF_RESKEY_state}
>  sleepsleep $OCF_RESKEY_delay
> exit $OCF_SUCCESS
> }
>
> dummy_monitor() {
> echo `date ` >> $LOG_FILE
> echo "host : " `uname -n `>> $LOG_FILE
> echo "Monitoring VM : " ${OCF_RESKEY_vmname} >> $LOG_FILE
> VM=`echo ${OCF_RESKEY_vmname} | awk {'print tolower($_)'}`
> STATO=`/usr/bin/vmware-cmd /$VMDIR/$VM/$VM.vmx getstate | grep off`
>  if [ $STATO  -eq ""]; then
>    echo "STATO : VM Running  "  >> $LOG_FILE
>    exit $OCF_SUCCESS
>
> else
>    echo "STATO : VM Stopped "  >> $LOG_FILE
>    exit $OCF_NOT_RUNNING
> fi
> }
>
> Thanks
>
>
> Stefano Colombo
> Senior Consultant
> CDM Tecnoconsulting SPA
> v. M.L. King 38/2
> 40132 - Bologna
> Italia
>
> Tel: 051-4132611
> Fax: 051-4132627
> email: stefano.colombo at gruppocdm.it
>
>
> -----Original Message-----
> From: Andrew Beekhof [mailto:beekhof at gmail.com]
> Sent: lunedì 8 ottobre 2007 09:08
> To: General Linux-HA mailing list
> Subject: Re: [Linux-HA] Vmware agent
>
> start with the Dummy agent and fill in the start, stop and monitor
> functions with commands relevant to starting, stopping and checking
> the health of a vmware node.
>
> On 10/7/07, Stefano Colombo <stefano.colombo at gruppocdm.it> wrote:
> > I'm trying to setup an ocf agent to manage VMWARE Server and its
> > machines.
> > Unfortunately I'm quite new to linux-ha :-) so I'm asking for help .
> > Does anyone have any hint to accomplish this task ?
> >
> > Thanks
> >
> > _______________________________________________
> > Linux-HA mailing list
> > Linux-HA at lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha
> > See also: http://linux-ha.org/ReportingProblems
> >
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.488 / Virus Database: 269.14.4/1056 - Release Date: 07/10/2007 18:12
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>



More information about the Linux-HA mailing list