[Vserver] Cloning/Copying ... again!

From: Roderick A. Anderson <raanders_at_acm.org>
Date: Fri 23 Jun 2006 - 16:53:15 BST
Message-ID: <449C0E6B.3020806@acm.org>

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:

[root@johann ~]# 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.

[root@johann ~]# 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.

[root@johann ~]# vyum $REF -- -y groupinstall "Web Server"

And we're always having to add in packages ( mostly from CPAN ) that
require a compile.

[root@johann ~]# vyum $REF -- -y groupinstall "Development Tools"

Now a little house keeping.

[root@johann ~]# 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.

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?

    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
Received on Fri Jun 23 16:53:53 2006
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 23 Jun 2006 - 16:54:01 BST by hypermail 2.1.8