We currently migrate to MediaWiki from our old installation, but not all content has been migrated yet. Take a look at the Wiki Team page for instructions how to help or browse through our new wiki at wiki.linux-vserver.org to find the information already migrated.

running the root server with chbind'ed ip address

create following under /sbin/vinit (add the ip's you want)

exec /sbin/chbind --ip --bcast -- /sbin/init $@

chmod +x /sbin/vinit

and then add init=/sbin/vinit to the kernel boot options (append= with Lilo)

Note: now the loopback interface on is inaccessible from the root server. A workaround is to use the outside interfaces address in /etc/hosts instead so: localhost

instead localhost

You might alter the firewall rules to allow traffic which orginates locally too.

configuring a 32 bit guest under x86_64

echo linux_32bit > /etc/vservers/$NAME/personality

echo i686 > /etc/vservers/$NAME/uts/machine

Changing the mask of the network interface

I had a vserver running perfectly on one host and no access on the network on another.

bonbons on IRC proposed me to put the same mask on the interface in the vserver and the host.

To see your current mask from the host:

root@thehost:/etc/vservers# ip addr list
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:0e:0c:32:e8:92 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0c:f1:ad:0f:d8 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth1
    inet scope global eth1
    inet6 fe80::20c:f1ff:fead:fd8/64 scope link
       valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:0c:f1:ad:0f:d9 brd ff:ff:ff:ff:ff:ff
5: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit brd

So you can see the mask before changing on eth1: and

To change the mask I created the file: /etc/vservers/my-vserver/interfaces/0/prefix and put 24 in it.

Restart the vserver, enjoy...

configuring routing for a server with two network interfaces

If your physical server has two or more network interfaces you have to configure routing correctly, if you are running vservers in both networks.

Packets must leave on the same interface on which they are received.

The following configuration on Debian/Ubuntu /etc/network/interfaces sets up two additional routing tables and two rules to route packets from different subnets through the correct interfaces.

# The primary network interface
auto eth0
iface eth0 inet static
        up /bin/ip route add dev eth0 src table 64
        up /bin/ip route add default via table 64
        up /bin/ip rule add from table 64
        post-down /bin/ip rule delete from table 64

auto eth1
iface eth1 inet static
        up /bin/ip route add dev eth1 src table 68
        up /bin/ip route add default via table 68
        up /bin/ip rule add from table 68
        post-down /bin/ip rule delete from table 68