WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] Xen hearbeat and automatic restarts?

To: "Morten W. Petersen" <morten@xxxxxxxxxxxxxx>
Subject: Re: [Xen-users] Xen hearbeat and automatic restarts?
From: Josiah Bryan <jbryan@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Jul 2009 07:01:08 -0400
Cc: Xen mailinglist <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 23 Jul 2009 03:59:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4A6840B5.5090205@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <4A6840B5.5090205@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.18 (X11/20081120)
I don't know about formal tools, per se, but I would just set up ssh keys between the DomU and Dom0. Then set up a script in crontab every minute (or X minutes) to ssh to the Dom0 and touch /tmp/myheartbeat.

Then on the Dom0, I'd use a perl program (because I write mostly in perl - shell script would work fine too, I'm sure.). Something like:

#!/usr/bin/perl
if((time - (stat('/tmp/myheartbeat')) > 120) # seconds to wait before killing and restarting the domu on a missed heartbeat
{
   system("xm destroy mydomu");
   system("xm create mydomu");
}

Save it and run it from crontab every X minutes.

Totally untested and just from the top of my head, but something like that should work quite well and should take a whole 10 minutes to setup.

Regards,
-josiah



Morten W. Petersen wrote:
Hi,

are there any tools for Xen where availability of a domU can be monitored,
and if it has hanged or shutdown, it automatically gets restarted?

Thanks,

Morten



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

<Prev in Thread] Current Thread [Next in Thread>