[xen-tools] Re: reimage-support with more than one controllable host

Steve Kemp steve at steve.org.uk
Sun Apr 8 17:04:51 CEST 2007


On Wed, Apr 04, 2007 at 12:38:13PM +0200, Anton Dollmaier wrote:

> My name is Anton Dollmaier, I heard about the Xen-Tools at the
> Chemnitzer Linux Tage 2007
> (http://chemnitzer.linux-tage.de/2007/info/). After some testing, I
> want to use the Xen-Tools in a "hosting"-environment.

  :)

  I guess that you mean xen-shell here, since that is the place
 where the reimage script lives which you mention later?

> To improve services, I wrote a Xen-Installer-perl-script, which lists
> a configurable list (names, mirrors, deb/rpm, informations) of
> distributions and lets the customer choose which one he wants to
> install on his domU.

  Looks good.

> To minimize the administration, the installer is located in /usr/bin,
> with only a small bash-skript in /home/$user/image.sh to enable the
> reimage-command in the xen-shell:

  Right.

> Unfortunately, the reimage-command has a problem: A User can control
> multiple xen-hosts, and also issue the reimage-command for a specific
> host, but how can the installer determine, which host to reimage?

  This information is passed through from xen-shell like so:

        system( "/usr/bin/xm-reimage $ACTIVE $USER" );

  The first argument is the instance to reimage, and the second is the
 username.

>   #
>   #  Run the reimage script.
>   #
>   /home/${user}/image.sh ${host}
>   (...)
> 
> the username is read out of $ENV{'USER'}.

  Looks good.

> After the latest aptitude upgrade, the changes were removed ... I
> don't know if this change is the best place, but I couldn't find
> another possibility (except passing via ENV, which also needs a
> modification in the code).

  Yeah that should be fine.  I'll commit a change to do this when
 I finish my holiday, tomorrow.

> I don't append the code from the xen-installer to this mail as it
> needs code cleanup, security-checks and some feature extensions (let
> the user choose of the available role-scripts, ask for confirmation,
> ...). If there's interest in the code / the script itself, I can later
> publish it to the xen-tools.

  Sure - It would be nice to see, but it isn't essential.  Several
 people have told me of their custom reimage scripts for different
 users, so I have the impression that people do want site-specific
 scripts and a global one might not be too useful.  I'll happily
 take one to add as an "example", but otherwise I'm content to go
 without.

> Best regards from Germany,

  Cheers from Devon/Scotland.

Steve
-- 





More information about the xen-tools-discuss mailing list