Installation And Setup Guide For DRBD, OpenAIS, Pacemaker + Xen On OpenSUSE 11.1


The following will install and configure DRBD, OpenAIS, Pacemaker and Xen on OpenSUSE 11.1 to provide highly-available virtual machines. This setup does not utilize Xen's live migration capabilities. Instead, VMs will be started on the secondary node as soon as failure of the primary is detected. Xen virtual disk images are replicated between nodes using DRBD and all services on the cluster will be managed by OpenAIS and Pacemaker. The following setup utilizes DRBD 8.3.2 and Pacemaker 1.0.4. It is important to note that DRBD 8.3.2 has come a long way since previous versions in terms of compatibility with Pacemaker. In particular, a new DRBD OCF resource agent script and new DRBD-level resource fencing features. This configuration will not work with older releases of DRBD.



This document does not cover the configuration of Xen virtual machines. Instead, it is assumed you have a working virtual machine configured locally with a file-based disk image. As an example, our domU resource will manage a Debian virtual machine configured in debian.cfg.


Visit these links for more information on any of these components as well as additional documentation:

DRBD - http://www.drbd.org
Pacemaker - http://www.clusterlabs.org
OpenaAIS - http://www.openais.org



1. Install Xen
2. Install and Configure DRBD
3. Install and Configure OpenAIS + Pacemaker
4. Configure DRBD Master/Slave Resource
5. Configure File System Resource
6. Configure domU Resource
7. Additional Information




1. Install Xen


The easiest way to install Xen and its prerequisites is through the yast command line tool:


# yast


Choose 'Virtualization' -> 'Install Hypervisor and tools'. If you're working on a remote server you may need to answer 'No' when asked about installing graphical components. Select 'Yes' when prompted about Xen Network Bridge.


Select 'System' -> 'Boot Loader' and set the Xen kernel as the default kernel.




At this point, the Xen kernel should be booted and a network interface br0 should be configured as a bridge to eth0.



Register to

HowTo XEN Cluster


I have tried to run both Debian Etch and Ubuntu 8.04 Server on the cluster nodes, in Dom0. I started my tests with Debian, but I had some issues with slow samba performance in one VM that I couldn't fix so I decided to try Ubuntu Server, for the first time. Both installation went OK, the main difference was that I used mainly source code in Debian, but only packages in Ubuntu. I actually ran into more problems with Ubuntu due to some early bugs in the 8.04 release, will describe them below as I go along.

The setup in Ubuntu was very stable and I had initially very few problems. I ran into some trouble later on when it turned out that my heartbeat in combination with XEN was negatively effected by some system updates. Never had time to resolve it so I eventually switch off heartbeat as it was just causing issues.
Instead I have started with a new install consisting of Debian Squeeze and XEN version 4. I'm migrating the data upgrading one node at the time. Documenting the migration phase and will publish it together with a fresh install guide.

Installation How to


Linux - Ubuntu 8.04 Server
Ubuntu - Base configuration
Installing XEN
Configure LVM
Configure XEN-tools
Using XEN-tools to install DomU
Install and configure DRBD
Configure DomU to use your DRBD device
Configure DomU on your other Dom0 node
Configure Live Migration
Install and Configure Heartbeat
Bug in default xendomains script
Register to



HyperVM currently supports windows virtualization via the Xen hyperVisor. To create a windows vps, you will need to download the Microsoft Windows installation CD from their site.

The process of windows virtualization involves 3 steps:

  1. First create a blank VPS and then manually install windows in it.
  2. Create an ostemplate out of this newly installed windows.
  3. From then on, use this ostemplate to create further windows vpses.

When adding a vps, first choose the windows-lxblank.img as the ostemplate, and HyperVM will create a blank vps, which has the cdrom attached, and will automatically boot from the cdrom. You will need to get the Windows ISO image from MS website, and the save it on the slave somwhere, and then link it to /home/wincd.img

  1. Download the windows installation cd
  2. ln -sf /full-path-to-the-installation-cd-image /home/wincd.img

Please make sure you use the full, absolute path for the image, and not relative path. Once the vps is created, it will be booted, and you will be able to access the vps via the in-built VNC-client. You will see the standard windows installation screen, and please follow the instructions to install windows on the newly created VPS.

After the installation is complete, click on create Ostemplate button. You will be asked to provide a name, and hyperVM will convert the existing vps into an ostemplate, which you can use later.

After that, when creating a vps, please choose the ostemplate you created, and you will be able to create windows vps in the same manner as you create Linux vpses.

Page 1 of 3