Virtual Machine Replication & Failover with VMWare Server & Debian Etch (4.0) 

Version 1.0
Author: Francis Theys  <francis [at] fusiontek [dot] be>, Falko Timme , Till Brehm <t [dot] brehm [at] projektfarm [dot] de>

This tutorial provides step-by-step instructions about how to create a highly available VMware Server environment on a Debian Etch system. With this tutorial, you will be able to create Virtual Machines that will be available on multiple systems with failover/failback capabilities.

The system is based using components of "The High Availability Linux Project" , namely "DRBD" and "Heartbeat".
The free open-source edition of DRBD will only allow a 2-node active/passive environment, so this is not for large businesses!. Also, the heartbeat/drbd setup configured in this tutorial, is by using 2 Ethernet NIC's. I recommend that at least the nic to be used for DRBD replication (eth1 in this tutorial) is 1Gbit or more.

Warning: This tutorial requires at least basic Linux & Networking knowledge and is not for so called "newbies" to Linux and/or Networking and/or Vmware !

There are many ways of achieving this goal but this is the way I take. I do not issue any guarantee that this will work for you!

1. Preliminary Note

I assume you have already set up a basic Debian Etch system with VMWare Server installed on both servers as described in the following tutorials:

"The Perfect Setup - Debian Etch (Debian 4.0)" !!Only the first 2 pages!!

NOTE:When using a server with 4GB RAM or more, please install a "bigmem" kernel and respective headers!

apt-get install linux-image-2.6.18-4-686-bigmem linux-headers-2.6.18.-4-686-bigmem

Since we will be needing a separate filesystem to be replicated between both servers, I suggest using a manual partition scheme like the following:

/dev/sda1 -- 500 MB /boot (primary, ext3, Bootable flag: on)
/dev/sda5 -- 10000 MB / (logical, ext3)
/dev/sda6 -- 2000 MB swap (logical)
/dev/sda7 -- 60 GB unmounted (logical) (will contain the /var/vm directory)

You can vary the sizes of the partitions depending on your hard disk size, and the names of your partition might also vary, depending on your hardware (e.g. you might have /dev/hda1 instead of /dev/sda1 and so on) Also, make sure /dev/sda7 is identical in size on server1 and server2, and please do not mount them when the installer asks you:
No mount point is assigned for the ext3 file system in partition #7 of SCSI1 (0,0,0) (sda).
Do you want to return to the partitioning menu?

please answer No!

"How To Install VMware Server On Debian 4.0" !!Only the first page!!


2. Installing the required packages on both servers

First we update our package database:

apt-get update

Now we install the packages required for this tutorial

apt-get install ssh drbd0.7* module-assistant heartbeat build-essential psmisc
Share this page:

Suggested articles

4 Comment(s)

Add comment



Thank you for this great howto! I've only one thing which is a bit unclear, how needs /dev/sda7 to be created? Should it only be created or formatted too, with ext3? Because you say "No mount point is assigned for the ext3 file system in partition #7 of SCSI1 (0,0,0) (sda)." but here "/dev/sda7 -- 60 GB unmounted (logical, ext3) (will contain the /var/vm directory)". Thanks again for this great howto!

By: Chris Trainor

In this example /dev/sda7 is just a local partition that was created to eventually be the local storage for the drbd mirrored partition.    Just use whatever your normal partition tools to create it on the local drives (of each machine in your mirrored pair).  fdisk, parted, etc.   No need to format it.  You format the mirrored virtual partition after you're all done creating them.



By: sjouken

When I read this tutoral, my question rased if your manual could be used between 2 "regular" debian servers.

Kind regards, John Sjouken

By: charterware

dear Ryan,

that is what I would like to do. Can you give details ? How does the failover work without stonith capabilities ? Eventually, I just want drbd sync and an e-mail at lost heart beat to care manually for failover ?  Best regards Otmar Ripp