[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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 
message.

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.

Cheers,
Mark

> 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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.