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/
Home Products Support Community News


Re: [Xen-devel] run a script before creating domain

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] run a script before creating domain
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Fri, 13 Jan 2006 02:12:16 +0000
Cc: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Delivery-date: Fri, 13 Jan 2006 02:32:05 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77DAF0496@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <AEC6C66638C05B468B556EA548C1A77DAF0496@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.1
Seems to me it might be nice to have a few hooks to trigger scripts at key 
points.  You'd be able to configure these in the Xend config file (or 
similar) and use them to implement extra checks / logging / functionality for 
a specific environment.

> Ideally, there would be a 'dom_check_exists' script automatically run
> (if it exists) which could be implemented in a cluster environment, but
> for now, where is a good place to hook into this?

Needs to go inside Xend to strictly fit into the architecture.  How about 
hacking it into tools/python/xen/xend/XendDomainInfo.py::create()?  Your 
first step would be to add a call to vm.precreate_trigger(), which would run 
your script in the first instance (or more generally, one that had been 
configured in Xend's config).  You could use the return value of the script 
to allow / disallow the creation, and return the output text as an error 

Of course, if you're just interested in hacking something up quickly, you 
could add it to the xm tool's create command.  It's a bit ugly but it'll do 
the job and be quick to hack in.


> Thanks
> James
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

Xen-devel mailing list

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