Setting up VMware Server under HA using Heartbeat on SLES 10.1


Base OS installation is SLES10.1

Installing VMWare Server

  • Download the latest version from www.vmware.com – Currently 1.0.4 (9/18/07)
  • As root uncompress the . tar.gz file “tar -xvf VMware-server-1.0.4-56528.tar.gz”
  • Move into the directory created by tar “cd vmware-server-distrib
  • Launch the installer using ” ./vmware-install.pl
  • Most of the questions you will be able to take the default answer unless you want a specific setup i.e. using certain ports/netwosk.

All Done – VMWare Server installed

Once you have finished launch a copy of “Vmware Server Console” one either the server OR remote machine. If you do not have it installed please download it from the www.vmware.com site

Installing Heartbeat

  • The package manage does not appear to be able to load all the rpms required for installing heartbeat so the following rpms need to be copied from the install DVD/CD to the local filesystem i.e. /root/InstallFiles/.
    • -rw-r–r– 1 root root 36038 Jul 3 2006 ipvsadm-1.24-123.2.x86_64.rpm
      -rw-r–r– 1 root root 260128 Jun 16 2006 libnet-1.1.2.1-18.2.x86_64.rpm
      -rw-r–r– 1 root root 106491 Jun 16 2006 perl-HTML-Parser-3.48-12.2.x86_64.rpm
      -rw-r–r– 1 root root 15450 Jun 16 2006 perl-HTML-Tagset-3.10-12.2.x86_64.rpm
      -rw-r–r– 1 root root 336102 Jun 16 2006 perl-libwww-perl-5.805-12.2.x86_64.rpm
      -rw-r–r– 1 root root 190650 Jun 16 2006 python-xml-2.4.2-18.2.x86_64.rpm
  • Once copied install them all as root using “rpm -ivh *.rpm”
  • Now that the prereqs have been met we can now install heartbeat using Yast – Launch Yast then “Software Managment”
  • In the search box type “heatbeat” -> Tick the list of 5 heatbeat* packages that it finds then click “Accept” to installheartbeat
  • Click “Continue” when asked about upgrading perl-Net_SSLeay
  • Click “No” when asked abot installing more packages

All done – Heartbeat Installed 🙂

Configuring Heartbeat – On Node 1

  • Launch the HA GUI via Yast -> High Availability
  • Add in the two new nodes by putting in a node name such as “HA Node 1” and click “Add” then “HA Node 2” and “Add again. Now click “Next”
  • My machines are in a secure environment so I am not going to use keys – If you want to setup Keys now is the time. For me its “Next”
  • We will use the default setup – broadcasting over eth0 for heartbeats using UDP Port 694 – Click “Next”
  • If you want to setup multiple heartbeats configure a second ethernet connection otherwise click “Next”
  • For now we are going to setup Heartbeat to start manually – when we are running we can change this to automatic so gain its the default “Next”
  • Job Done

Now its time to go and look at what it has setup. Take a look at /etc/ha.d/ha.cf. Hopefully it will look something like this

#logfacility local7
#logfile /var/log/ha-log
#debugfile /var/log/ha-debug
use_logd on

keepalive 1 # 1 second
deadtime 10
initdead 80
bcast eth0

autojoin any
crm true
bcast eth0
node belarus beith
respawn root /sbin/evmsd
apiauth evms uid=hacluster,root

Next we need to copy this file across to the second server. One of the most important issues when working with heartbeat is to make sure that both machines have the same copy of ha.cf

scp /etc/ha.d/ha/cf root@<Node2>:/etc/ha.d/ha.cf

Now time to start Heartbeat and check its happy enough. Open Yast -> High Availability -> Start-up Configuration Tab -> Click “Start Heartbeat Server Now”

Open a terminal and look at /var/log/messages and you should see something like this

Sep 20 15:20:52 belarus heartbeat: [12928]: info: Comm_now_up(): updating status to active
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Local status now set to: ‘active’
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Starting child client “/usr/lib64/heartbeat/ccm” (90,90)
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Starting child client “/usr/lib64/heartbeat/cib” (90,90)
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Starting child client “/usr/lib64/heartbeat/lrmd” (0,0)
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Starting child client “/usr/lib64/heartbeat/stonithd” (0,0)
Sep 20 15:20:52 belarus heartbeat: [12990]: info: Starting “/usr/lib64/heartbeat/ccm” as uid 90  gid 90 (pid 12990)
Sep 20 15:20:52 belarus heartbeat: [12992]: info: Starting “/usr/lib64/heartbeat/lrmd” as uid 0  gid 0 (pid 12992)
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Starting child client “/usr/lib64/heartbeat/attrd” (90,90)
Sep 20 15:20:52 belarus heartbeat: [12991]: info: Starting “/usr/lib64/heartbeat/cib” as uid 90  gid 90 (pid 12991)
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Starting child client “/usr/lib64/heartbeat/crmd” (90,90)
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Starting child client “/usr/lib64/heartbeat/mgmtd -v” (0,0)
Sep 20 15:20:52 belarus heartbeat: [12995]: info: Starting “/usr/lib64/heartbeat/crmd” as uid 90  gid 90 (pid 12995)
Sep 20 15:20:52 belarus heartbeat: [12928]: info: Starting child client “/sbin/evmsd” (0,0)
Sep 20 15:20:52 belarus heartbeat: [12928]: WARN: G_CH_dispatch_int: Dispatch function for read child took too long to execute: 480 ms (> 50 ms) (GS
ource: 0x5ecbf8)
Sep 20 15:20:52 belarus heartbeat: [12994]: info: Starting “/usr/lib64/heartbeat/attrd” as uid 90  gid 90 (pid 12994)
Sep 20 15:20:52 belarus heartbeat: [12997]: info: Starting “/sbin/evmsd” as uid 0  gid 0 (pid 12997)
Sep 20 15:20:52 belarus heartbeat: [12993]: info: Starting “/usr/lib64/heartbeat/stonithd” as uid 0  gid 0 (pid 12993)
Sep 20 15:20:52 belarus cib: [12991]: info: G_main_add_SignalHandler: Added signal handler for signal 15
Sep 20 15:20:52 belarus cib: [12991]: info: G_main_add_TriggerHandler: Added signal manual handler
Sep 20 15:20:52 belarus cib: [12991]: info: G_main_add_SignalHandler: Added signal handler for signal 17
Sep 20 15:20:52 belarus cib: [12991]: info: main:main.c Retrieval of a per-action CIB: disabled
Sep 20 15:20:52 belarus cib: [12991]: info: cib_register_ha:main.c Signing in with Heartbeat
Sep 20 15:20:52 belarus ccm: [12990]: info: Hostname: belarus
Sep 20 15:20:52 belarus cib: [12991]: info: cib_register_ha:main.c FSA Hostname: belarus
Sep 20 15:20:52 belarus cib: [12991]: info: readCibXmlFile:io.c Reading cluster configuration from: /var/lib/heartbeat/crm/cib.xml


Leave a Reply

Your email address will not be published.