In Linux-VServer, the host and all guests use the same kernel. Depending on your needs, there are several ways to install this.
Debian SID is everything but unstable, despite the "unstable" in it's name. You just get new packages every day, but no one forces you to install them.
To install Linux-Vserver here you simply do:
apt-get install linux-image-vserver-686
Depending on your machine, you may want to install another vserver kernel. Debian provides quite a number of kernels for various scenarios, you can get a list of them with
apt-cache search linux-image | grep vserver
This chapter has been taken from [Step-by-Step Guide 2.6], but with simplifications and little adaptions.
You'll need the vanilla kernel sources (i.e. those from [kernel.org]) and (of course) a Linux-VServer patch for the kernel you intend to use. At the [main page], below the headline "Downloads" you'll find a table of supported kernel versions and patches.
In this document, I'll just use Linux 22.214.171.124 and Linux-VServer 2.0.1.
First, we'll create a directory for our sources, if you already got one, feel free to skip this step and/or adjust the paths to your needs.
# Create a directory for our sources mkdir ~/src # Switch to that directory cd ~/src
Now that we have a place to store our sources, we need to fetch them. We start with the vanilla sources.
# Get Linux 126.96.36.199 sources wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-188.8.131.52.tar.bz2 # Extract them tar xjf linux-184.108.40.206.tar.bz2
Now it's time to get the Linux-VServer patch and apply it to the sources.
# Get the Linux-VServer 2.01 patch wget http://www.13thfloor.at/vserver/d_rel26/v2.1.0/patch-220.127.116.11-vs2.1.0.diff.bz2 # Switch to the kernel directory cd linux-18.104.22.168 # Patch the sources bzcat ../patch-22.214.171.124-vs2.1.0.diff.bz | patch -p1
Now let's start configuring that copy, I'll only explain some of the Linux-VServer-specific kernel configuration options here (as of 2.0), the rest is up to you ;). You can choose whatever configuration method you like, for example:
# Configure the kernel using a ncurses based menu make menuconfig
Note: The kernel configuration allows you to select between different security implementations, one of them is the capability system. As you might know, Linux-VServer uses this system heavily, thus you just have to have this one enabled (it is possible to build it as a module, but for a Linux-VServer system, it's not worth the effort, as you need it anyway).
Now that we have configured the kernel the way we want it, it's time to build it.
# Build the kernel make
If you don't happen to have a really fast box, it is a good time to get a new cup of coffee now ;)
This is distribution specific, but quite often you just need to
# make modules_install # make install # shutdown -r now
and select the new VServer-Kernel in your bootloader. If this didn't work, you have to read the documentation for your Linux distribution, or you ask google for kernel compilation and installation.
This page is part of the VServerManual.