Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 12th August 2008, 20:41
thanis thanis is offline
Member
 
Join Date: Aug 2007
Location: somewhere over the rainbox
Posts: 30
Thanks: 0
Thanked 7 Times in 7 Posts
Default

Ah, now I see. You used IP address 192.168.1.13 in your haresources, while it is already configured on sproetjhuh. You should use a different free IP address as your virtual IP address for the failover. So you need at least 3 address, 1 for sproetjuh, 1 for kimmetjuh and 1 as the virtual IP. The virtual IP is what you use to connect to the active node.

Grtz,
Thanis
Reply With Quote
Sponsored Links
  #12  
Old 12th August 2008, 20:57
Bart van Kleef Bart van Kleef is offline
Junior Member
 
Join Date: Aug 2008
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Ahh, thanks a lot! I changed it in 192.168.1.10 on both nodes. This IP should also be added /etc/hosts because I get still after a reboot secondary/secondary? If yes, something like:
Code:
127.0.0.1       localhost.localdomain   localhost
192.168.1.10    virtual.home            sproetjuh
192.168.1.13    sproetjuh.home          sproetjuh
192.168.1.15    kimmetjuh.home          kimmetjuh
Grtz,

Bart van Kleef
Reply With Quote
  #13  
Old 12th August 2008, 21:03
thanis thanis is offline
Member
 
Join Date: Aug 2007
Location: somewhere over the rainbox
Posts: 30
Thanks: 0
Thanked 7 Times in 7 Posts
Default

No it should not be added to your hosts file, (definitely NOT), but please do the following commands again and post the output here:
1. On kimmetjuh: /etc/init.d/heartbeat stop
2. On sproetjuh: /etc/init.d/heartbeat restart
3. On sproetjuh: tail /var/log/ha-log

I also suggest remove the "vmstart" in your haresources file for testing purposes, as that will probably not work anyway and might actually be the problem

Thanks Thanis

Last edited by thanis; 12th August 2008 at 21:07.
Reply With Quote
  #14  
Old 12th August 2008, 21:08
Bart van Kleef Bart van Kleef is offline
Junior Member
 
Join Date: Aug 2008
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
Default

So here is the output of "tail /var/log/ha-log":

Code:
heartbeat: 2008/08/12_21:07:37 info: pid 4701 locked in memory.
heartbeat: 2008/08/12_21:07:37 info: Local status now set to: 'up'
heartbeat: 2008/08/12_21:07:38 info: pid 4703 locked in memory.
heartbeat: 2008/08/12_21:07:38 info: pid 4704 locked in memory.
heartbeat: 2008/08/12_21:07:38 info: pid 4705 locked in memory.
heartbeat: 2008/08/12_21:07:38 info: Link sproetjuh:eth1 up.
heartbeat: 2008/08/12_21:07:38 info: pid 4706 locked in memory.
heartbeat: 2008/08/12_21:07:38 info: pid 4707 locked in memory.
heartbeat: 2008/08/12_21:07:38 info: Link 10.1.1.15:10.1.1.15 up.
heartbeat: 2008/08/12_21:07:38 info: Status update for node 10.1.1.15: status ping
Thanks,

Bart van Kleef

PS Still I got no eth0:0..

Last edited by Bart van Kleef; 12th August 2008 at 21:12.
Reply With Quote
  #15  
Old 12th August 2008, 21:49
thanis thanis is offline
Member
 
Join Date: Aug 2007
Location: somewhere over the rainbox
Posts: 30
Thanks: 0
Thanked 7 Times in 7 Posts
Default

Woops, seems I missed something while reading your configs. Your ha.cf is not correct:
Your config:
Code:
kimmetjuh:~# cat /etc/ha.d/ha.cf
logfile /var/log/ha-log
logfacility     local0
keepalive 1
deadtime 10
warntime 10
udpport 694
bcast   eth1
auto_failback off
node    sproetjuh  ## make sure both names are accessible - check /etc/hosts
node    kimmetjuh
ping 10.1.1.13  ## Enter an IP address that is pingable from the ETH0 network !!
respawn hacluster /usr/lib/heartbeat/ipfail
At the ping 10.1.1.13 statement I specifically say that this should be pingable from the ETH0 network, however ... eth0 on both nodes is in the 192.168.1.0 network, so the ping "10.1.1.13" should read 192.168.1.1 (or something else, preferably your internet gateway?). If this is set to a non-pingable host, as it is now, heartbeat thinks the network is down ==> ergo, no services are started because both nodes are down!

