Linux VServers require kernel support in the host system that can only be provided by a kernel patch. Unfortunately this does not appear to be included in any of the kernels available from mainstream distribution vendors. However, a pre-compiled kernel package for Fedora Core 5 is available, and can be installed by following the steps below :
Disable SELinux by editing
and changing the
line to :
Make sure all packages are up to date by running
To prevent the custom kernel we are going to install from being replaced, edit the file
and in the
section add the line
exclude=kernel kernel-smp yum
. The section should end up looking something like :
name=Fedora Core $releasever - $basearch - Released Updates
exclude=kernel kernel-smp yum
Create the file
name=Daniel Hokka Zakrisson's packages for Fedora $releasever - $basearch - vserver
Install the kernel with VServers support with the command
yum install kernel , or if you are using an SMP system
yum install kernel-smp . The reboot with the
To validate that the VServers kernel is now running, make sure the file
exists. It should contain something like
Install the VServers support programs with the command :
yum install util-vserver util-vserver-core util-vserver-lib util-vserver-sysv util-vserver-build
urpmi kernel-vserver-latest kernel-vserver-source-latest util-vserver util-vserver-build util-vserver-core util-vserver-sysv util-vserver-lib
For other distributions, you will almost certainly need to compile a patched kernel manually. The official VServers website at http://linux-vserver.org/Documentation has more details.
One limitation of VServers network is that a server listening on some port on all interfaces on the host will prevent that port from being used within VServer instances. For example, if Apache is using port 80 on all interfaces (as it does by default), then no systems running within VServers will be able to run Apache!
The suggested solution to this problem is to run only a minimal set of services on the host system, such as SSH and Webmin. All others like Apache, Sendmail, Postfix, BIND and ProFTPd should be shut down or un-installed.
To use Webmin to configure itself and SSH to listen only on the host system's primary interface, follow these steps :
Login to Webmin on the VServers host system.
Go to the Network Configuration module in the Networking category, click on Network Interfaces and note the IP address of the primary interface, typically
eth0. For the sake of these instructions, let's say it is 192.168.10.10.
Open the Webmin category and click on Webmin Configuration, then on the Ports and Addresses icon.
Under Bind to IP address select Only address.. from the menu, and enter the IP (192.168.10.10) into the text box next to it.
Click the Save button.
Open the Servers
category and click on SSH Server
, then on the Networking
In the Listen on addresses table select Entered below .., and in the Address field enter 192.168.10.10. Then click Save.
Back on the main page of the SSH
server module, click the Apply Changes
To use Webmin to shut down other services that may use ports needed by Virtualmin in VServers, do the following :
Login to Webmin, open the System category and click on Bootup and Shutdown Actions.
Check the boxes next to actions with names like
At the bottom of the page, click the Disable Now and On Boot button.