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

Re: [Xen-users] Run a script after creating a domain



On Thu, Sep 14, 2006 at 11:47:51AM +0100, Tom Z. Napierala wrote:
> Dnia Thursday 14 September 2006 00:26, Roberto Gonzalez Azevedo napisa??:
> > Is it possible to run a script after creating a domain ?
> > e.g.
> > xm create -c /etc/xen/auto/domain
> > ...
> > after this, execute a script.
> > e.g.
> > /etc/xen/scripts/myscript.sh
> > ...
> >
> >
> > Any ideas ?
> 
> You can use xen-tools package (http://xen-tools.org/software/xen-tools/). 
> Excellent tool, you can run several hooks after creating domain, there are 
> also "roles" you can assign to the dom during creation.

  I think the OP was more interested in running a script after the
 new domain had started - rather than after it had been created for
 the first time.

  My solution would be to right a shell script:

  #!/bin/sh
  # /usr/local/bin/start-vm
  #
  if [ -z "${1}"  ]; then echo "Usage: $0 domain; fi

  xm create ${1}
  if [ -x /etc/xen/${1}.sh ]; then
    /etc/xen/${1}.sh
  fi

  That will run "domain.sh" after starting "domain".

Steve
-- 
Debian GNU/Linux System Administration
http://www.debian-administration.org/


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


 


Rackspace

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