Linux-Vserver

- or how to run multiple distributions on one and the same machine

Author: Martin List-Petersen - martin at list-petersen dot dk
The newest version of this document can allways be found at http://www.marlow.dk/vserver
Version: 0.01
Created: January 28th, 2005
Last updated: January 28th, 2005

Disclaimer: This document is provided AS IS, of course. Feel free to use the info provided here, but don't blame me, if it doesn't work. Feedback however is allways appreciated. I can't be made responsible for data loss or other damages in any way. Be aware, that this document is based on Debian and and the packages provided have only been tested an a Debian host. They should run on most distributions however.

Introduction

I've been using Vserver since around mid 2002, initially for test purposes and for hosting since the end of 2002 and must say, that it is a very easy way to deploy virtual servers. Thanks to Jacques Gelinas, the initial creator, and Herbert Pötzl, who has been pushing the project since around autumn 2003, for providing this invaluable piece of software

The reason for this document are Guest Images. Guest images are minimal builds of the distributions, that are run inside a Vserver.

Guest Images have allways been a problem, because it takes time to prepare them, if it's a guest image, that is based on another distribution, than the one you are running on the host machine. During time i've build my own deploying system for guest images and in January 2005 (with the creation of this document) made them available to anybody, who wants a peek at them or build further on. They are provided here as a ressource to the Linux-Vserver Project.

What is Linux-Vserver ?

Linux-Vserver is the reinvention (not porting) of BSD jails to Linux, but it goes further beyond. Linux-Vserver will provide you with a filesystem-chroot and a security context that locks the vserver in it's own environment. There are 3 things that cannot be changed in a vserver (unless you have root access to the host, which the vserver is deployed on): the ip address, the hostname and the kernel. All vservers on one machine share matter of fact the same Linux kernel. That way the overhead is absolutely minimal.

Guest Images

All the images that I provide are build from publicly available downloads (FTP and ISO), so they can be freely distributed and modified. The images are very bare, usually just the absolute minimum to get up and running, and once deployed often only have syslogd and sshd running. All images are run on a Debian Host with kernel 2.4, i don't use 2.6 in production at this point of time. On top of that leaves to mention, that I don't care about unification of vservers, because i use vserver for hosting and harddisk space is inexpensive nowadays.

None of the images allow root to log in via ssh, a security measure, that should be the default on any system. There is a user "admin" in place, that can be used for the initial connect, instead.

For deploying the images, basically all you need is the deploy-vserver.sh script. This script is self explaining and only a few default values have to be changed by editing the script, once downloaded. The script is provided under the GPLv2 exclusively (and not any older or newer release of the GPL !!). If an image not is available locally, the script will try to download it and it's corresponding diff file automatically.

The guest images consist of a tar-ball with the image, a diff file (not all of them) with the changes to rc files etc. and modifications done to the vserver image on the fly during deployment, handled by the script. Feel free to modify the script and images as you see fit.

If you want to peek at the images and diffs yourself, check them out. They are at: http://debian.marlow.dk/vserver/guest/.

Debian Woody and Debian Sarge

Debian images are easy to generate. They basically work out of the box, by using the debootstrap tool.

Fedora Core 2, RedHat 9

These images include apt-get for rpm, so that it get's easy to install software.

Mandrake 9.2

I've had extreme problems getting Mandrake 10.x to run on my Debian hosts (still working on it), but for now this image should do.

SuSE 9.2

A few notes on SuSE:

Slackware 10

Slackware as a guest image requires util-vserver tools. Jack's vserver tools won't start the correct rc scripts, unless you patch them. There were patches around at some point (I provided a patched vserver-0.23 package for Debian, that could handle gentoo and slackware).

And last but not least:

Gentoo

No, you've seen right, I don't provide a guest image for that. I find using ressources for recompiling a server ridiculous. If you want a highly optimised Linux, build custom packages in a test environment on similar hardware and deploy them binary, where Debian is a lot more suiting than Gentoo is.
If you anyway want to run Gentoo in a vserver, a Stage 3 tarball usually should do the job. Also the older Vserver Wiki has a good howto on Gentoo as Guest.

How to build these guest images ?

Surely, I will get around to write this part of the document, but time is often sparse. I do however provide a list of packages for most of my guest images. It can be found at: http://debian.marlow.dk/vserver/guest/lists/.

Links


History

Website last modified: Jan 8th, 2007 - 1:39 PM  GMT.
(C)opyright 1997 - 2007  by Martin List-Petersen
IPv6 Ready Hosting by TuxBoxValid HTML 4.01!Valid CSS!