Grtz,
Thanis
Reply With Quote
The Following User Says Thank You to thanis For This Useful Post:
Bart van Kleef (12th August 2008)
  #16  
Old 12th August 2008, 21:56
Bart van Kleef Bart van Kleef is offline
Junior Member
 
Join Date: Aug 2008
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
Default

This is so stupid! It explains everything.. I let you know if this works!

Thank you so much!
Reply With Quote
  #17  
Old 16th August 2008, 16:23
sebastienp sebastienp is offline
Junior Member
 
Join Date: Mar 2008
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
Default Failover with VMWare Server - /var/vm isn't the right size..

Hi Bart,

Just a question now that everything looks up and running by your side :

- Does the failover works for you ?

That means, do you get yours VMs running and accessible on the second node when disconnecting the primary node ?

I don't understand why it's not working for me...
So any help/clue/info is appreciated !

Thank you for your feedback,
Regards,
S.
Reply With Quote
  #18  
Old 18th August 2008, 09:11
Bart van Kleef Bart van Kleef is offline
Junior Member
 
Join Date: Aug 2008
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Sorry for my late reply but I got some other things to do..

Thanis, thanks you so much! Everything works great now!

Sebastien, yes for so far I know. I've seen you're other replies too.
My heartbeat version is 1.2.5 (http://packages.debian.org/etch/heartbeat), DRBD v0.7.21 (http://packages.debian.org/etch/drbd0.7-module-source, http://packages.debian.org/etch/drbd0.7-utils). And VMware server:
VMware Infrastructure Web AccessVersion 2.0.0 Build 101583, VMware Server Version 2.0.0 Build 101586 (http://download3.vmware.com/software...86.i386.tar.gz)
And everything is installed on Debian Etch netinstall (http://cdimage.debian.org/debian-cd/...86-netinst.iso)

If you got some more questions let me know!

Greets,

Bart van Kleef
Reply With Quote
  #19  
Old 18th August 2008, 09:30
Bart van Kleef Bart van Kleef is offline
Junior Member
 
Join Date: Aug 2008
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Sorry for my late response!
Thanis the most of you're howto works fine, once again thank you so much!

Sebastien, for so far as I know, only one big problem. When I add vmstart to /etc/ha.d/haresources both nodes are in the secondary state:
Code:
version: 0.7.21 (api:79/proto:74)
SVN Revision: 2326 build by root@sproetjuh, 2008-08-13 11:34:17
 0: cs:Connected st:Secondary/Secondary ld:Consistent
    ns:8 nr:0 dw:8 dr:33 al:0 bm:257 lo:0 pe:0 ua:0 ap:0
When I remove the vmstart line in /etc/ha.d/haresources and reboot the two nodes and login into VMware Infrastructure Web Access all of the virtual machines are "unknown (inaccessible)" and the size of /var/vm is only 4.4GB (hda5). When I create a new virtual machine it shows the correct size of drbd0 (hda6) . Then I remove the unknown machines from the inventory and I add them again to the inventory and everything works fine . All this happening because I think VMware Server 2 starts earlier than DRBD? And if that's true vmstart could not find the machines at /var/vm because it looks on hda5? And that's the reason the both nodes go into secondary/secondary mode? Or my /etc/ha.d/resource.d/vmstart isn't correct:
Code:
#!/bin/bash
case "$1" in
start)
/usr/bin/vmware-cmd -s register "/var/vm/alfresco/alfresco.vmx" 2>/dev/null
/usr/bin/vmware-cmd "/var/vm/alfresco/alfresco.vmx" start 2>/dev/null
;;
stop)
/usr/bin/vmware-cmd "/var/vm/alfresco/alfresco.vmx" stop trysoft 2> /dev/null
;;
status)
if `/usr/bin/vmware-cmd "/var/vm/alfresco/alfresco.vmx" getstate 2>/dev/null | grep -q "getstate() = on"`
then
echo "running"
else
echo "stopped"
fi
;;
*)
echo "Usage: `basename $0` 'virtual machine file' {start|stop|status}"
echo "Where "virtual machine file" is like /var/vm/alfresco/alfresco.vmx"
;;
esac
exit 0
For as far as I know, this is just what does not work for me.

