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] Run a script after creating a domain

To: Steve Kemp <steve@xxxxxxxxxxxx>
Subject: Re: [Xen-users] Run a script after creating a domain
From: Roberto Gonzalez Azevedo <rgonzalez@xxxxxxxxxxxxxxx>
Date: Thu, 14 Sep 2006 08:56:17 -0300
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 14 Sep 2006 04:57:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060914111330.GA32692@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <450893C0.50505@xxxxxxxxxxxxxxx> <200609141147.51791@powerdrag> <20060914111330.GA32692@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.5 (X11/20060719)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

"
> 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
"

Yes that's it, but I want to start it at system boot.
Ubuntu starts all VM's which configuration files located in
/etc/xen/auto. I just want something automatic, rather than to
initialize every VM in /etc/rc.local, but also thanks for the tip.

- ----------------------------
Roberto Gonzalez Azevedo


Steve Kemp wrote:
> 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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFCUNhF+EMwkXLsEwRAnqXAJsGp8Qdx6f6bp8if7TqLbDIV+tleQCfdBh4
5upReIxIcr3K3NU5D4PvhbU=
=2Qhx
-----END PGP SIGNATURE-----

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