[Linux-HA] Heartbeat, Xen and live migration

Espen Braastad espent.braastad at iu.hio.no
Wed Feb 1 04:06:57 MST 2006

Hello list,
I have a project going on where the purpose is to make heartbeat control
virtual machines (Xen) in a cluster. Right now the system is configured so
that heartbeat shuts down the VMs before failover, and boots them on the
other nodes. I'm using regular init.d-scripts for doing this in the
traditional "heartbeat way". The commands used are 'xm create x0' as start
and 'xm shutdown x0' as stop (x0 is the name of the virtual machine).
Heartbeat-2.0.2 is currently used.

The problem:
I want heartbeat to perform live migration on the virtual machines instead
of shutdown and then boot-up. The command for live migration is 'xm
migrate x0 nodename --live' where nodename is the hostname of the node
that should take over the VM (failover node).

The command '/etc/init.d/x0 stop' should then initiate live migration for
x0 to another node instead of doing 'xm shutdown x0'. Since Xen is doing
the migrating part, heartbeat should *not* boot x0 from scratch using
'/etc/init.d/x0 start' on the failover node (maybe the easiest here is to
make this command do nothing? or boot VM if no VM is found, which means
that migration failed?).

As I understand it, I have two problems:
1. I need to know where heartbeat is going to failover the service (to
which node), and use /etc/init.d/x0 stop to migrate the VM. Is it possible
to output the failover node in any heartbeat command, before the
stop-script is initiated?

2. How will heartbeat behave if I "manually" migrate the VM to another
node using this stop-script? Is it sufficient to implement a status check
in the init.d-scripts that checks if the service is running (more than
just if the pid file exists)?

I also have feature request for heartbeat (I hope it is sufficient to post
it here):
Heartbeat has become very flexible, so I was actually surprised that I
found a feature I missed:) The nodes in our cluster have 1024MB of memory.
The virtual machines require 256MB each, and the domain-0 (physical host
operating system) requires some also. This makes it impossible to run more
than 3 virtual machines on each node - which I would very much like to
specify as maximum in heartbeat.

For example using the <nodes/>-section to specify how many resource groups
each node can host simultaneously? (I have very little experience in
development, so bear with me:)

I hope I managed to explain my problems/questions clear enough. I also
would very much like to get in touch with others that have
experience/thoughts about heartbeat <-> Xen or similar problems.

Kind regards,
Espen Braastad

More information about the Linux-HA mailing list