|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Run a script after creating a domain
-----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
|
|
|
|
|