Skip to content

Playing with Linux-Vserver

by Julien on March 18th, 2007

I have set up my first vserver to play with. I am very impressed how easy the process is! The performance on my Dell Inspiron 1300 seems very good as well.

I have almost no experience with virtualization techniques, and was stuck to User-Mode Linux until today. According to the Wikipedia article, Linux-Vserver has many advantages compared to other tools due to the fact the virtual servers share the same system call interface and do not have any emulation overhead (I do obviously agree this can also be a drawback).

I haven’t yet had the chance to study the security part in depth, this will be my main task this week, I will then be able to make the choice between UML and Linux-Vserver – I’m not yet ready for Xen.

Using an up-to-date Etch system, here are the main steps to set up a simple vserver:

aptitude install linux-image-vserver-686

This will also install the verser utilities and the tools needed to set up and run vservers. Reboot on the newly installed kernel.

To create the vserver, simply run:

# vserver vps1 build \
    -n vps1 --hostname vps1 \
    --interface eth0:192.168.1.95/24 \
    -m debootstrap -- -d etch

You’ll obviously want to adapt the options to suit your needs.

Once the basic tools are installed on the guest, you can start the vserver:

# vserver vps1 start

and immediately use it:

# vserver vps1 enter

Note that as networking is not virtualized, this can pose a problem when default configurations specify to “Listen” on all interfaces. Each service should be configured to listen to the specified IP address, both on the host and on the guests, eg. for SSH, you’ll need to specify something like:

ListenAddress 192.168.1.95

in the configuration file.

This is one the biggest difficulty I had when setting up my first vserver, as I had to review all the services running on the host one by one, and this could be a tricky task when changing the IP address!

From → Uncategorized

2 Comments
  1. You could also try openvz. It is now included in etch and has several advantages over vserver and better performance over xen.

  2. Thanks, I only had heard about openvz, but haven’t yet had the chance to study it. I will go on with vserver for the moment and will try openvz later.

Comments are closed.