Main menu

Post navigation

Rolling a Linux-VServer Kernel

Linux-VServer is a virtualization platform that allows you to run VPSs without running complete OS environments. It can be argued that Linux-VServer is actually more of a container platform than virtualization, however, you can’t think of it like Docker or LXC containers. From a structural design, I would actually say that they are more similar to Solaris Zones, which are still technically containers, but the functionality is different.

The implementation of vserver VPSs saves massive overhead and allows for you to achieve the best performance possible from your system. Additionally, because the systems are paravirtualized, each system gives you the efficiency of talking directly to the kernel, but you avoid the insecurity of solutions like Docker containers. To be able to run a vserver system, you must use a custom kernel. This is not as difficult as you would expect.

DISCLAIMER: This is a simple walkthrough that does not take into consideration CPU, memory, or disk limitations. However, these are all possible through Linux-Vserver and I will be doing a separate article on implementing these limitations within VServer.

First, start out with a base Devuan/Debian system. If you do not have that, you can find specs for that here. Once you have that, you’ll need to install some prerequisite packages. Obviously, this will have to be done from a root shell or through the use of sudo.

Now, go to the directory where we want to store the source code and grab the kernel source. Obviously, you need to grab the source of the respective kernel you want to roll. Here, we’re rolling the 3.18 kernel with the 2.3.7.5 vserver patch. However, you can go to the project page and get whatever kernel/patch combination they have available. If you need more extensive help or custom kernels, you can alway try the linux-vserver IRC channel on OFTC: irc://irc.oftc.net/vserver. You will find a user named Bertl in the channel that does consulting and support. For the right price, he can provide whatever you may need, but we digress.