Diff for "VServer"


Differences between revisions 1 and 33 (spanning 32 versions)
Revision 1 as of 2005-11-23 19:15:01
Size: 840
Editor: lx1-ghoch
Comment: Vserver page started
Revision 33 as of 2006-12-15 22:17:49
Size: 7021
Editor: adsl-75-36-147-248
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[[TableOfContents]] ||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">'''Contents'''[[BR]][[TableOfContents]]||
Line 3: Line 3:
== What are Vservers == == What are VServers ==
Line 5: Line 5:
The [http://linux-vserver.org Linux VServer Project] provides Linux kernel-based
virtual servers running on a single piece of hardware
.
The [http://linux-vserver.org Linux VServer Project] provides multiple Linux environments running inside a single Linux kernel.
Line 8: Line 7:
Vservers are very useful for quickly setting up a
set of restricted services for testing or production use.
You can think of it as a bit like running a new system inside a ''chroot'', but with a different host name and IP address, a de-fanged `root` user, and configurable resource management. This is a similar feature to ''jails'' on FreeBSD and ''containers'' on Solaris 10+.
Line 11: Line 9:
Vservers are not as popular as the similar
[http://www.xen-source.com XEN] Hypervisor, but
help you a lot, if you have to administrate a large
number of servers and services.
VServers are a different approach to the popular
[http://www.xensource.com XEN] Hypervisor; with XEN you end up with a kernel for each virtual server; VServers do not. So, with VServer you have less (virtually no) overhead, on the other hand you also have fewer features - it is currently impossible to have a VServer with a different time set to the host system, for instance. However it ''is'' possible to run a different time zone, as that is a purely ''user-space'' feature. The design of UNIX in general mean that for the vast majority of applications, this virtualisation technique is perfectly adequate.
Line 16: Line 12:
While it will take some until XEN ist integrated into Ubuntu
Vserver are availabe now.
Note that Xen and VServer are ''orthogonal'' approaches - that is, it is perfectly possible and sometimes even sensible to run Xen virtual machines on a Linux system, then Linux VServers within those Xen machines.
Line 19: Line 14:
== Installation == == Installation (u32) ==

A Linux-VServer kernel has been built on Edgy. The first step in the install process, wget/apt-key, is optional. It just adds my public key to apt's keyring so it can verify the package signatures.

  $ sudo apt-get install
  $ wget -O - http://bronson.rinspin.com/u32-package-key.gpg | sudo apt-key add -
  $ echo "deb http://dpkg.u32.net/ubuntu edgy main" >> /etc/apt/sources.list
  $ sudo apt-get install linux-vserver-image-2.6.17-FLAVOR

And reboot into the new kernel. <i>FLAVOR</i> is vserver-i386, vserver-generic, vserver-server, etc. cat /proc/version to see what flavor kernel you're running now.

The 2.6.17 Edgy kernel runs on Dapper just fine (I'm running it on all my servers right now). Occasionally dpkg may die claiming "error in postinst." It's just a bad interaction between older and newer kernel tools and, other than preventing the install from completing, it's harmless. Just purge and reinstall and it should be fixed.

You may want to run run <tt>ln -sf /vservers /etc/vservers/.defaults/vdirbase</tt> to specify where your vservers should reside (this puts them in /vservers). By default they are stored in /var/lib/vservers.

==== Create a new guest ====

/etc/vservers/newvserver-vars (man newvserver(1) for options):
  DIST='dapper'
  MIRROR="http://us.archive.ubuntu.com/ubuntu"

This command create a new Ubuntu Dapper image. You can change "dapper" to "edgy" or whatever you want above. You can run virtually any Linux distribution as a guest (for instance, [http://www.gentoo.org/proj/en/vps/vserver-howto.xml gentoo]).

   newvserver -v --hostname NAME --domain EXAMPLE.COM --interface ETHX --ip IPADDRESS

See [http://wiki.u32.net/index.php?title=Linux-VServer this page] for some tweaks to make your dapper guest a little more vserver-friendly.

== Installation (Uniklu) ==
Line 23: Line 45:
 * Kernel with Vserver patch
 * util-verver
 * Kernel with VServer patch
 * util-vserver
Line 26: Line 48:

You can install these packages if you add the following lines to your sources.list:

## * breezy {{{
##deb http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/ breezy uniklu-vserver
###deb-src http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/ breezy uniklu-vserver
##}}}
 * dapper {{{
deb http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/ dapper uniklu-vserver
#deb-src http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/ dapper uniklu-vserver
}}}
 * edgy (not needed, already in universe)

The uniklu archives are signed - if you want get rid of apt-get warnings:
{{{$ wget http://ubuntu.uni-klu.ac.at/uniklu-debuild.pub
$ sudo apt-key add uniklu-debuild.pub }}}

To install the VServer Kernel and utils enter:
## * breezy {{{
### apt-get install linux-image-2.6.12-11-686
### apt-get install util-vserver vserver-debiantools}}}
 * dapper {{{
# apt-get install linux-image-2.6.15-(dapper_abi+1)-686
# apt-get install util-vserver vserver-debiantools}}}
 * edgy {{{
# apt-get install kernel-patch-vserver
# apt-get install util-vserver}}}


You should get the following revisions
## * breezy
## || kernel || -11-2.6.12-11.25vs (one api number higher than the standard kernel) ||
## || util-vserver || >= 0.30.208-4ubuntu1 ||
## || vserver-debiantools || >= 0.2.5 ||
 * dapper
 || kernel || -(dapper_abi+1)-2.6.15-(dapper_abi+1).(dapper_release)vs ||
 || util-vserver || >= 0.30.210-0uk ||
 || vserver-debiantools || >= 0.2.6 ||
 * edgy
 || kernel-patch-vserver || 2:2.0.1-4 ||
 || util-vserver || 0.30.210-10 ||
 || vserver-debiantools || 0.2.6 ||

## At the moment the kernel is one revision behind the offical Ubuntu Kernel - will be fixed soon !
## || breezy-security || -10-686-2.6.12-10.24 ||
## || uniklu-vserver || -11-686-2.6.12.11.24vs ||
## Make sure you install the kernel from the uniklu-vserver archive.
 
The vserver-debiantools do not work 100% but should help you
setting your first vserver quickly - see [http://support.uni-klu.ac.at/VServer Uniklu VServer Info]

The Kernel is the standard Ubuntu Kernel with the Vserver patch applied.
## * breezy: Vserver patch 2.0 for kernel-2.6.12
 * dapper: Vserver patch >= 2.0.2-rc13 for kernel-2.6.15
 * edgy: patch from universe should be up2date
The Kernel and binaries are available for {{{i386}}} and {{{amd64}}}

It is possible and supported to run 32bit i386 VServers on an amd64 VServer Kernel.

== Distributed Remote Block Device (DRBD) ==

[http://www.drbd.org DRBD] can be used with VServer to build simple, robust and cheap HA solutions with disaster failover capabilty to a remote location.

Simply put your VServers on a DRBD and let heartbeat in another building takeover the
DRBD and start your VServers.

DRBD utils and kernel modules for the VServer enabled kernels are available in the above
archive:
{{{
apt-get install drbd0.7-module-2.6.15-(dapper_abi+1)-arch drbd0.7-utils }}}

== Build Yourself ==

I've created a tgz of the diffs and build script i'm using for building the kernel debs.

{{{$ wget http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/vserver-image-build.tgz
$ tar -xzf vserver-image-build.tgz
$ cd linux-vserver-2.6.15
$ ./kbuild.sh }}}
Line 29: Line 130:
 * [http://ubuntu.uni-klu.ac.at/Vserver Uniklu Vserver Info]  * [http://support.uni-klu.ac.at/VServer Uniklu VServer info]
 * [http://www.howtoforge.com/linux_vserver_debian Linux VServer on Debian Sarge]
 * [http://www.drbd.org DRBD Homepage]
 * [http://linux-vserver.org/Vserver+DRBD VServer and DRBD info]

CategoryDocumentation CategoryCleanup

What are VServers

The [http://linux-vserver.org Linux VServer Project] provides multiple Linux environments running inside a single Linux kernel.

You can think of it as a bit like running a new system inside a chroot, but with a different host name and IP address, a de-fanged root user, and configurable resource management. This is a similar feature to jails on FreeBSD and containers on Solaris 10+.

VServers are a different approach to the popular [http://www.xensource.com XEN] Hypervisor; with XEN you end up with a kernel for each virtual server; VServers do not. So, with VServer you have less (virtually no) overhead, on the other hand you also have fewer features - it is currently impossible to have a VServer with a different time set to the host system, for instance. However it is possible to run a different time zone, as that is a purely user-space feature. The design of UNIX in general mean that for the vast majority of applications, this virtualisation technique is perfectly adequate.

Note that Xen and VServer are orthogonal approaches - that is, it is perfectly possible and sometimes even sensible to run Xen virtual machines on a Linux system, then Linux VServers within those Xen machines.

Installation (u32)

A Linux-VServer kernel has been built on Edgy. The first step in the install process, wget/apt-key, is optional. It just adds my public key to apt's keyring so it can verify the package signatures.

And reboot into the new kernel. <i>FLAVOR</i> is vserver-i386, vserver-generic, vserver-server, etc. cat /proc/version to see what flavor kernel you're running now.

The 2.6.17 Edgy kernel runs on Dapper just fine (I'm running it on all my servers right now). Occasionally dpkg may die claiming "error in postinst." It's just a bad interaction between older and newer kernel tools and, other than preventing the install from completing, it's harmless. Just purge and reinstall and it should be fixed.

You may want to run run <tt>ln -sf /vservers /etc/vservers/.defaults/vdirbase</tt> to specify where your vservers should reside (this puts them in /vservers). By default they are stored in /var/lib/vservers.

Create a new guest

/etc/vservers/newvserver-vars (man newvserver(1) for options):

This command create a new Ubuntu Dapper image. You can change "dapper" to "edgy" or whatever you want above. You can run virtually any Linux distribution as a guest (for instance, [http://www.gentoo.org/proj/en/vps/vserver-howto.xml gentoo]).

  • newvserver -v --hostname NAME --domain EXAMPLE.COM --interface ETHX --ip IPADDRESS

See [http://wiki.u32.net/index.php?title=Linux-VServer this page] for some tweaks to make your dapper guest a little more vserver-friendly.

Installation (Uniklu)

Installation is quite simple - you need:

  • Kernel with VServer patch
  • util-vserver
  • vserver-debiantools

You can install these packages if you add the following lines to your sources.list:

  • dapper

    deb      http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/  dapper uniklu-vserver
    #deb-src http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/  dapper uniklu-vserver
  • edgy (not needed, already in universe)

The uniklu archives are signed - if you want get rid of apt-get warnings: {{{$ wget http://ubuntu.uni-klu.ac.at/uniklu-debuild.pub $ sudo apt-key add uniklu-debuild.pub }}}

To install the VServer Kernel and utils enter:

  • dapper

    # apt-get install linux-image-2.6.15-(dapper_abi+1)-686
    # apt-get install util-vserver vserver-debiantools
  • edgy

    # apt-get install kernel-patch-vserver
    # apt-get install util-vserver

You should get the following revisions

  • dapper

    kernel

    -(dapper_abi+1)-2.6.15-(dapper_abi+1).(dapper_release)vs

    util-vserver

    >= 0.30.210-0uk

    vserver-debiantools

    >= 0.2.6

  • edgy

    kernel-patch-vserver

    2:2.0.1-4

    util-vserver

    0.30.210-10

    vserver-debiantools

    0.2.6

The vserver-debiantools do not work 100% but should help you setting your first vserver quickly - see [http://support.uni-klu.ac.at/VServer Uniklu VServer Info]

The Kernel is the standard Ubuntu Kernel with the Vserver patch applied.

  • dapper: Vserver patch >= 2.0.2-rc13 for kernel-2.6.15

  • edgy: patch from universe should be up2date

The Kernel and binaries are available for i386 and amd64

It is possible and supported to run 32bit i386 VServers on an amd64 VServer Kernel.

Distributed Remote Block Device (DRBD)

[http://www.drbd.org DRBD] can be used with VServer to build simple, robust and cheap HA solutions with disaster failover capabilty to a remote location.

Simply put your VServers on a DRBD and let heartbeat in another building takeover the DRBD and start your VServers.

DRBD utils and kernel modules for the VServer enabled kernels are available in the above archive:

apt-get install drbd0.7-module-2.6.15-(dapper_abi+1)-arch drbd0.7-utils 

Build Yourself

I've created a tgz of the diffs and build script i'm using for building the kernel debs.

{{{$ wget http://ubuntu.uni-klu.ac.at/ubuntu.uniklu/dists/dapper/uniklu-vserver/vserver-image-build.tgz $ tar -xzf vserver-image-build.tgz $ cd linux-vserver-2.6.15 $ ./kbuild.sh }}}

CategoryDocumentation CategoryCleanup

VServer (last edited 2009-10-23 09:41:47 by p5B17F5D1)