Here some information where you asked for in another thread:
Heartbeat v1.2.5
DRBD utils v0.7.2.1
DRBD module source v0.7.2.1
VMware Server v2.0.0 Build 101586 and VMware Infrastructure Web Access v2.0.0 Build 101583

If you have some other questions just let me know!

Greets,

Bart van Kleef

Last edited by Bart van Kleef; 18th August 2008 at 10:52.
Reply With Quote
  #20  
Old 18th August 2008, 11:08
Bart van Kleef Bart van Kleef is offline
Junior Member
 
Join Date: Aug 2008
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
 
Default

Quote:
Or my /etc/ha.d/resource.d/vmstart isn't correct:
When I go to /usr/bin and run ls vmware-cmd doesn't exist :
Code:
vmnet-bridge
vmnet-dhcpd
vmnet-natd
vmnet-netifup
vmnet-sniffer
vmrun
vmstat
vm-support
vmware
vmware-config.pl
vmware-mount
vmware-ping
vmware-uninstall.pl
vmware-uninstall-vix.pl
vmware-vdiskmanager
vmware-vim-cmd
vmware-vimsh
vmware-watchdog
Code:
vmrun version 2.0.0 build-101586

Usage: vmrun [AUTHENTICATION-FLAGS] COMMAND [PARAMETERS]



AUTHENTICATION-FLAGS
--------------------
These must appear before the command and any command parameters.

   -h <hostName>  (not needed for Workstation)
   -P <hostPort>  (not needed for Workstation)
   -T <hostType> (ws|server|server1)
     for example, use '-T server' for Server 2.0
                  use '-T server1' for Server 1.0
   -u <userName in host OS>  (not needed for Workstation)
   -p <password in host OS>  (not needed for Workstation)
   -gu <userName in guest OS>
   -gp <password in guest OS>



POWER COMMANDS           PARAMETERS           DESCRIPTION
--------------           ----------           -----------
start                    Path to vmx file     Start a VM
                         [gui|nogui]

stop                     Path to vmx file     Stop a VM
                         [hard|soft]

reset                    Path to vmx file     Reset a VM
                         [hard|soft]

suspend                  Path to vmx file     Suspend a VM
                         [hard|soft]

pause                    Path to vmx file     Pause a VM

unpause                  Path to vmx file     Unpause a VM



SNAPSHOT COMMANDS        PARAMETERS           DESCRIPTION
-----------------        ----------           -----------
snapshot                 Path to vmx file     Create a snapshot of a VM
                         Snapshot name

deleteSnapshot           Path to vmx file     Remove a snapshot from a VM
                         Snapshot name

revertToSnapshot         Path to vmx file     Set VM state to a snapshot
                         Snapshot name



RECORD/REPLAY COMMANDS   PARAMETERS           DESCRIPTION
----------------------   ----------           -----------
beginRecording           Path to vmx file     Begin recording a VM
                         Snapshot name

endRecording             Path to vmx file     End recording a VM

beginReplay              Path to vmx file     Begin replaying a VM
                         Snapshot name

endReplay                Path to vmx file     End replaying a VM



GUEST OS COMMANDS        PARAMETERS           DESCRIPTION
-----------------        ----------           -----------
runProgramInGuest        Path to vmx file     Run a program in Guest OS
                         Program
                         [-noWait]
                         [-activeWindow]
                         [-interactive]
                         [Program arguments]

fileExistsInGuest        Path to vmx file     Check if a file exists in Guest OS
                         Path to file in guest

setSharedFolderState     Path to vmx file     Modify a Host-Guest shared folder
                         Share name
                         Host path
                         writable | readonly

addSharedFolder          Path to vmx file     Add a Host-Guest shared folder
                         Share name
                         New host path

removeSharedFolder       Path to vmx file     Remove a Host-Guest shared folder
                         Share name

listProcessesInGuest     Path to vmx file     List running processes in Guest OS

killProcessInGuest       Path to vmx file     Kill a process in Guest OS
                         process id

runScriptInGuest         Path to vmx file     Run a script in Guest OS
                         Interpreter path
                         script_text

