vserver is a kernel patch plus userland utils that lets you run multiple independent Linux servers inside a single physical server. To find out what vserver is about, see Jacques Gélinas' paper on vserver and then look at the new vserver project web site.
I've been using vserver since Jan 2002. In that time I've written a few Perl scripts to automate the generation of new virtual servers, but they haven't been fit for public release. Recently I discovered the Joy of Yum, and so I wrote a small shell script that uses yum to create a Fedora Core 1 vserver:
The script has everything hard-coded, but is so small that it's not hard to read and understand it all.
Two non-obvious things to note:
--- glibc.spec.orig 2003-11-12 09:17:31.000000000 +1030 +++ glibc.spec 2003-11-17 23:40:48.000000000 +1030 @@ -1,4 +1,4 @@ -%define glibcrelease 101.1 +%define glibcrelease 101.1nc1 %define auxarches i586 i686 athlon sparcv9 alphaev6 %define prelinkarches noarch %define nptlarches i686 athlon x86_64 ia64 s390 s390x sparcv9 ppc ppc64 @@ -265,9 +265,9 @@ gcc*\ 3.2.3*) case "`uname -r`" in *.ent*|*.EL*) %patch2 -p1 -%patch3 -p1 ;; esac ;; esac +%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1