On Fri, Jun 23, 2006 at 08:53:15AM -0700, Roderick A. Anderson wrote:
> I'm trying to make copies of a Vserver guest.  These will all be on
> the same system.
> 
> So far I have:
> 
> Started with a FC5 Linux-Vserver install ( per
> http://linux-vserver.org/VServer+installation+Fedora+Core+5. )  The
> system was already running a stock FC5 install with some updates.
> 
> I followed that with:
> 
> [EMAIL PROTECTED] ~]# vserver $REF build -m yum \
> --context $LO \
> --hostname=$REF.$DOMAIN \
> --interface site0=eth0:192.168.112.$LO/25 \
> --initstyle sysv \
> -- -d fc5
> 
> Then a few packages to make the system usable plus a few to make it a
> onetime vyum run for individual packages.
> 
> [EMAIL PROTECTED] ~]# vyum $REF -- -y install \
> rootfiles passwd ntsysv system-config-date vixie-cron \
> crontabs vim-minimal openssh* which less \
> make gzip tar wget gpg unzip bzip2 \
> elinks perl-DBD-Pg
> 
> Since most of the guests will be running web sites/applications.
> 
> [EMAIL PROTECTED] ~]# vyum $REF -- -y groupinstall "Web Server"
> 
> And we're always having to add in packages ( mostly from CPAN ) that
> require a compile.
> 
> [EMAIL PROTECTED] ~]# vyum $REF -- -y groupinstall "Development Tools"
> 
> Now a little house keeping.
> 
> [EMAIL PROTECTED] ~]# echo -e \
> "nameserver 192.168.112.7\nnameserver 192.168.112.11\n" > \
> /vservers/$REF/etc/resolv.conf
> 
> vserver $REF start
> 
> vserver $REF exec pwconv
> vserver $REF exec pwck
> vserver $REF exec passwd root
> 
> ---===+++***+++===---
> 
> Now I'm ready to make several "clones" of this system that will then
> be "enhanced".
> 
> After much reading, searching, cursing, and drinking I'm still lost as
> to what is the best route to do this.  I think it is:
> 
> vserver $NEW build -m skelton \
>     --context $NEWLO \
>     --hostname=$NEW.$DOMAIN \
>     --interface site1=eth0:192.168.112.$NEWLO/25 \
> 
> Followed by some other stuff to wipe the /var/vservers/$NEW/* stuff and 
> copy the /var/vservers/$REF to /var/vservers/$NEW.

yep, that sounds good, the following things should
be considered though:

 - the 'copy' process must not change the uid/gids
   (i.e. --numeric for rsync, -a for cp, dump/restore)
 - if you use xid tagging, each guest should get its
   own tagging (which you have to apply after the copy)
 - when using unification, make sure that the flags
   and xid tags are correct

 - make sure that the 'template' is secure and does not
   bring e.g. insecure device nodes into the guest

> Since we're retro-fitting this "running/working/testing" system to be
> a Linux-Vserver I hesitate to try commands that might bring it to a
> screaming halt.
> 
> Is this a good route or are there other methods that will be 
> fast/safer/whatever?

I was hoping that util-vserver would provide that by
now, but as far as I know, it still doesn't ...

best,
Herbert

>    This is also the beginning of my quest to get the knowledge to build
> a more user-friendly front-end.
> 
> 
> TIA for any help or suggestions,
> Rod
> -- 
> 
> _______________________________________________
> Vserver mailing list
> Vserver@list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to