deleteFileInGuest        Path to vmx file     Delete a file in Guest OS
                         Path in guest

createDirectoryInGuest   Path to vmx file     Create a directory in Guest OS
                         Directory path in guest

deleteDirectoryInGuest   Path to vmx file     Delete a directory in Guest OS
                         Directory path in guest

listDirectoryInGuest     Path to vmx file     List a directory in Guest OS
                         Directory path in guest

copyFileFromHostToGuest  Path to vmx file     Copy a file from host OS to guest                                                                                                                                OS
                         Path on host
                         Path in guest

copyFileFromGuestToHost  Path to vmx file     Copy a file from guest OS to host                                                                                                                                OS
                         Path in guest
                         Path on host

renameFileInGuest        Path to vmx file     Rename a file in Guest OS
                         Original name
                         New name

captureScreen            Path to vmx file     Capture the screen of the VM to a                                                                                                                                local file
                         Path on host

writeVariable            Path to vmx file     Write a variable in the VM state
                         [runtimeConfig|guestEnv]
                         variable name
                         variable value

readVariable             Path to vmx file     Read a variable in the VM state
                         [runtimeConfig|guestEnv]
                         variable name



VPROBE COMMANDS          PARAMETERS           DESCRIPTION
---------------          ----------           -----------
vprobeVersion            Path to vmx file     List VP version

vprobeLoad               Path to vmx file     Load VP script
                         'VP script text'

vprobeReset              Path to vmx file     Disable all vprobes

vprobeListProbes         Path to vmx file     List probes

vprobeListGlobals        Path to vmx file     List global variables



GENERAL COMMANDS         PARAMETERS           DESCRIPTION
----------------         ----------           -----------
list                                          List all running VMs

upgradevm                Path to vmx file     Upgrade VM file format, virtual hw

installtools             Path to vmx file     Install Tools in Guest

clone                    Path to vmx file     Create a copy of the VM
                         Path to destination vmx file
                         full|linked
                         [Snapshot name]




Examples:


Starting a virtual machine with Workstation on a Windows host
   vmrun -T ws start "c:\my VMs\myVM.vmx"


Stopping a virtual machine with Server on a linux host
   vmrun -T server -h https://myHost.com/sdk -u hostUser -p hostPassword stop "[                                                                                                                               storage1] vm/myVM.vmx"


Running a program in a virtual machine with Workstation on a Windows host with W                                                                                                                               indows guest
   vmrun -T ws -gu guestUser -gp guestPassword runProgramInGuest "c:\my VMs\myVM                                                                                                                               .vmx" "c:\Program Files\myProgram.exe"


Running a program in a virtual machine with Server on a linux host with linux gu                                                                                                                               est
   vmrun -T server -h https://myHost.com/sdk -u hostUser -p hostPassword -gu gue                                                                                                                               stUser -gp guestPassword runProgramInGuest "[storage1] vm/myVM.vmx" /usr/bin/X11                                                                                                                               /xclock -display :0


Creating a snapshot of a virtual machine with Workstation on a Windows host
   vmrun -T ws snapshot "c:\my VMs\myVM.vmx" mySnapshot


Reverting to a snapshot with Workstation on a Windows host
   vmrun -T ws revertToSnapshot "c:\my VMs\myVM.vmx" mySnapshot


Deleting a snapshot with Workstation on a Windows host
   vmrun -T ws deleteSnapshot "c:\my VMs\myVM.vmx" mySnapshot
So it's not surprising that vmstart does't work.

Regards,

Bart van Kleef

PS if you need ssh access let me know.

Last edited by Bart van Kleef; 18th August 2008 at 11:11.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 8.04 Server LTS and VMware Server 1.05 Ken Lee Suggest HOWTO 3 10th June 2008 16:03
VMware Server and Linux Mint 5 waellerbe HOWTO-Related Questions 1 2nd June 2008 10:42
VMWARE server 1.0.3 from 1.0.1 gone bad rjn456 Installation/Configuration 2 13th June 2007 08:13
vmware server setup with multiple users handband2 HOWTO-Related Questions 3 19th April 2007 14:44
VMWare Server Free License - Invalid bardgd HOWTO-Related Questions 6 19th November 2006 17:50


All times are GMT +2. The time now is 14:57.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.