<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.linux-vserver.at/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.linux-vserver.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BenjaminGreen</id>
		<title>Linux-VServer - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.linux-vserver.at/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BenjaminGreen"/>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Special:Contributions/BenjaminGreen"/>
		<updated>2026-04-10T21:36:25Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2020-09-03T12:11:53Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 10.0 Buster&lt;br /&gt;
| 4.4 4.9&lt;br /&gt;
| 0.30.216-pre3131&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at [http://repo.psand.net/info/ repo.psand.net]. The patch set was put up for review in August 2016 by AlexanderS. Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net featuring the AlexanderS patch set.&lt;br /&gt;
&lt;br /&gt;
The packages have the same names as the traditional package but have -systemd appended to them thus:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
The mainline util-vserver packages are still available in Stretch too.&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2020-09-03T12:10:43Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 10.0 Buster&lt;br /&gt;
| 4.4 4.9&lt;br /&gt;
| 0.30.216-pre3131&lt;br /&gt;
| x&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at [http://repo.psand.net/info/ repo.psand.net]. The patch set was put up for review in August 2016 by AlexanderS. Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net featuring the AlexanderS patch set.&lt;br /&gt;
&lt;br /&gt;
The packages have the same names as the traditional package but have -systemd appended to them thus:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
The mainline util-vserver packages are still available in Stretch too.&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-09-05T12:49:27Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Stretch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at [http://repo.psand.net/info/ repo.psand.net]. The patch set was put up for review in August 2016 by AlexanderS. Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net featuring the AlexanderS patch set.&lt;br /&gt;
&lt;br /&gt;
The packages have the same names as the traditional package but have -systemd appended to them thus:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
The mainline util-vserver packages are still available in Stretch too.&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-09-05T12:49:04Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Stretch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at [http://repo.psand.net/info/ repo.psand.net]. The patch set was put up for review in August 2016. Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net featuring the AlexanderS patch set.&lt;br /&gt;
&lt;br /&gt;
The packages have the same names as the traditional package but have -systemd appended to them thus:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
The mainline util-vserver packages are still available in Stretch too.&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-09-05T12:42:52Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Stretch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at [http://repo.psand.net/info/ repo.psand.net] Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net, so now in addition to the usual packages:&lt;br /&gt;
&lt;br /&gt;
* util-vserver - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-core - core utilities of util-vserver&lt;br /&gt;
* util-vserver-legacy - legacy scripts for util-vserver&lt;br /&gt;
* util-vserver-python - python-bindings for util-vserver&lt;br /&gt;
* util-vserver-sysv - initscripts for util-vserver&lt;br /&gt;
&lt;br /&gt;
There are now packages with -systemd appended to them which contain the AS patched utilities:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-09-05T12:42:02Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Stretch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at [http://repo.psand.net/info/|repo.psand.net] Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net, so now in addition to the usual packages:&lt;br /&gt;
&lt;br /&gt;
* util-vserver - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-core - core utilities of util-vserver&lt;br /&gt;
* util-vserver-legacy - legacy scripts for util-vserver&lt;br /&gt;
* util-vserver-python - python-bindings for util-vserver&lt;br /&gt;
* util-vserver-sysv - initscripts for util-vserver&lt;br /&gt;
&lt;br /&gt;
There are now packages with -systemd appended to them which contain the AS patched utilities:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-09-05T12:41:45Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Stretch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at [ http://repo.psand.net/info/ | repo.psand.net ] Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net, so now in addition to the usual packages:&lt;br /&gt;
&lt;br /&gt;
* util-vserver - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-core - core utilities of util-vserver&lt;br /&gt;
* util-vserver-legacy - legacy scripts for util-vserver&lt;br /&gt;
* util-vserver-python - python-bindings for util-vserver&lt;br /&gt;
* util-vserver-sysv - initscripts for util-vserver&lt;br /&gt;
&lt;br /&gt;
There are now packages with -systemd appended to them which contain the AS patched utilities:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-09-05T12:41:29Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Stretch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at [[ http://repo.psand.net/info/ | repo.psand.net ]] Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net, so now in addition to the usual packages:&lt;br /&gt;
&lt;br /&gt;
* util-vserver - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-core - core utilities of util-vserver&lt;br /&gt;
* util-vserver-legacy - legacy scripts for util-vserver&lt;br /&gt;
* util-vserver-python - python-bindings for util-vserver&lt;br /&gt;
* util-vserver-sysv - initscripts for util-vserver&lt;br /&gt;
&lt;br /&gt;
There are now packages with -systemd appended to them which contain the AS patched utilities:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-09-05T12:38:34Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Stretch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at repo.psand.net Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net, so now in addition to the usual packages:&lt;br /&gt;
&lt;br /&gt;
* util-vserver - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-core - core utilities of util-vserver&lt;br /&gt;
* util-vserver-legacy - legacy scripts for util-vserver&lt;br /&gt;
* util-vserver-python - python-bindings for util-vserver&lt;br /&gt;
* util-vserver-sysv - initscripts for util-vserver&lt;br /&gt;
&lt;br /&gt;
There are now packages with -systemd appended to them which contain the AS patched utilities:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-09-05T12:36:36Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Stretch */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at http://repo.psand.net/util-vserver_AlexanderS/ . Please test this and send any results to the Linux-Vserver mailing list. A new version of util-vserver has been compiled for repo.psand.net, so now in addition to the usual packages:&lt;br /&gt;
&lt;br /&gt;
* util-vserver - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-core - core utilities of util-vserver&lt;br /&gt;
* util-vserver-legacy - legacy scripts for util-vserver&lt;br /&gt;
* util-vserver-python - python-bindings for util-vserver&lt;br /&gt;
* util-vserver-sysv - initscripts for util-vserver&lt;br /&gt;
&lt;br /&gt;
There are now packages with -systemd appended to them which contain the AS patched utilities:&lt;br /&gt;
&lt;br /&gt;
* util-vserver-systemd - utilities for managing Linux-VServer guests&lt;br /&gt;
* util-vserver-systemd-build - tools which can be used to build vservers&lt;br /&gt;
* util-vserver-systemd-core - core utilities of util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-legacy - legacy scripts for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-python - python-bindings for util-vserver-systemd&lt;br /&gt;
* util-vserver-systemd-sysv - initscripts for util-vserver-systemd&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-08-02T10:47:47Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Distro Specific Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Stretch ===&lt;br /&gt;
&lt;br /&gt;
The situation for guests and host is identical to that of Jessie.&lt;br /&gt;
&lt;br /&gt;
One enhancement is that a version of util-vserver featuring SystemD compatibility (solving the problem with Jessie listed below), is now available at http://repo.psand.net/util-vserver_AlexanderS/ . A quick install script might be as below. Please test this and send any results to the Linux-Vserver mailing list:&lt;br /&gt;
&lt;br /&gt;
 mkdir new_util-vserver&lt;br /&gt;
 cd new_util-vserver/&lt;br /&gt;
 wget -r --no-parent http://repo.psand.net/util-vserver_AlexanderS/&lt;br /&gt;
 cd repo.psand.net/&lt;br /&gt;
 cd util-vserver_AlexanderS/&lt;br /&gt;
 dpkg -i libvserver0_0.30.216-pre3126-1_amd64.deb&lt;br /&gt;
 dpkg -i util-vserver_0.30.216-pre3126-1_amd64.deb &lt;br /&gt;
 dpkg -i util-vserver-build_0.30.216-pre3126-1_amd64.deb &lt;br /&gt;
 dpkg -i util-vserver-core_0.30.216-pre3126-1_amd64.deb &lt;br /&gt;
 dpkg -i util-vserver-sysv_0.30.216-pre3126-1_amd64.deb &lt;br /&gt;
 echo libvserver0 hold | dpkg --set-selections&lt;br /&gt;
 echo util-vserver hold | dpkg --set-selections&lt;br /&gt;
 echo util-vserver-build hold | dpkg --set-selections&lt;br /&gt;
 echo util-vserver-core hold | dpkg --set-selections&lt;br /&gt;
 echo util-vserver-sysv hold | dpkg --set-selections&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-08-02T10:38:49Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 9.0 Stretch&lt;br /&gt;
| 3.18 4.1&lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3120-1.4&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3126&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2017-07-07T13:48:37Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Systemd on hosts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will lose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2016-03-14T11:33:16Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Distro Specific Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will loose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
==== Getting Jessie Guests to Shutdown Properly ====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2016-03-14T11:32:50Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Distro Specific Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on hosts ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will loose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
===== Getting Jessie Guests to Shutdown Properly =====&lt;br /&gt;
&lt;br /&gt;
Disable &amp;quot;/etc/init.d/sendsigs&amp;quot; completely, so it doesn't kill off any processes too early (vserver stop will do that anyway if it hits the timeout).&lt;br /&gt;
&lt;br /&gt;
  rm /etc/init.d/sendsigs&lt;br /&gt;
  update-rc.d sendsigs remove&lt;br /&gt;
&lt;br /&gt;
I also removed the &amp;quot;halt&amp;quot; and &amp;quot;reboot&amp;quot; scripts, though that's probably not necessary.&lt;br /&gt;
&lt;br /&gt;
Add kill script links in /etc/rc6.d  for &amp;quot;cron&amp;quot;, &amp;quot;dbus&amp;quot; and &amp;quot;ssh&amp;quot;. These don't exist because their init scripts have a blank &amp;quot;Default-Stop&amp;quot; header. The simplest way to remedy this is to add override headers in /etc/insserv/overrides and force insserv to rebuild the links; this is a bit convoluted but is better than modifying the init scripts in case an upgraded package has newer ones, which won't be installed if the originals have been modified.&lt;br /&gt;
&lt;br /&gt;
  for s in cron dbus ssh; do&lt;br /&gt;
    sed -rn -e 's/^(# Default-Stop:).*$/\1 0 1 6/' -e '/^### BEGIN INIT INFO/,/^### END INIT INFO/p' /etc/init.d/$s &amp;gt; /etc/insserv/overrides/$s&lt;br /&gt;
  done&lt;br /&gt;
  /sbin/insserv -v -d&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:49:42Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Systemd on guests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. With it present the host will loose it's /proc /sys and /dev on host starts or stops. See advice on how to remove it at [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:48:55Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Distro Specific Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
==== Systemd on guests ====&lt;br /&gt;
&lt;br /&gt;
Systemd must also be removed from hosts. See advice on how to do that on [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:22:48Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd ====&lt;br /&gt;
&lt;br /&gt;
There are no known problems with systemd on host systems, but for building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:22:36Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels  [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or use a pre-packaged kernel. Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd ====&lt;br /&gt;
&lt;br /&gt;
There are no known problems with systemd on host systems, but for building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:21:17Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Debian 6.0 'Squeeze' was the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 8.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd ====&lt;br /&gt;
&lt;br /&gt;
There are no known problems with systemd on host systems, but for building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:18:38Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Systemd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd ====&lt;br /&gt;
&lt;br /&gt;
There are no known problems with systemd on host systems, but for building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:17:49Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Systemd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd ====&lt;br /&gt;
&lt;br /&gt;
There are no known problems with systemd on host systems. For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present a working example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:17:16Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Distro Specific Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distro Specific Notes ==&lt;br /&gt;
&lt;br /&gt;
=== Jessie ===&lt;br /&gt;
&lt;br /&gt;
==== Systemd ====&lt;br /&gt;
&lt;br /&gt;
There are no known problems with systemd on host systems. For building new guests, or upgrading old ones, systemd needs to be prevented from installing.&lt;br /&gt;
&lt;br /&gt;
* To make sure systemd is not present after upgrade see [http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation]&lt;br /&gt;
* To install a guest without systemd present an example is:&lt;br /&gt;
&lt;br /&gt;
 vserver jessie64 build   -n jessie64 -m debootstrap --i-know-its-there \&lt;br /&gt;
 --context 44000 --hostname jessie64.whatever.com -- \&lt;br /&gt;
 -d jessie -- --arch=amd64 --include=sysvinit-core,sysvinit,sysvinit-utils \&lt;br /&gt;
 --exclude=systemd;&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:12:56Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:11:29Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Issues with Lenny's 2.6.26 Kernel and Util-vserver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Lenny ===&lt;br /&gt;
&lt;br /&gt;
There are many issues with Lenny's own 2.6.26 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:10:39Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Issues with Squeeze's 2.6.32 Kernel and Util-vserver */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Squeeze ===&lt;br /&gt;
&lt;br /&gt;
There is one small issues with Squeeze's own Util-vserver:&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:09:55Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]]. If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Wheezy ===&lt;br /&gt;
&lt;br /&gt;
There are some issues with Wheezy's 3.2.55 Kernel and Util-vserver.&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:09:08Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver in Debian's own repository and the actively maintained repo.psand.net repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:07:43Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| 3.14 3.18 &lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| 3.2 3.4 3.10 3.14 3.18&lt;br /&gt;
| 0.30.216-pre3120&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:05:02Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
|  &lt;br /&gt;
| 0.30.216-pre3120 (currenly maintained --[[User:BenjaminGreen|BenjaminGreen]] ([[User talk:BenjaminGreen|talk]]) 13:05, 28 July 2015 (CEST))&lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| &lt;br /&gt;
| 0.30.216-pre3120 (currenly maintained --[[User:BenjaminGreen|BenjaminGreen]] ([[User talk:BenjaminGreen|talk]]) 13:05, 28 July 2015 (CEST))&lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T11:02:54Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
|  &lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.36 2.6.38 3.0 3.2&lt;br /&gt;
| 0.30.216-pre3038&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:59:08Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
|  &lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre3054-1&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864-2&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:58:26Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!repo.psand.net Util-VServer Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Debian Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
|  &lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| 0.30.216-pre2864-2&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| x&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 0.30.216-pre2864-2&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| 2.6.36&lt;br /&gt;
| 0.30.216-pre2925&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:51:26Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| Not recommended&lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| Not recommended&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| &lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| &lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:50:44Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Jessie&lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Debian 7.0 Wheezy&lt;br /&gt;
| &lt;br /&gt;
| x&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| &lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| &lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:48:17Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net Kernel Version&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| &lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| &lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
In lenny the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:46:50Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!repo.psand.net&lt;br /&gt;
!Debian Kernel version&lt;br /&gt;
!Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| &lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| &lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| &lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. See the [http://linux-vserver.org/Welcome_to_Linux-VServer.org]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:44:23Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
Here is a list of kernels and util-vserver packages and their preferred sources/versions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!Source of Kernel Package&lt;br /&gt;
!Kernel version&lt;br /&gt;
!Util-VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| Debian repository&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Debian 5.0 Lenny &lt;br /&gt;
| Debian repository&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| Independant repository&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Debian 4.0 Etch&lt;br /&gt;
| Debian repository&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. [http://www.kwu.hu/vserver.txt Details at 2007/May/04]&lt;br /&gt;
&lt;br /&gt;
In lenny and etch the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:36:05Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. [http://www.kwu.hu/vserver.txt Details at 2007/May/04]&lt;br /&gt;
&lt;br /&gt;
In lenny and etch the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!Kernel version&lt;br /&gt;
!VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Lenny&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Etch&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:35:09Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. [http://www.kwu.hu/vserver.txt Details at 2007/May/04]&lt;br /&gt;
&lt;br /&gt;
In lenny and etch the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
&lt;br /&gt;
Debian already contains vservers kernels, so no manual patching and compiling is needed. &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!Kernel version&lt;br /&gt;
!VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Lenny&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Etch&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Vserver versions given above are not completely pure, they have additional patches to fix various issues.&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-----------&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:34:34Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. [http://www.kwu.hu/vserver.txt Details at 2007/May/04]&lt;br /&gt;
&lt;br /&gt;
In lenny and etch the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
&lt;br /&gt;
Debian already contains vservers kernels, so no manual patching and compiling is needed. &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!Kernel version&lt;br /&gt;
!VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Debian 6.0 Squeeze&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Lenny&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Etch&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Vserver versions given above are not completely pure, they have additional patches to fix various issues.&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
= Distro Specific Notes =&lt;br /&gt;
&lt;br /&gt;
=== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
=== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
=== Issues with Lenny's 2.6.26 Kernel and Util-vserver ===&lt;br /&gt;
&lt;br /&gt;
==== Hard CPU scheduling ====&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
==== Problems due to Xattrs ====&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
===== Chroot Security Problems =====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
===== Unification Problems =====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== /proc/mounts issue ====&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;Ghosts&amp;quot; guests ====&lt;br /&gt;
&lt;br /&gt;
===== Issue =====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
===== Fix =====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2015-07-28T10:28:50Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Install util-vserver by source */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
This guide is written against Debian Etch (4.0) and works on Lenny (5.0) as well. Both releases include kernel '''linux-image-vserver-686''', so no manual patching is needed. Hence, Installation on Debian Etch/Lenny is pretty easy and straightforward.&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. [http://www.kwu.hu/vserver.txt Details at 2007/May/04]&lt;br /&gt;
&lt;br /&gt;
In lenny and etch the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Packages installation ==&lt;br /&gt;
The packages required by Linux-VServer are:&lt;br /&gt;
* '''linux-image-vserver-686''' - This is the current kernel, use '''linux-image-vserver-amd64''' on 64-bit systems, you can still create 32-bit guests&lt;br /&gt;
* '''util-vserver''' - These are the utilities used to administer the guests&lt;br /&gt;
* '''ssh''' - This is probably already installed, but just in case it isn't&lt;br /&gt;
&lt;br /&gt;
All the packages you need can be obtained via&lt;br /&gt;
&amp;lt;pre&amp;gt;aptitude install linux-image-vserver-686 util-vserver ssh&amp;lt;/pre&amp;gt;&lt;br /&gt;
so run this as ''root'' and reboot.&lt;br /&gt;
To check out wherever everything went fine you may run&lt;br /&gt;
&amp;lt;pre&amp;gt;uname -r&amp;lt;/pre&amp;gt;&lt;br /&gt;
and check that kernel version contains '''vserver''', e.g. '''2.6.18-4-vserver-686'''. That's it.&lt;br /&gt;
&lt;br /&gt;
Now that the host system is ready, you can proceed with [[Building Guest Systems|building guests]].&lt;br /&gt;
&lt;br /&gt;
=== Building util-vserver Packages ===&lt;br /&gt;
&lt;br /&gt;
Download the source, unpack it, enter the directory you just unpacked and run:&lt;br /&gt;
&lt;br /&gt;
 dpkg-buildpackage -rfakeroot -us -uc&lt;br /&gt;
&lt;br /&gt;
You may need to satisfy some dependencies for this to work.&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
&lt;br /&gt;
Debian already contains vservers kernels, so no manual patching and compiling is needed. &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!Kernel version&lt;br /&gt;
!VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Squeeze&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Lenny&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Etch&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Vserver versions given above are not completely pure, they have additional patches to fix various issues.&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ==&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
== Issues with Lenny's 2.6.26 Kernel and Util-vserver ==&lt;br /&gt;
&lt;br /&gt;
=== Hard CPU scheduling ===&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
=== Problems due to Xattrs ===&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
==== Chroot Security Problems ====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
==== Unification Problems ====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== /proc/mounts issue ===&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Ghosts&amp;quot; guests ===&lt;br /&gt;
&lt;br /&gt;
==== Issue ====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
==== Fix ====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
== Issues with Wheezy's 3.2.55 Kernel and Util-vserver ==&lt;br /&gt;
&lt;br /&gt;
* Util-vserver 0.30.216-pre3060-1 from the APT repository (repo.psand.net) moves vshelper to a new location.  If you attempt to manage guests (restart, start, etc) without restarting the util-vserver service, vserver will display &amp;quot;vshelper functionality&amp;quot; errors.  The util-vserver service will notify the kernel of the new location when the service is restarted.  However, restarting util-vserver will also restart all of your guests.  You can immediately notify the kernel of the new vshelper location (without restarting util-vserver or your guests) by running the following command:&lt;br /&gt;
 echo /usr/lib/x86_64-linux-gnu/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Test_Scripts</id>
		<title>Test Scripts</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Test_Scripts"/>
				<updated>2014-09-09T15:22:06Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* testfs.sh script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== testme.sh script ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be sure that your setup works fine, we got a test script that checks some basic functionality. So download the [testme.sh] script and check if everything's fine.&lt;br /&gt;
&lt;br /&gt;
 # Get the script&lt;br /&gt;
 wget http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make it executable&lt;br /&gt;
 chmod +x testme.sh &lt;br /&gt;
 &lt;br /&gt;
 # Become root&lt;br /&gt;
 su&lt;br /&gt;
 &lt;br /&gt;
 # Run the test script&lt;br /&gt;
 ./testme.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== testfs.sh script ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be sure that your setup works fine, we got a test script that checks some filesystem functionality. So download the [testfs.sh] script and check if everything's fine.&lt;br /&gt;
&lt;br /&gt;
Be careful! It might easily reformat your hard disk :)&lt;br /&gt;
&lt;br /&gt;
 # Get the script&lt;br /&gt;
 wget http://vserver.13thfloor.at/Stuff/SCRIPT/testfs.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make it executable&lt;br /&gt;
 chmod +x testfs.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make a (sparse) loopback file&lt;br /&gt;
 fallocate -l 1G  1gb.testfile&lt;br /&gt;
 &lt;br /&gt;
 # Become root&lt;br /&gt;
 su&lt;br /&gt;
 &lt;br /&gt;
 # Setup the loopback&lt;br /&gt;
 losetup /dev/loop0 1gb.testfile&lt;br /&gt;
 &lt;br /&gt;
 # Run the test script for legacy mode&lt;br /&gt;
 ./testfs.sh -l -t -D /dev/loop0 -M /mnt&lt;br /&gt;
 &lt;br /&gt;
 # Run the test script for new-style config&lt;br /&gt;
 ./testfs.sh -t -D /dev/loop0 -M /mnt&lt;br /&gt;
&lt;br /&gt;
If the script shows any errors, feel free to join us on irc (#vserver @ OFTC) or ask on the [mailing list]. If you ask on the mailing list, don't forget to include your kernel version, the version of the Linux-VServer patch, the version of util-vserver and of course the output of the test script.&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Test_Scripts</id>
		<title>Test Scripts</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Test_Scripts"/>
				<updated>2014-09-09T15:12:39Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* testfs.sh script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== testme.sh script ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be sure that your setup works fine, we got a test script that checks some basic functionality. So download the [testme.sh] script and check if everything's fine.&lt;br /&gt;
&lt;br /&gt;
 # Get the script&lt;br /&gt;
 wget http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make it executable&lt;br /&gt;
 chmod +x testme.sh &lt;br /&gt;
 &lt;br /&gt;
 # Become root&lt;br /&gt;
 su&lt;br /&gt;
 &lt;br /&gt;
 # Run the test script&lt;br /&gt;
 ./testme.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== testfs.sh script ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be sure that your setup works fine, we got a test script that checks some filesystem functionality. So download the [testfs.sh] script and check if everything's fine.&lt;br /&gt;
&lt;br /&gt;
Be careful! It might easily reformat your hard disk :)&lt;br /&gt;
&lt;br /&gt;
 # Get the script&lt;br /&gt;
 wget http://vserver.13thfloor.at/Stuff/SCRIPT/testfs.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make it executable&lt;br /&gt;
 chmod +x testfs.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make a (sparse) loopback file&lt;br /&gt;
 fallocate -l 1G  1gb.testfile&lt;br /&gt;
 &lt;br /&gt;
 # Become root&lt;br /&gt;
 su&lt;br /&gt;
&lt;br /&gt;
 # Setup the loopback&lt;br /&gt;
 losetup /dev/loop0 1gb.testfile&lt;br /&gt;
&lt;br /&gt;
 # Run the test script for legacy mode&lt;br /&gt;
 ./testfs.sh -l -t -D /dev/loop0 -M /mnt&lt;br /&gt;
 &lt;br /&gt;
 # Run the test script for new-style config&lt;br /&gt;
 ./testfs.sh -t -D /dev/loop0 -M /mnt&lt;br /&gt;
&lt;br /&gt;
If the script shows any errors, feel free to join us on irc (#vserver @ OFTC) or ask on the [mailing list]. If you ask on the mailing list, don't forget to include your kernel version, the version of the Linux-VServer patch, the version of util-vserver and of course the output of the test script.&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Test_Scripts</id>
		<title>Test Scripts</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Test_Scripts"/>
				<updated>2014-09-09T15:09:56Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: Created page with &amp;quot; == testme.sh script ==   To be sure that your setup works fine, we got a test script that checks some basic functionality. So download the [testme.sh] script and check if eve...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== testme.sh script ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be sure that your setup works fine, we got a test script that checks some basic functionality. So download the [testme.sh] script and check if everything's fine.&lt;br /&gt;
&lt;br /&gt;
 # Get the script&lt;br /&gt;
 wget http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make it executable&lt;br /&gt;
 chmod +x testme.sh &lt;br /&gt;
 &lt;br /&gt;
 # Become root&lt;br /&gt;
 su&lt;br /&gt;
 &lt;br /&gt;
 # Run the test script&lt;br /&gt;
 ./testme.sh&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== testfs.sh script ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To be sure that your setup works fine, we got a test script that checks some filesystem functionality. So download the [testfs.sh] script and check if everything's fine.&lt;br /&gt;
&lt;br /&gt;
Be careful! It might easily reformat your hard disk :)&lt;br /&gt;
&lt;br /&gt;
 # Get the script&lt;br /&gt;
 wget http://vserver.13thfloor.at/Stuff/SCRIPT/testfs.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make it executable&lt;br /&gt;
 chmod +x testfs.sh&lt;br /&gt;
 &lt;br /&gt;
 # Make a loopback file&lt;br /&gt;
 dd bs=1024k count=1024 if=/dev/zero of=1gb.testfile&lt;br /&gt;
 &lt;br /&gt;
 # Become root&lt;br /&gt;
 su&lt;br /&gt;
&lt;br /&gt;
 # Setup the loopback&lt;br /&gt;
 losetup /dev/loop0 1gb.testfile&lt;br /&gt;
&lt;br /&gt;
 # Run the test script for legacy mode&lt;br /&gt;
 ./testfs.sh -l -t -D /dev/loop0 -M /mnt&lt;br /&gt;
 &lt;br /&gt;
 # Run the test script for new-style config&lt;br /&gt;
 ./testfs.sh -t -D /dev/loop0 -M /mnt&lt;br /&gt;
&lt;br /&gt;
If the script shows any errors, feel free to join us on irc (#vserver @ OFTC) or ask on the [mailing list]. If you ask on the mailing list, don't forget to include your kernel version, the version of the Linux-VServer patch, the version of util-vserver and of course the output of the test script.&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Frequently_Asked_Questions_scratch</id>
		<title>Frequently Asked Questions scratch</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Frequently_Asked_Questions_scratch"/>
				<updated>2014-09-09T15:08:37Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: Added links to Test Scripts page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== A. General ==&lt;br /&gt;
{{Question|Question=Credits||Details=&lt;br /&gt;
This FAQ includes information taken from the FAQs of Jacques GÃ©linas and Paul Sladen.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Are there other FAQs available?||Details=&lt;br /&gt;
Yes. There are other (mostly older) FAQ's available:&lt;br /&gt;
*[http://www.solucorp.qc.ca/howto.hc?projet=vserver Jacques GÃ©linas FAQ]&lt;br /&gt;
*[http://www.paul.sladen.org/vserver/faq/ Paul Sladen's vserver FAQ]&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Where can I find a overview of Linux-VServer?||Details=&lt;br /&gt;
*((short presentation))&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Linux-VServer Wikipedia Article]&lt;br /&gt;
*ProjectOverview (an introduction to the VServer Project, by ChuckD)&lt;br /&gt;
*[http://www.solucorp.qc.ca/miscprj/s_context.hc?prjstate=1&amp;amp;nodoc=0 Introduction by Jacques GÃ©linas]&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=How to verify that a setup is working properly?||Details=&lt;br /&gt;
*To verify that your setup works properly, there are some test scripts to check basic functionality.&lt;br /&gt;
 primarily [http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh testme.sh] and [http://vserver.13thfloor.at/Stuff/SCRIPT/testfs.sh testfs.sh] (see [[Test Scripts]] for more details)|Signature=Linux-Vserver FAQ}}&lt;br /&gt;
&lt;br /&gt;
== B. Requirements ==&lt;br /&gt;
{{Question|Question=What hardware is supported by linux-vserver?||Details=&lt;br /&gt;
The following platforms are supported in the stable versions of linux-vserver.&lt;br /&gt;
*alpha&lt;br /&gt;
*i386 and higher (and compatible)&lt;br /&gt;
*ia32 / ia64&lt;br /&gt;
*mips / mips64&lt;br /&gt;
*hppa / hppa64&lt;br /&gt;
*ppc / ppc64&lt;br /&gt;
*sparc / sparc64&lt;br /&gt;
*s390 / s390x&lt;br /&gt;
*x86_64 (AMD64)&lt;br /&gt;
*uml/xen&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Which kernel versions are supported?||Details=&lt;br /&gt;
 recent 2.4 and 2.6 kernels (stable), recent 2.6 kernels (development). &lt;br /&gt;
 Some ancient versions of Linux-VServer are backported to 2.2.x kernels. You can find more information [http://vserver.digitalangel.com.au/ here].&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Can I run Linux-vserver on my favorite distribution?||Details=&lt;br /&gt;
Linux-VServer was originally developed on Red Hat/Mandriva, but it is rather distribution independent. It runs fine with other distributions (Debian, SuSE). Some distributions run a patched kernel, which can make it a bit harder to build a new kernel with Linux-VServer support|Signature=Linux-Vserver FAQ}}&lt;br /&gt;
&lt;br /&gt;
== C. Versions ==&lt;br /&gt;
{{Question|Question=What's the latest version of Linux-VServer?||Details=&lt;br /&gt;
You can find the [http://www.13thfloor.at/vserver/s_release latest stable 2.4 release] or [http://www.13thfloor.at/vserver/s_rel26 latest stable 2.6 release] as well as the [http://www.13thfloor.at/vserver/d_rel26 latest development release] at [http://www.13thfloor.at/vserver/ http://www.13thfloor.at/vserver/]&lt;br /&gt;
Check out the ((Release FAQ)) for information on releases and version numbering&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Where can I find prereleases and release candidates?||Details=&lt;br /&gt;
Check the [http://vserver.13thfloor.at/Experimental experimental area] for new patches.|Signature=Linux-Vserver FAQ}}&lt;br /&gt;
&lt;br /&gt;
== D. Tools (util-vserver and vserver) ==&lt;br /&gt;
{{Question|Question=What do I need them for?||Details=&lt;br /&gt;
These are the userspace tools for Linux-VServer. You need them to use the functionality of Linux-VServer.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=What's the difference between vserver and util-vserver?||Details=&lt;br /&gt;
The vserver package are the 'legacy utilities', written by Jacques GÃ©linas. &lt;br /&gt;
The util-vserver package is a reimplementation of these tools in C by Enrico Scholz, which follows the kernel development more closely. &lt;br /&gt;
util-vserver tools are currently considered the mainstream tools (You can't use both packages on the same machine.)&lt;br /&gt;
Both packages have their own version numbering. Don't let the version numbering confuse you.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Which version of the tools packages do I need? Do I have to upgrade?||Details=&lt;br /&gt;
*:It can be useful to have a recent version of the tools package installed on your box. It's a good idea to upgrade your tools when you upgrade your kernel. In the next list you find the versions you need to have at least, but it's a good idea to use more recent versions.&lt;br /&gt;
*linux-vserver 1.00&lt;br /&gt;
**vserver 0.26&lt;br /&gt;
**util-vserver 0.24&lt;br /&gt;
*linux-vserver 1.20&lt;br /&gt;
**vserver 0.28&lt;br /&gt;
**util-vserver 0.25&lt;br /&gt;
*linux-vserver 2.00&lt;br /&gt;
**util-vserver 0.30 or 0.30.209|Signature=Linux-Vserver FAQ}}&lt;br /&gt;
&lt;br /&gt;
== E. Download ==&lt;br /&gt;
{{Question|Question=Where can I dowload the latest version of:||Details=&lt;br /&gt;
*[http://www.13thfloor.at/vserver/ The kernel patch]&lt;br /&gt;
*[http://dns.solucorp.qc.ca/miscprj/s_context.hc?prjstate=1&amp;amp;nodoc=1 vserver]&lt;br /&gt;
*[http://savannah.nongnu.org/files/?group=util-vserver util-vserver]&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Distribution specific packages||Details=&lt;br /&gt;
*Red Hat&lt;br /&gt;
**[http://dns.solucorp.qc.ca/miscprj/s_context.hc?prjstate=1&amp;amp;nodoc=1 vserver]&lt;br /&gt;
*Mandrake&lt;br /&gt;
**[http://www.13thfloor.at/vserver/s_release/v1.00/ vserver]&lt;br /&gt;
*Debian&lt;br /&gt;
**[http://packages.debian.org/cgi-bin/search_packages.pl?keywords=vserver&amp;amp;searchon=names&amp;amp;subword=1&amp;amp;version=all&amp;amp;release=all vserver] - All Linux-VServer-related Debian-packages (Probably slow, +100 results).&lt;br /&gt;
**[http://packages.debian.org/cgi-bin/search_packages.pl?keywords=linux-image-2.6-vserver&amp;amp;searchon=names&amp;amp;subword=1&amp;amp;version=all&amp;amp;release=all Official precompiled kernels] - These are the official Debian kernels compiled with Linux-VServer-support.&lt;br /&gt;
**[http://packages.debian.org/cgi-bin/search_packages.pl?keywords=vserver-debiantools&amp;amp;searchon=names&amp;amp;subword=1&amp;amp;version=all&amp;amp;release=all vserver-debiantools] - These scripts install Debian straight off the web from Debian.org's world-wide network of mirrors.&lt;br /&gt;
*Gentoo&lt;br /&gt;
**[http://dev.croup.de/proj/gentoo-vps/wiki/VserverHowto vserver]|Signature=Linux-Vserver FAQ}}&lt;br /&gt;
&lt;br /&gt;
== F. Network Usage? ==&lt;br /&gt;
{{Question|Question=Is IPv6 supported?||Details=&lt;br /&gt;
At this moment, only IPv4 (the current most frequently used standard) is supported.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Can I put my vservers in different networks?||Details=&lt;br /&gt;
Yes you can. You have to bind your vserver to a interface on the host machine, but you can choose the interface in the configuration file of your vserver (in /etc/vservers/SERVER.conf). Make sure your host server does have an interface in the network you need on your vserver.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Is it possible for a vserver to have a other default gateway than the host machine does use?||Details=&lt;br /&gt;
Yes. Use iproute2 to set the default gateway.&lt;br /&gt;
You can find more information on routing in linux-vserver in [http://archives.linux-vserver.org/200311/0470.html this posting] on the mailinglist.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Can I use more than one IP address in a vserver||Details=&lt;br /&gt;
Yes you can. Edit the configuration file of the vserver (/etc/vservers/SERVER.conf).&lt;br /&gt;
In case you want to use example IP addresses on one interface&lt;br /&gt;
IPROOT=&amp;quot;10.1.2.3 10.1.2.12&amp;quot;&lt;br /&gt;
IPROOTDEV=&amp;quot;eth0&amp;quot;&lt;br /&gt;
In case you want to use 2 or more interfaces&lt;br /&gt;
IPROOT=&amp;quot;eth0:10.1.2.3 eth1:10.1.2.12&amp;quot;&lt;br /&gt;
IPROOTDEV=&amp;quot;&amp;quot;&lt;br /&gt;
In case you want to use IP-number in different subnets&lt;br /&gt;
IPROOT=&amp;quot;eth0:10.1.2.3/255.255.255.0 eth0:10.1.3.12/255.255.0.0&amp;quot;&lt;br /&gt;
IPROOTDEV=&amp;quot;&amp;quot;&lt;br /&gt;
If you are using vserver 2.0+ you have to create subdirectories in /etc/vserver/&amp;lt;vserver-name&amp;gt;/interfaces/ &lt;br /&gt;
for each IP you want to use, i.e.&lt;br /&gt;
/etc/vserver/&amp;lt;vserver-name&amp;gt;/interfaces/0&lt;br /&gt;
/etc/vserver/&amp;lt;vserver-name&amp;gt;/interfaces/1&lt;br /&gt;
These subdirectories have to contain files with the options you want to set. See the [[VServerConfiguration]] or [http://www.nongnu.org/util-vserver/doc/conf/configuration.html Flower page] for more info&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Is it possible to use the real device (eth0, eth1) instead of the device alias created by vserver?||Details=&lt;br /&gt;
Yes. Set up the IP aliases yourself on the host server&lt;br /&gt;
*Set IPROOT= to those IPs&lt;br /&gt;
*Unset IPROOTDEV so the vserver script won't try to setup the IP aliases.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Can I modify the behavior of my vservers?||Details=&lt;br /&gt;
There are a number of capabilities and flags that you can modify listed [http://linux-vserver.org/Caps+and+Flags here] (and [http://savannah.nongnu.org/cgi-bin/viewcvs/util-vserver/util-vserver/lib/cflags-v13.c?rev=HEAD here (cflags-v13.c)]).&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Were can I find more information on networking in Linux-VServer?||Details=&lt;br /&gt;
You can find more information on the internals of networking in Linux-VServer [http://vserver.13thfloor.at/Stuff/VServer-IP-Setup-0.1.txt here].|Signature=Linux-Vserver FAQ}}&lt;br /&gt;
&lt;br /&gt;
== G. Software compatibility ==&lt;br /&gt;
{{Question|Question=Bind does not work in a vserver||Details=&lt;br /&gt;
* capset failed&lt;br /&gt;
* The bind package expect to have the capability CAP_SYS_RESOURCE. &lt;br /&gt;
 It expects this because it was compiled this way on Linux and to increase its ulimit. &lt;br /&gt;
* By default, a vserver does not have this capability for a good reason, you may have a    look at 'man capabilities' to see how much control that capability allows. &lt;br /&gt;
* A vserver starts with some ulimit values and can only reduce them, not enlarge them.&lt;br /&gt;
* If you know what you are doing, you can give the capability to the vserver running bind.&lt;br /&gt;
* A securer solution is to compile bind without that requirement by specifying './configure --disable-linux-caps' &lt;br /&gt;
 It looks like you only can run bind as root once you compile bind with this option, but this should be fine inside a vserver.&lt;br /&gt;
* bind does not respond to queries&lt;br /&gt;
* Bind seems to have problems with a query socket check. Bind believes the query is comming on a non-query socket, and doesn't answer the request.&lt;br /&gt;
* putting &amp;quot;query-source address YOUR_VSERVER_IP;&amp;quot; in your named.conf solves this problem.&lt;br /&gt;
&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Is DHCP possible in a vserver?||Details=&lt;br /&gt;
It's possible to run a DHCP server inside a vserver, but it required a CAP_NET_RAW capability. &lt;br /&gt;
The solution for 2.6 kernel with new-style config is to add CAP_NET_RAW entry in the /etc/vserver/&amp;lt;vserver-name&amp;gt;/bcapabilities file, and it might be unnecessary to add 255.255.255.255 into bcast file, please read [[VServerConfiguration]] or [http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page] for more details. If you are still use the legacy config, please read the answer below.&lt;br /&gt;
It's possible to run a DHCP server inside a vserver, but there is a catch. The set_ipv4root assigns one IP and one broadcast address to a vserver. UDP service listening to 0.0.0.0 (bind any) in a vserver are indeed listening to the vserver IP and vserver broadcast. &lt;br /&gt;
This is all they will get. This is fine for most services. &lt;br /&gt;
Unfortunately, dhcpd is receiving special broadcasts. Its clients are unaware of their IP number, so they are using special broadcast 255.255.255.255 address. &lt;br /&gt;
A vserver generally runs with the broadcast address of the network device (the one used to setup the IP alias). This network device has a broadcast address which is never 255.255.255.255. Those special broadcast are not sent to the vserver. The solution is to set the IPROOTBCAST entry in the vserver configuration file like this  IPROOTBCAST=255.255.255.255&lt;br /&gt;
Restart your vserver and dhcpd will work. There is a catch (at least with 2.4.18ctx-9). If you are using other services in the save vserver, also relying on broadcast for proper operation (samba for one), they won't operate properly. &lt;br /&gt;
One solution would be to enhance the semantics a little: A vserver would listen for its IP address, its broadcast address and also for 255.255.255.255. &lt;br /&gt;
The dhcpd case is probably very specific though. &lt;br /&gt;
&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=NFS-server||Details=&lt;br /&gt;
It's not posible to run a NFS-kernel server inside a vserver, to work securely this would need a lot of work. &lt;br /&gt;
You can try to run the NFS userspace server, the traditional Linux user space NFS server and UNFS3 are both reported to work.&lt;br /&gt;
take a look at ((NFS and portmap)) if you have problems with your portmap&lt;br /&gt;
&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Run Level Based Distributions as Ververs (Red Hat and such ....)||Details=&lt;br /&gt;
 If you see errors after the command vserver &amp;lt;name&amp;gt; stop like these:&lt;br /&gt;
&lt;br /&gt;
 Syncing hardware clock to system time hwclock is unable to get I/O port access:  the iopl(3) call failed FAILED]&lt;br /&gt;
 Turning off swap:  Not superuser.    [FAILED]&lt;br /&gt;
 Turning off quotas:  quotaoff: Can't stat() mounted device /dev/hdv1: No such file or directory&lt;br /&gt;
 Unmounting file systems:  umount2: No such file or directory umount: /vservers: not found&lt;br /&gt;
&lt;br /&gt;
 Then look for S* links in /etc/rc6.d/ and remove the one responsible for the errors. In RH9 it is called S01reboot&lt;br /&gt;
 A 'normal' server does some stuff on shutdown, like saving the time to the hwclock, or storing random pool data and finally invokes the reboot. Some of those actions are just not allowed in a vserver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Vservers and X Windows||Details=&lt;br /&gt;
 Please see the ((Vservers and X)) page for information about this.&lt;br /&gt;
&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=sshd with X11-Forwarding in a vserver||Details=&lt;br /&gt;
 add ```'X11UseLocalhost no'``` to your sshd_config&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=See also: [ProblematicPrograms]||Details=&lt;br /&gt;
== H. Help ==&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Where can I find more information on the Linux-VServer project?||Details=&lt;br /&gt;
First have a look at the ((documentation)) section of the website. In case you can't find the answer here, have a look at the mailinglist archives. If this doesn't help jou, there is still a mailinglist and a IRC channel were you can ask for help.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Does the Linux-VServer project have a mailing list?||Details=&lt;br /&gt;
Yes. You can subscribe [http://list.linux-vserver.org/mailman/listinfo/vserver here]. Archives are located [http://list.linux-vserver.org/archive/vserver/ here].&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Is there a IRC channel ||Details=&lt;br /&gt;
Yes, join #vserver on irc.oftc.net.|Signature=Linux-Vserver FAQ}}&lt;br /&gt;
&lt;br /&gt;
== I. Issues ==&lt;br /&gt;
{{Question|Question=When starting or entering a vserver I get &amp;quot;''Error: /proc must be mounted''&amp;quot;. 'vserver-stat' and 'vps' are failing with &amp;quot;''open(&amp;quot;/proc/uptime&amp;quot;): No such file or directory''&amp;quot;.  Sometimes, other files in /proc are mentioned. What can I do?||Details=&lt;br /&gt;
Make sure that in devel and experimental the required proc entries are visible inside a vserver. With alpha utilities, execute the ||Details=vprocunhide||Details= script. See ((Proc-Security)) also.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Inside a vserver I can still use mknod to create devices, even without CAP_MKNOD capability. What's wrong? (this probably applies to all other capabilities but that was not tested)||Details=&lt;br /&gt;
This is probably a problem in your kernel configuration. If you include &amp;quot;Enable different security models&amp;quot; (CONFIG_SECURITY), then make sure to also include &amp;quot;Default Linux Capabilities&amp;quot; (CONFIG_SECURITY_CAPABILITIES) or compile it as a module. In this latter case you must insert the 'capability' module into the kernel. This is for example true for current (2.6.8.1) debian kernel configurations.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=After stopping/restarting a vserver my network is gone! What the hell?||Details=&lt;br /&gt;
 See above.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Only root can access any files in the vserver||Details=&lt;br /&gt;
 Check the permissions of the vserver's / directory. The 2.4 branch's chroot-escape blocker (chmod 0000 and chattr +t) is meant to be applied to the directory containing the vservers (for example /vservers) not the vservers' root directories themselves. If you revoked all permissions for a vserver's root directory, re-grant them with &amp;quot;chmod 0755 /path/to/vserver-root&amp;quot;.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=&amp;quot;daemon() failed: Success&amp;quot; - What? Succesfully failing?||Details=&lt;br /&gt;
 Not really vserver related but here's the answer: Somebody replaced your /dev/null with a regular file, create a real /dev/null and it will start working again. We got no idea why the error message happens to be so funny(?).&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=When I start a vserver, &amp;quot;FATAL: kernel too old&amp;quot; message appears and vserver can't be started||Details=&lt;br /&gt;
Edit your /etc/vservers/&amp;lt;vsname&amp;gt;/uts/release and define a value greater than kernel version&lt;br /&gt;
example, if you have a kernel &amp;quot;2.6.11&amp;quot;, set &amp;quot;2005&amp;quot; for example  :-)&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=I switched from old to new configuration and now all my ip addresses are gone!||Details=&lt;br /&gt;
They are not, ifconfig just doesn't show them. The new tools use 'iproute' instead of 'ifconfig' which allows you to use multiple interface addresses with the same label. In such cases, ifconfig shows only the first address for each label, which probably isn't available in the vserver. Unless you specify a name for an ip address, it will be given the interface name as label, eg. eth0, and ifconfig breaks. You can assign names to your interface addresses in the vserver configuration, see [[VServerConfiguration]] or [http://www.nongnu.org/util-vserver/doc/conf/configuration.html The Great Flower Page] for details.&lt;br /&gt;
Earlier, we said that the interface addresses were &amp;quot;nameless&amp;quot;, this was wrong. As said above, the addresses in question actually all have the same name/label. Knowing this we could actually virtualize the ioctl interface which ifconfig uses in a meaningful way, making ifconfig show the vserver's ip addresses as expected, even when it shares its label with other ip addresses (of course only if there aren't multiple ip addresses in the same vserver that share the same label, but that's an ifconfig limitation, not a vserver bug). The [http://www.13thfloor.at/~doener/vserver/patches/diff-2.6.16.5-vs2.0.2-rc16-devinet_ioctl.diff patch] should apply to most Linux-VServer versions for kernel 2.6 and will probably be included in future versions.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=When I enter/ssh into a vserver I can see all of the interfaces and interface aliases with ifconfig.||Details=&lt;br /&gt;
I experienced this after upgrading from a 2.4 to 2.6 kernel with vs-2.0 patch using legacy-method .conf files.  Upgrading from legacy-method to the new one (see [http://linux-vserver.org/Legacy-To-Newstyle-Config Converting From Legacy to New]) caused the problem to go away.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=I keep my vserver roots on their own devices.  I can unmount them but the device (like drbd or lvm) remains in use until all of my vservers are killed off (&amp;quot;Someone has opened the device for RW access&amp;quot;).||Details=&lt;br /&gt;
 When you mount something it is recorded in the current namespace.  When you start a vserver it makes copy of the namespace.  You can then unmount in the original  namespace without any problems, however the device is still in use.  This is because the device is still mounted in the new namespace.  You can do something like this: &amp;quot;vnamespace -e runningVserver umount /mnt/point&amp;quot;. After this you should be able to remove the device (drbdadm secondary /dev/drbd0 or whatever).&lt;br /&gt;
More information:&lt;br /&gt;
*[http://linux-vserver.org/Namespaces About Namespaces]&lt;br /&gt;
*[http://linux-vserver.org/advanced+DRBD+mount+issues DRBD Mount Issues]&lt;br /&gt;
*[http://list.linux-vserver.org/archive/vserver/msg11444.html This thread], which deals with the same issue.&lt;br /&gt;
*[http://list.linux-vserver.org/archive/vserver/msg10415.html This thread], terse but helpful.&lt;br /&gt;
*[http://www.gossamer-threads.com/lists/drbd/users/9282?page=last And this], a thread of related stuff.&lt;br /&gt;
WARNING: if you use the kernel cleanup feature then make sure you know what you are doing.  I didn't, it was ugly.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=When I stop a vserver its network alias does not go away, I am getting 'RTNETLINK answers: Cannot assign requested address||Details='&lt;br /&gt;
Try running 'ip addr' and see if the interface names are being truncated (note: I came across a thread that seems to suggest that this might happen even if the interface name is not being truncated?).  The function that kills the interface specifies its name, if it is truncated then 'ip' will not be able to find the interface.&lt;br /&gt;
Another cause might be that the IP was added (or already present at startup) with a different netmask, and therfore can not be removed properly&lt;br /&gt;
My solution to this is very, very gross.  Open up your vserver.functions file and find the disableInterfaces function.  If you change&lt;br /&gt;
IP_ADDR)            $_IP addr  del &amp;quot;$@&amp;quot;;;&lt;br /&gt;
to&lt;br /&gt;
IP_ADDR)            $(echo $_IP addr  del &amp;quot;$@&amp;quot;|sed 's/broadcast + label [^[:space:]]\+//');;&lt;br /&gt;
then ip will try to delete the interface by its IP alone.&lt;br /&gt;
Anyone with a better solution is strongly encouraged to modify this entry.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}{{Question|Question=Why does the vserver run on a BSD fs (ufs) ?!||Details=&lt;br /&gt;
* I see something like: /dev/hdv1 / ufs defaults 0 0&lt;br /&gt;
The ufs part is correct and it is so to trick the quota tools to not try to lowlevel access the fs. The entry is FAKE anyway, ufs just solved this quota userland issue nicely (more or less).&lt;br /&gt;
* For details see: [http://list.linux-vserver.org/archive/vserver/msg09133.html] and [http://archives.linux-vserver.org/200401/0232.html]&lt;br /&gt;
* When I issue a ping it returns:&lt;br /&gt;
 [root@VServerGuest /]# ping 123.123.123.123&lt;br /&gt;
 connect: Invalid argument&lt;br /&gt;
* When I issue a DNS lookup it returns:&lt;br /&gt;
 [root@VServerGuest /]# host www.yahoo.ca&lt;br /&gt;
 socket.c: internal_send: 222.222.222.222#53: Invalid argument&lt;br /&gt;
 ;; connection timed out; no servers could be reached&lt;br /&gt;
* When I try to run vyum it returns:&lt;br /&gt;
 [root@VServerGuest /]# vyum VServerGuest -- check-update&lt;br /&gt;
 Cannot find a valid baseurl for repo: core&lt;br /&gt;
 Error: Cannot find a valid baseurl for repo: core&lt;br /&gt;
 Make sure that you have either a Public IP setup on the VServer Guest, or that you have a proper SNAT/DNAT rules setup on your VServer Host. After that, restart the vserver guest with the verbose option to see what your ipv4root is set to:&lt;br /&gt;
 [root@VServerGuest  /]# vserver -v VServerGuest start&lt;br /&gt;
 ipv4root is now 127.0.0.10 111.111.111.111&lt;br /&gt;
 New security context is 49156&lt;br /&gt;
 You must make sure the order of the interfaces are correct. The very first Interface (decided upon by alphabetical order of the interface directory name) for the VServer is the default IP used for all network connections. This must be either a public IP or an IP that has been D/SNAT'd.&lt;br /&gt;
|Signature=Linux-Vserver FAQ}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== G. Problematic Programs ==&lt;br /&gt;
Some programs do things that might work on a normal host but not inside a V-Server. This is often not a fault of V-Server itself, the programs are doing automagic things which fail and no proper error handling is done. Also sometimes the actions need special rights which are not permitted by default in V-Servers. Allowing CAPs is often not necessary since those special CAPs are only required once (e.g. when the program initializes the directories/settings/whatever).&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=OpenGroupware Apache Module&lt;br /&gt;
||Details=If your V-Server doesn't have access to localhost, then the connection to the !OpenGroupware server will fail with a &amp;quot;Internal Server Error&amp;quot;.&lt;br /&gt;
The apache module for !OpenGroupware called mod_ngobjweb uses a hardcoded &amp;quot;127.0.0.1&amp;quot; IP address in the source (handler.c line 339), this line you need to change to the IP address that should be used (the IP of the V-Server that runs the OpenGroupware server)|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Hylafax (with CAPI)|Details=&lt;br /&gt;
:If you want to run hylafax in a V-Server, you will get a CAP and device problem which can be easily solved. First you need your capi20 devices in your V-Server, which can't be created by ./MAKEDEV (requires special CAPs) so copy the devices into the V-Server, like this (command run on the host):&lt;br /&gt;
:cp -aR /dev/capi* /vservers/your_vserver/dev&lt;br /&gt;
:Now hylafax can access your CAPI ISDN card but will exit after a few seconds, the problem is it tries to create a /dev/null nod in the hylafax chroot. This fails because of missing  CAPs, so lets help hylafax again with copying the nod into the hylafax chroot in the V-Server. Like this (command run on the host):&lt;br /&gt;
:cp -aR /dev/null /vservers/your_vserver/var/spool/hylafax/dev&lt;br /&gt;
:Allright, now hylafax should have CAPI access and run properly.|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Links inside screen inside a V-Server|Details=&lt;br /&gt;
:Don't know why, but links crashes systematically being inside a screen session inside a V-Server started outside a V-Server. (please elaborate!)|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=screen inside a VServer|Details=&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[root@ge root]# vserver zoe enter&lt;br /&gt;
&lt;br /&gt;
zoe:/# screen&lt;br /&gt;
Cannot open your terminal '/dev/pts/5' - please check.&lt;br /&gt;
&lt;br /&gt;
zoe:/# strace screen &lt;br /&gt;
...&lt;br /&gt;
stat64(&amp;quot;/dev/pts/5&amp;quot;, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 5), ...}) = 0&lt;br /&gt;
open(&amp;quot;/dev/pts/5&amp;quot;, O_RDWR|O_NONBLOCK)   = -1 EACCES (Permission denied)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:is neither a bug nor an issue with screen, it just shows that a vserver context is not allowed to mess with host terminals. either use ssh/telnet to reach the 'guest' or start the screen session before you do the 'enter' (i.e. on the host)|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=!OpenLDAP Startup|Details=&lt;br /&gt;
:slapd needs name resolution available in order to start up, otherwise it appears to hang. Make sure you have working DNS (or whatever) available to your vserver before starting one with slapd. This behavior is confirmed in my setup, no confirmation from others yet. My Setup: vservers all bind to an interface on a DMZ-like network segment, BIND runs on a vserver. slapd would hang at startup if the BIND vserver had not been started first.|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=rndc|Details=&lt;br /&gt;
:Bind's rndc has a hardcoded 127.0.0.1 somewhere so any command to rndc will fail with connection refused.&lt;br /&gt;
:You should have a reachable localhost address defined in /etc/hosts and then you can use rndc -s localhost command&lt;br /&gt;
:You can make a rndc.conf and set the default-server option, like that the '-s localhost' isn't necessary.|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Asterisk|Details=&lt;br /&gt;
:Since some version of Asterisk (at least since 1.0.2), it will not run anymore. On start it fails with: &amp;quot;Unable to set high priority&amp;quot;&lt;br /&gt;
:This can be solved by allowing CAP_SYS_NICE for that VServer.&lt;br /&gt;
:You can also not run Asterisk with the realtime priority :&lt;br /&gt;
:Just pass the '-p' command ligne argument to disable the read-time priority.&lt;br /&gt;
:.&lt;br /&gt;
:Good doc on setting up Asterisk devices in the vserver:&lt;br /&gt;
:http://www.telephreak.org/papers/vpa/|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Open/!FreeSwan|Details=&lt;br /&gt;
:Fails because of writing to /proc (requires patch)&lt;br /&gt;
:TODO: write me|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Samba|Details=&lt;br /&gt;
:Oplocks don't work as smbd insists on receiving break requests from 127.0.0.1 \\&lt;br /&gt;
Just patch source/smbd/oplock.c (commenting paranoid code)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
+++ oplock.c.orig       2005-02-14 14:27:51.000000000 +0200&lt;br /&gt;
--- oplock.c    2005-02-02 12:27:50.000000000 +0200&lt;br /&gt;
@@ -181,14 +181,12 @@&lt;br /&gt;
                return False;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
+#if 0&lt;br /&gt;
     /* Validate message from address (must be localhost). */&lt;br /&gt;
        if(from.sin_addr.s_addr != htonl(INADDR_LOOPBACK)) {&lt;br /&gt;
                DEBUG(0,(&amp;quot;receive_local_message: invalid 'from' address \&lt;br /&gt;
 (was %lx should be 127.0.0.1)\n&amp;quot;, (long)from.sin_addr.s_addr));&lt;br /&gt;
                return False;&lt;br /&gt;
        }&lt;br /&gt;
+#endif&lt;br /&gt;
&lt;br /&gt;
        /* Setup the message header */&lt;br /&gt;
        SIVAL(buffer,OPBRK_CMD_LEN_OFFSET,msg_len);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or if you don't want to patch the samba source code you can disable oplock in Samba and it will work too!&lt;br /&gt;
Just put the following in your smb.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kernel oplocks = no&lt;br /&gt;
oplocks = no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: The Vserver using Samba should also listen on the broadcast address. Thereby you will not be able to have two samba servers in the same net (on the same broadcast). |Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Samba from Debian 3.1|Details=&lt;br /&gt;
The samba deb in sarge (3.1) provided file sharing.  The only oddity observed is that the vserver guest running samba did not appear in a windows box's 'My Network Places'&lt;br /&gt;
    Use a WINS server. The SMB browsing protocol relies heavily on broadcasts on the local net, which are problematic with vservers. WINS resolution on the other hand is unicast and works flawlessly under vserver.|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Samba printer and file server with cups|Details=&lt;br /&gt;
:Samba runs correctly in a Mandriva (Mdk) 10.1 Vserver, (Apart from the above oplock problem ?).&lt;br /&gt;
: \\&lt;br /&gt;
First, edit your {{/etc/sysconfig/network}} file, and set {{networking}} to {{yes}} (This will solve problems for other services !):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/sysconfig/network&lt;br /&gt;
NETWORKING=yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
Some more tweaking is needeed in {{/etc/smb.conf}}:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/smb.conf&lt;br /&gt;
...&lt;br /&gt;
  # YOUR VSERVER IP/MASK HERE&lt;br /&gt;
  interfaces = xxx.xxx.xxx.xxx/mask&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
That's all !!!&lt;br /&gt;
: \\&lt;br /&gt;
But if you're using Samba + Cups to provide printing for Windows clients, AND if you want to use the {{Point and Print}} feature, there is more: In the {{[printers]}} section of your {{smb.conf}}, you should have the {{use client drivers}} directive set to {{no}}, or the driver upload procedure will fail !&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/smb.conf&lt;br /&gt;
...&lt;br /&gt;
  use client driver = no&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
So, here is a full {{smb.conf}} file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /etc/samba/smb.conf | awk '!/^$/ &amp;amp;&amp;amp; !/^\s*(#|;)/ {print $0}'&lt;br /&gt;
[global]&lt;br /&gt;
   workgroup = MYDOMAIN&lt;br /&gt;
   netbios name = MYHOSTNAME&lt;br /&gt;
   server string = MYCOMMENT (Samba %v)&lt;br /&gt;
   printcap name = cups&lt;br /&gt;
   load printers = yes&lt;br /&gt;
   printing = cups&lt;br /&gt;
   printer admin = @adm&lt;br /&gt;
   log file = /var/log/samba/log.%m&lt;br /&gt;
   max log size = 50&lt;br /&gt;
   map to guest = bad user&lt;br /&gt;
   security = domain&lt;br /&gt;
   password server = *&lt;br /&gt;
   encrypt passwords = yes&lt;br /&gt;
   smb passwd file = /etc/samba/smbpasswd&lt;br /&gt;
   username map = /etc/samba/smbusers&lt;br /&gt;
   idmap uid = 10000-20000&lt;br /&gt;
   idmap gid = 10000-20000&lt;br /&gt;
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192&lt;br /&gt;
   interfaces = 127. MYVSERVERIP/MYVSERVERMASK&lt;br /&gt;
   wins server = MYWINSIP&lt;br /&gt;
   dns proxy = no&lt;br /&gt;
   # for french users:&lt;br /&gt;
   dos charset = 850&lt;br /&gt;
   unix charset = ISO8859-1&lt;br /&gt;
[homes]&lt;br /&gt;
   comment = Home Directories&lt;br /&gt;
   browseable = no&lt;br /&gt;
   writable = no&lt;br /&gt;
[printers]&lt;br /&gt;
   comment = All Printers&lt;br /&gt;
   path = /var/spool/samba&lt;br /&gt;
   browseable = no&lt;br /&gt;
   guest ok = no&lt;br /&gt;
   writable = no&lt;br /&gt;
   printable = yes&lt;br /&gt;
   create mode = 0700&lt;br /&gt;
   print command = lpr-cups -P %p -o raw %s -r   # using client side printer drivers.&lt;br /&gt;
   use client driver = no&lt;br /&gt;
[print$]&lt;br /&gt;
   path = /var/lib/samba/printers&lt;br /&gt;
   browseable = yes&lt;br /&gt;
   write list = @adm root&lt;br /&gt;
   guest ok = yes&lt;br /&gt;
   inherit permissions = yes&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
...And a working smbusers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Unix_name = SMB_name1 SMB_name2 ...&lt;br /&gt;
root = administrator MYDOMAIN\administrator&lt;br /&gt;
nobody = guest pcguest smbguest&lt;br /&gt;
&amp;lt;/pre&amp;gt;|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Cups print server|Details=&lt;br /&gt;
: Symptoms: The Cups init script exits with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Starting CUPS printing system: cupsd: Child exited with status 98!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
And the logs ({{/var/log/cups/error_log}}) show:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
E [date:hour...] StartListening: Unable to bind socket for address 0.0.0.0:631 - Address already in use.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:...Or something like this.&lt;br /&gt;
: \\&lt;br /&gt;
With a correct &amp;quot;cupsd.conf file&amp;quot; (Tested version 1.1.21-0.rc1.7mdk, on Mandrake 10.1 - Now Mandriva), it works; All we need is to remove references to {{127.0.0.1}} or {{localhost}} from the file, as well as correctly unsetting the {{Listen}} directive:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
LogLevel info&lt;br /&gt;
TempDir /var/spool/cups/tmp&lt;br /&gt;
# No 'Listen' directive !&lt;br /&gt;
Port 631&lt;br /&gt;
BrowseAddress @LOCAL&lt;br /&gt;
BrowseDeny All&lt;br /&gt;
BrowseAllow @LOCAL&lt;br /&gt;
BrowseOrder deny,allow&lt;br /&gt;
&amp;lt;Location /&amp;gt;&lt;br /&gt;
  Order Deny,Allow&lt;br /&gt;
  Deny From All&lt;br /&gt;
  Allow From @LOCAL&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;Location /admin&amp;gt;&lt;br /&gt;
  AuthType Basic&lt;br /&gt;
  AuthClass System&lt;br /&gt;
  Order Deny,Allow&lt;br /&gt;
  Deny From All&lt;br /&gt;
  Allow From YOUR_NETWORK_ADDRESS/YOUR_NETMASK # Example: 172.16.0.0/24&lt;br /&gt;
# Or&lt;br /&gt;
  Allow From @LOCAL&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
Then you'll need to modify the {{/etc/init.d/cups}} script, to comment any section referring to {{127.0.0.1}} lookup and configuration. This section exists at least on Mandrake 10.1, and is pretty long (Lines 35 to 55 and/or 79), and additionnaly four &amp;quot;{{else...if}}&amp;quot; lines must be commented far below (Lines 161 to 164) !&lt;br /&gt;
: \\&lt;br /&gt;
Remember to stop any Cupsd running in the host server, or to start it ''via'' a wrapper {{/etc/init.d/v_cups}} script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
# chkconfig: 2345 15 60&lt;br /&gt;
# description: Wrapper to start cups bound to a single IP&lt;br /&gt;
USR_LIB_VSERVER=/usr/lib/util-vserver&lt;br /&gt;
exec $USR_LIB_VSERVER/vsysvwrapper cups $*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
Do not forget to give a password to the root user, if you want to ba able to manage your printers from the web interface (http://yourcupsvserver:631)!&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# passwd root&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
If you use Mandriva 10.1 (And maybe some other distros), you&amp;amp;#8217;ll need to add the printers drivers for Cups, and reload it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# urpmi --root /vservers/yourcupsvserver/ cups-drivers&lt;br /&gt;
# /etc/init.d/cups reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
&amp;amp;#8230;It added 67 Mb of packages for me.&lt;br /&gt;
: \\&lt;br /&gt;
Then use {{/etc/init.d/v_cups (re)start}} to launch Cups on the host server.&lt;br /&gt;
:You will now be able to make Cupsd start in the vserver , but more tweaking on the ACLs may be necessary to avoid authentification problems...|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Bind9 on Debian GNU/Linux Woody (3.0) and Sarge (3.1)|Details=&lt;br /&gt;
:named provided by the bind9 binary packages fails to start because it is compiled with CAPs option.&lt;br /&gt;
: \\&lt;br /&gt;
The debian way is to build** your own package without CAPs:&lt;br /&gt;
: \\&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
su -&lt;br /&gt;
cd /usr/src&lt;br /&gt;
apt-get build-dep bind9&lt;br /&gt;
apt-get source bind9&lt;br /&gt;
cd bind9-x.x.x&lt;br /&gt;
vi debian/rules&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
Insert the following line after &amp;quot;./configure --prefix=/usr \&amp;quot;:&lt;br /&gt;
: \\&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--disable-linux-caps \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
On a NPTL-enabled system you alse have to replace \\&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--enable-threads \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: with \\&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--disable-threads \&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: or bind might refuse to run with an other user than root.&lt;br /&gt;
: \\&lt;br /&gt;
Save the file and go ahead with compiling/installing:&lt;br /&gt;
: \\&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dpkg-buildpackage&lt;br /&gt;
dpkg -i ../bind9-x.x.x.deb&lt;br /&gt;
echo &amp;quot;bind9 hold&amp;quot; | dpkg --set-selections&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
: \\&lt;br /&gt;
The last line is to set the package &amp;quot;on hold&amp;quot;, so it is not touched by the update process. you have to take care of security holes by yourself now!&lt;br /&gt;
: \\&lt;br /&gt;
The Xs in &amp;quot;bind9-x.x.x&amp;quot; denote the version number of bind9.&lt;br /&gt;
: \\&lt;br /&gt;
&lt;br /&gt;
** Alternatively you can allow the CAP_SYS_RESOURCE for that V-Server.&lt;br /&gt;
&lt;br /&gt;
The best way would be to fix bind, which is somehow broken when it comes to capabilities.&lt;br /&gt;
Daniel Hokka Zakrisson repaired it. His patch is to be found here:&lt;br /&gt;
&lt;br /&gt;
[http://daniel.hozac.com/stuff/bind-9.3.2-caps-when-available.patch bind-9.3.2-caps-when-available.patch]&lt;br /&gt;
So, if you recompile, it would be the cleanest way to apply that patch. Thanks Daniel!&lt;br /&gt;
&lt;br /&gt;
It would be also nice, if someone submits that patch to the bind people or maybe to your distribution's package maintainers in the first step.&lt;br /&gt;
&lt;br /&gt;
Get my [http://linux-vserver.derjohn.de/bind9-packages/bind9-capacheck_9.3.2-2_i386.deb vserver-guest-ready Debian bind9 package] for Debian Sid guests. Feedback welcome: aj@net-lab.net|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Postfix 2.1.5 (Debian Sarge)|Details=&lt;br /&gt;
:On a vserver with two interfaces (lo and eth0), and a postfix 2.1.5 listening on lo, postfix can't send emails : &amp;quot;Invalid argument&amp;quot;... Setting smtp_bind_address (http://www.postfix.org/postconf.5.html#smtp_bind_address) to the external address solves the issue.|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Zimbra Mail|Details=&lt;br /&gt;
Zimbra is many applications (including Postfix and MySQL and OpenLDAP and more) which try to take over the interfaces, and depend a lot on binding from 127.0.0.1 - it is not hard to change, but there is a couple of tricks - it is documented here - http://wiki.zimbra.com/index.php?title=Install_VServer|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=xine|Details=&lt;br /&gt;
xine won't start with no error message.&lt;br /&gt;
&amp;quot;xine --verbose&amp;quot; shows this.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR: Could not determine network interfaces, you must use a interfaces config line&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This happens if you have the xineplug_inp_smb.so plugin. Delete it and everything is fine.|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=127.0.0.1 issues|Details=&lt;br /&gt;
I had problems with an application that wanted me to access it on 127.0.0.1 and AS 127.0.0.1 to be able to do its configuration. A simple tweak solved the problem. I renamed the default interface directory &amp;quot;0&amp;quot; in /etc/vservers/server/interfaces to &amp;quot;1&amp;quot; and created interface 0 as :&lt;br /&gt;
:dev lo&lt;br /&gt;
:ip 127.0.0.1&lt;br /&gt;
:mask 255.0.0.0&lt;br /&gt;
:name lo&lt;br /&gt;
&lt;br /&gt;
now interface &amp;quot;1&amp;quot; is the default created interface by the vserver build script with a local adress like 192.168.1.2 and interface &amp;quot;0&amp;quot; is the loopback. I can now telnet on 127.0.0.1 and it sees that im connecting to 127.0.0.1 from 127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Compiling nagios-1.4 within a vserver requires this, otherwise it hangs during the configure with &amp;quot;checking for ICMP ping syntax...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font size=&amp;quot;+1&amp;quot; color=&amp;quot;red&amp;quot;&amp;gt; /!\ BIG FAT WARNING: DON'T DO THIS: THE VSERVER WILL HAVE ACCESS TO THE 127.0.0.1 OF THE HOST (quoting Bertl from irc) &amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question|Question=Hula-project|Details=&lt;br /&gt;
Does not want to start :(|Signature=ProblematicPrograms}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Report_a_Bug</id>
		<title>Report a Bug</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Report_a_Bug"/>
				<updated>2014-03-04T18:36:41Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: /* Test scripts */  added instruction to create a sparse file instead of writing all the blocks, a major time saver&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
There is a large number of Linux-VServer users. There is a much small number of people who actually develop Linux-VServer and fix bugs.&lt;br /&gt;
&lt;br /&gt;
What does this mean for you, an aspiring bug reporter? In order to catch the eye of one of these few volunteers, you'll need to take to heart a few tips on how to report a bug so that they can and will help you.&lt;br /&gt;
&lt;br /&gt;
By following these guidelines, you can help ensure that your bugs stay at the top of the developers' heap, and get fixed.&lt;br /&gt;
&lt;br /&gt;
== How to report bugs ==&lt;br /&gt;
&lt;br /&gt;
The people who are going to help you with a bug report are volunteers. Not only are you not paying them to help you, but nobody else is either. So, be nice to them. &lt;br /&gt;
&lt;br /&gt;
Beyond that golden rule, what follows are some additional tips on ways to make your bug report better so that someone will be able to help you.&lt;br /&gt;
&lt;br /&gt;
=== Basics: what you did, what you wanted to happen, and what actually happened. ===&lt;br /&gt;
&lt;br /&gt;
Those are the three basic elements of a bug report. You need to tell us exactly what you did (for example, &amp;quot;I right-clicked on &amp;quot;make happy meal&amp;quot;), what you expected to have happened (to continue the example, &amp;quot;I expected the kernel to serve me a happy meal with a hamburger and onion rings&amp;quot;), and what actually happened (&amp;quot;It gave me a happy meal with french fries.&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Yes, the example is silly. But if your bug report simply said &amp;quot;The make_happy_meal function doesn't work,&amp;quot; you will very likely get a reply saying &amp;quot;It works fine for me&amp;quot;, because we can't guess what you were expecting to happen. By giving all the information you might get a reply like &amp;quot;That's because you can't have onion rings in a happy meal, you can only have french fries or curly fries.&amp;quot; By telling us what you asked for, what you expected to get, and what you actually got, we don't have to guess what you mean.&lt;br /&gt;
&lt;br /&gt;
=== Useful information ===&lt;br /&gt;
&lt;br /&gt;
The following list gives an overview of information useful in bug reports. Note that you don't have to submit all information listed below, but you should do as long as it helps to discover the root of all evil.&lt;br /&gt;
&lt;br /&gt;
* One line summary of the problem&lt;br /&gt;
* Full description of the problem&lt;br /&gt;
* Kernel version (from /proc/version)&lt;br /&gt;
* Output of test scripts (see below)&lt;br /&gt;
* Output of the Oops.. message (if applicable) with symbolic information resolved (see Documentation/oops-tracing.txt in the kernel source)&lt;br /&gt;
* A small shell script or example program which triggers the problem (if possible)&lt;br /&gt;
* Processor information (from /proc/cpuinfo)&lt;br /&gt;
* Module information (from /proc/modules)&lt;br /&gt;
* Other information that might be relevant to the problem&lt;br /&gt;
* Other notes, patches, fixes, workarounds&lt;br /&gt;
&lt;br /&gt;
=== Test scripts ===&lt;br /&gt;
&lt;br /&gt;
To ensure that your (VServer) setup works we have created two small test scripts. The testme.sh script ensures basic functionality whereas the testfs.sh script is for inode attribute testing for various filesystems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# get the script&lt;br /&gt;
wget http://vserver.13thfloor.at/Stuff/SCRIPT/testme.sh&lt;br /&gt;
&lt;br /&gt;
# make it executable&lt;br /&gt;
chmod +x testme.sh&lt;br /&gt;
&lt;br /&gt;
# become root&lt;br /&gt;
su&lt;br /&gt;
&lt;br /&gt;
# run the test script&lt;br /&gt;
./testme.sh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Be careful! The testfs.sh script might easily reformat your hard disk :)'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# get the script&lt;br /&gt;
wget http://vserver.13thfloor.at/Stuff/SCRIPT/testfs.sh&lt;br /&gt;
&lt;br /&gt;
# make it executable&lt;br /&gt;
chmod +x testfs.sh&lt;br /&gt;
&lt;br /&gt;
# make a loopback file (created as a sparse file to save time)&lt;br /&gt;
touch 1gb.tesfile&lt;br /&gt;
dd if=/dev/zero of=1gb.testfile bs=1 count=0 seek=1G&lt;br /&gt;
&lt;br /&gt;
# become root&lt;br /&gt;
su&lt;br /&gt;
&lt;br /&gt;
# setup the loopback&lt;br /&gt;
losetup /dev/loop0 1gb.testfile&lt;br /&gt;
&lt;br /&gt;
# run the test script for new-style config&lt;br /&gt;
./testfs.sh -t -x -y -z -D /dev/loop0 -M /mnt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attach the output of these two scripts to your bug report.&lt;br /&gt;
&lt;br /&gt;
'''If you need to figure out which line of code is causing an OOPS/RIP, the following script will parse your dmesg and output the lines and addresses formatted as shown below:'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
# output looks like: ffffffff80502a23:/usr/src/linux-2.6.25-vs/net/ipv4/raw.c:936&lt;br /&gt;
# only arg is path to vmlinux (/usr/src/linux/vmlinux)&lt;br /&gt;
CMD=`dmesg | egrep '&amp;lt;[[:xdigit:]]{16}&amp;gt;' | sed -r -e 's,^[^&amp;lt;]+?&amp;lt;,,g' -e 's,&amp;gt;[^&amp;lt;]+?&amp;lt;, ,g' -e 's,&amp;gt;.*$,,g'`&lt;br /&gt;
if [ ${1} ]; then&lt;br /&gt;
for i in ${CMD}; do echo -n $i: &amp;amp;&amp;amp; addr2line -e $1 $i;done&lt;br /&gt;
else&lt;br /&gt;
echo please give me the path to your vmlinux&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where to send bug reports? ==&lt;br /&gt;
&lt;br /&gt;
Bug reports should be submitted to the mailing list or directly to one of our developers in IRC.&lt;br /&gt;
&lt;br /&gt;
See the [[Communicate]] page to learn how to use the mailing list and/or IRC.&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Frequently_Asked_Questions</id>
		<title>Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Frequently_Asked_Questions"/>
				<updated>2013-09-29T09:47:19Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: Added info about Ubuntu repo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Icon-Caution.png|left]]&lt;br /&gt;
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 look at the [http://oldwiki.linux-vserver.org old wiki] to find the information not migrated yet.&lt;br /&gt;
&lt;br /&gt;
'''To ease migration we created a [[List of old Documentation pages]].'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CURRENTLY THE CONTENT OF THE OLD WIKI FAQ (AND MORE) IS BEING MIGRATED TO THIS PAGE (TASK: DERJOHN)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the status of Linux-VServer?&lt;br /&gt;
||Details=Linux-VServer has more than a decade of maturity and is actively developed. Two projects are similar to Linux-VServer, [[http://lxc.sf.net LXC]], and [[http://openvz.org OpenVZ]]. Of the two, OpenVZ is the more mature and offers some similar functionality to Linux-VServer. LXC is solely based on the kernel mechanisms such as cgroups that are present in modern kernels. These kernel mechanisms will continue to be refined and isolation will mature. As that occurs, Linux-VServer will take advantage of those new features separately from LXC and continue to provide the same robust user interface that it does currently. Currently, LXC offers significantly less functionality and isolation than Linux-vserver. LXC will eventually be a robust wrapper around kernel mechanisms but is still under heavy development and not considered ready for production use.&lt;br /&gt;
|Signature=beck}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is a 'Guest'?&lt;br /&gt;
||Details=To talk about stuff, we need some naming. The physical machine is called 'Host' and the 'main' context running the Host Distro is called 'Host Context'. The virtual machine/distro is called 'Guest' and basically is a Distribution (Userspace) running inside a 'Guest Context'.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What kind of Operating System (OS) can I run as guest?&lt;br /&gt;
||Details= With VServer you can only run Linux guests. The trick is that a guest does not run a kernel on its own (as XEN and UML do), it merely uses a virtualized host kernel-interface. VServer offers so called security contexts which make it possible to separate one guest from each other, i.e. they cannot get data from each other. Imagine it as a chroot environment with much more security and features.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is this a new project? When was it started?&lt;br /&gt;
||Details=The first public occurrence of Linux-VServer was Oct 2001. The initial mail can be found here: http://www.cs.helsinki.fi/linux/linux-kernel/2001-40/1065.html&lt;br /&gt;
So you can expect a mature software product which does its magic quite well (And hey, we have a version &amp;gt; 2.0!)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Which distributions did you test?&lt;br /&gt;
||Details=Some. Check out the wiki for ready-made guest images. But you can easily build own guest images, e.g. with Debian's debootstrap. Checkout [[Building Guest Systems]] how to do that.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is VServer comparable to XEN/UML/QEMU?&lt;br /&gt;
||Details=Nope. XEN/UML/QEMU and VServer are just good friends. Because you ask, you probably know what XEN/UML/QEMU are. VServer in contrary to XEN/UML/QEMU does not &amp;quot;emulate&amp;quot; any hardware you run a kernel on. The purpose of Linux VServer is to isolate (groups of) applications.  The isolation is done by the kernel (see [[Overview]] for a more detailed comparison). You can run a VServer kernel in a XEN/UML/QEMU guest. This is confirmed to work at least with Linux 2.6/vs2.0.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=With which version should I begin?&lt;br /&gt;
||Details=If you are new to VServer I recommend to try the latest stable kernel patch, and the latest util-vserver &amp;quot;alpha&amp;quot; release.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is VServer secure?&lt;br /&gt;
||Details=We hope so. It should be as least as secure as Linux is. We consider it much much more secure though.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Performance?&lt;br /&gt;
||Details=For a single guest, we basically have native performance. Some tests showed insignificant overhead (about 1-2%) others ran faster than on an unpatched kernel. This is IMVHO significantly less than other solutions waste, especially if you have more than a single guest (because of the resource sharing).&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the &amp;quot;great flower page&amp;quot;?&lt;br /&gt;
||Details=Well, [http://www.nongnu.org/util-vserver/doc/conf/configuration.html this page] contains all configuration options for util-vserver. The name of the page is derived from the stylesheet(s) it contains.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Resources usage ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Resource sharing?&lt;br /&gt;
||Details=Yes ....&lt;br /&gt;
* memory: Dynamically.&lt;br /&gt;
* CPU usage: Dynamically (token bucket)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Resource limiting?&lt;br /&gt;
||Details=You can put limits per guest on different subsystems.&lt;br /&gt;
* using ulimits and rlimits (rlimit is a new feature of kernel 2.6/vs2.0.) per guest, to limit the memory consumption, the number of processes or file-handles, ... : see [[Resource Limits]]&lt;br /&gt;
* CPU usage : see [[CPU Scheduler]]&lt;br /&gt;
* disk space usage : see [[Disk Limits and Quota]]&lt;br /&gt;
Note that you can only offer guaranteed resource availability with some ticks at the time.&lt;br /&gt;
|Signature=derjohn&amp;amp;xm}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I limit a guests RAM? I want to prevent OOM situations on the host!&lt;br /&gt;
||Details=First you can read [http://linux-vserver.org/Memory+Allocation] and [[Memory Limits]].&lt;br /&gt;
If you want a recipe, do this:&lt;br /&gt;
# Check the size of memory pages. On x86 and x86_64 is usually 4 KB per page. (on linux &amp;quot;getconf -a|grep PAGE&amp;quot; will give you the information)&lt;br /&gt;
# Create /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/&lt;br /&gt;
# Check your physical memory size on the host, e.g. with &amp;quot;free -m&amp;quot;. maxram = kilobytes/pagesize.&lt;br /&gt;
# Limit the guests physical RAM to value smaller then maxram:&amp;lt;pre&amp;gt;echo %%insertYourPagesHereSmallerThanMaxram%% &amp;gt; /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/rss &amp;lt;/pre&amp;gt;&lt;br /&gt;
# Check your swapspace, e.g. with 'swapon -s'. maxswap = swapkilobytes/pagesize.&lt;br /&gt;
# Limit the guest's maximum number of as pages to a value smaller than (maxram+maxswap): &amp;lt;pre&amp;gt; echo %%desiredvalue%% &amp;gt; /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/as &amp;lt;/pre&amp;gt;&lt;br /&gt;
# Correctly display the memory information inside the guest:&amp;lt;pre&amp;gt;echo &amp;quot;VIRT_MEM&amp;quot; &amp;gt;&amp;gt; /etc/vservers/&amp;lt;guest&amp;gt;/flags&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should be clear this can still lead to OOM situations. Example: You have two guests and your as limit per guest is greater than 50% of (maxram+maxswap). If both guests request their maximum at the same point in time, there will be not enough mem .....&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Disk I/O limiting? Is that possible?&lt;br /&gt;
||Details=Well, since vs2.1.1 Linux-VServer supports a mechanism called 'I/O scheduling', which appeared in the 2.6 mainline some time ago. The mainline kernel offers several I/O schedulers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/block/hdc/queue/scheduler&lt;br /&gt;
noop [anticipatory] deadline cfq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default since 2.6.18 in Sept 2006 is CFQ, described below, and prior to that was anticipatory a.k.a. &amp;quot;AS&amp;quot; ([[http://en.wikipedia.org/wiki/CFQ#Kernel_2.6.18_.2820_September_2006.29 Wikipedia]]). When running several guests on a host you probably want the I/O performance shared in a fair way among the different guests. The kernel comes with a &amp;quot;completely fair queueing&amp;quot; scheduler, CFQ, which can do that. (More on schedulers can be found at http://lwn.net/Articles/114770/)&lt;br /&gt;
This is how to set the scheduler to &amp;quot;cfq&amp;quot; manually:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root# echo &amp;quot;cfq&amp;quot; &amp;gt; /sys/block/hdc/queue/scheduler&lt;br /&gt;
root# cat /sys/block/hdc/queue/scheduler&lt;br /&gt;
noop anticipatory deadline [cfq]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Keep in mind that you have to do it on all physical discs. So if you run an md-softraid, do it to all physical /dev/hdXYZ discs!&lt;br /&gt;
If you run Debian there is a predefined way to set the /sys values at boot-time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get install sysfsutils&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# grep cfq /etc/sysfs.conf&lt;br /&gt;
block/sda/queue/scheduler = cfq&lt;br /&gt;
block/sdc/queue/scheduler = cfq&lt;br /&gt;
&lt;br /&gt;
# /etc/init.d/sysfsutils restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For non-vserver processes and CFQ you can set by which key the kernel decides about the fairness:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat /sys/block/hdc/queue/iosched/key_type&lt;br /&gt;
pgid [tgid] uid gid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hint: The 'key_type'-feature has been removed in the mainline kernel recently. Don't look for it any longer :(&lt;br /&gt;
&lt;br /&gt;
The default is tgid, which means to share fairly among process groups. Think every guest is treated like a own process group. It's not possible to set a scheduler strategy within a guest. All processes belonging to the same guest are treated like &amp;quot;noop&amp;quot; within the guest. So: If you run apache and some ftp-server within the _same_ guest, there is no fair scheduling between them, but there is fair scheduling between the whole guest and all other guests.&lt;br /&gt;
&lt;br /&gt;
And: It's possible to tune the scheduler parameters in several ways. Have a look at /sys/block/hdc/queue/....&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Nice disk I/O scheduling, is that possible?&lt;br /&gt;
||Details=Well, since linux 2.6.13 processess have another priority next to the cpu nice scheduling hint, it's called io nice.&lt;br /&gt;
It's split into three groups, called real-time, best effort and idle. The default is best-effort, but within best-effort, you can have a niceness from 0 to and including 7.&lt;br /&gt;
You can set this niceness by the tool ionice, which for debian is either in the package util-linux or schedutils.&lt;br /&gt;
To change the io-niceness you need the &amp;lt;tt&amp;gt;CAP_SYS_NICE&amp;lt;/tt&amp;gt;, '''and''' need to have the same uid as the processe you want to ionice.&lt;br /&gt;
&lt;br /&gt;
:'''Note:''' If you want to use any schedulung other than best-effort you will also need the &amp;lt;tt&amp;gt;CAP_SYS_ADMIN&amp;lt;/tt&amp;gt;-flag. Be warned that this gives quite some capabilities to the vserver, not just for I/O scheduling!&lt;br /&gt;
&lt;br /&gt;
If you want to increase the niceness of an I/O hogging process within a vserver you need to do:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
chcontext --xid sponlp1 sudo -u '#2089' ionice -c2 -n5 -p24409&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
with sudo and ionice installed on the root server to increase the *nice*ness of pid 24409, with uid 2089&lt;br /&gt;
|Signature=Groteblup}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want iotop to display all guest processes on host to give me a nice overview of I/O usage.&lt;br /&gt;
||Details=You must allow iotop to read information from all guests. Add &lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
# setattr --watch /proc/vmstat&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
to, for example, rc.local, and later run iotop:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
# vcontext --migrate --xid 1 -- iotop&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
|Signature=corey via ser}}&lt;br /&gt;
&lt;br /&gt;
== Unification ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is unification (vunify)?&lt;br /&gt;
||Details=[[Unification]] is Hard Links on Steroids. Guests can 'share' common files (usually binaries and libraries) in a secure way, by creating hard links with special properties (immutable but unlinkable (removable)). The tool to identify common files and to unify them is called [[vunify]].&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is [[vhashify]]?&lt;br /&gt;
||Details=The successor of [[vunify]], a tool which does unification based on hash values (which allows to find common files in arbitrary paths.)&lt;br /&gt;
It creates hardlinks to files named after a hash of the content of the file. If you have a recent version of the vserver patch (2.2+), with CONFIG_VSERVER_COWBL enabled, you can even modify the hardlinked files inside the vservers and the links will be broken automatically.&lt;br /&gt;
There seems to be a catch when a hashified file has multiple hardlinks inside a guest, or when another internal hardlink is added after hashification. Link breaking will remove all the internal hardlinks too, so the guest will end up with different copies of the original file. The correct solution would be to not hashify files that have multiple links prior to hashification, and to break the link to the hashified version when a new internal hardlink is created. Apparently, this is not implemented yet (?).&lt;br /&gt;
&amp;lt;br/&amp;gt;|Signature=Guy-&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Note: hashify cannot cross XFS project QUOTA because hardlinks cannot cross projects.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I manage a multi-guest setup with vhashify?&lt;br /&gt;
||Details=For '[[vhashify]]', just do these once:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /etc/vservers/.defaults/apps/vunify/hash /vservers/.hash&lt;br /&gt;
ln -s /vservers/.hash /etc/vservers/.defaults/apps/vunify/hash/root&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, do this one line per vserver:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /etc/vservers/&amp;lt;vservername&amp;gt;/apps/vunify   # vhashify reuses vunify configuration&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To hashify a running vserver, do (possibly from a cronjob):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver name-of-guest hashify&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The guest needs to be running because vhashify tries to figure out what files not to hashify by calling the package manager of the guest via &amp;lt;tt&amp;gt;vserver enter&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In order for the OS cache to benefit from the hardlinking, you'll have to restart the vservers.&lt;br /&gt;
&lt;br /&gt;
To clean up hashified files that are no longer referenced by any vserver, do (possibly from a cronjob):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
find /vservers/.hash -type f -links 1 -print0 | xargs -0 rm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Until you do this, the files still take up place even though no vservers need them.&lt;br /&gt;
|Signature=Guy-}}&lt;br /&gt;
&lt;br /&gt;
== Filesystem usage ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is there a way to implement &amp;quot;user/group quota&amp;quot; per VServer?&lt;br /&gt;
||Details=Yes, but not on a shared partition for now. You need to put the guest on a separate partition, setup a vroot device (to make the quota access secure), copy that into the guest, and adjust the mtab line inside the guest. If 8 vroot device is not enough for you, you can add more with the kernel parameter max_vroot (exemple for built in kernel vroot /vmlinuz-2.6.31.6-vs2.3.0.36.26aq root=/dev/md1 ro max_vroot=20 ). If vroot is a module you'd actually want to put for exemple &amp;quot;options vroot max_vroot=20&amp;quot; in /etc/modprobe.conf and then just do modprobe vroot&lt;br /&gt;
|Signature=derjohn,gadnet}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What about &amp;quot;Quota&amp;quot; for a context? Howto limit disk usage?&lt;br /&gt;
||Details=Context quotas are now called Disk Limits (so that we can tell them apart from the user/group quotas :). They are supported out of the box (with vs2.0+) for all major filesystems (ext2/3, ReiserFS, JFS). You need to tag the FS with XID (see below). Please read [[Disk Limits and Quota]] for more information.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I tag a guest's directory with xid?&lt;br /&gt;
||Details=Tagging the guest's files gives you several advantages, e.g. the accounting will work properly.&lt;br /&gt;
Filesystem XID tagging only works on supported filesystem. Those are currently: ext2/3, reiserfs/reiser3, xfs and jfs.&lt;br /&gt;
To activate the XID tagging you have to mount the filesystem with &amp;quot;-o tag&amp;quot; (former tagxid is outdated since VS2.2). Attention: It's _not_ possible to &amp;quot;-o remount,tag&amp;quot;, you have to mount it freshly. The guests will tag their files automatiaclly. If you copy files in from the host, you have to tag them manually like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chxid -c xid -R /var/lib/vservers/&amp;lt;guest&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Context 0 and 1 will see all files, guests will only be able to access untagged files and their own XID. They can see other XID files but no information about the file, e.g. no owner, no group, no permissions.&lt;br /&gt;
Note: It is not advised to tag the root filesystem, as [http://www.paul.sladen.org/vserver/archives/200602/0020.html explained by Herbert] : trying to do so will expose you to some troubles !&lt;br /&gt;
|Signature=derjohn_and_gonzo_and_are}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I copy anything from host to guest partition, normally unvisible on host?&lt;br /&gt;
||Details=You should just change namespace, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace --enter &amp;lt;xid&amp;gt; -- /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and then use standard cp or rsync programs.&lt;br /&gt;
|Signature=SergiuszPawlowicz}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why is the barrier attribute disappearing on reiserfs filesystem after umount or host reboot?&lt;br /&gt;
||Details=The filesystem has to be mounted with explicitly defining the 'attrs' option, i.e. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount /dev/reiserfsdev /vservers -oattrs&lt;br /&gt;
setattr --barrier /vservers&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to get the barrier survive after umount/reboot.&lt;br /&gt;
|Signature=Nikolay Kichukov}}&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Does it support IPv6?&lt;br /&gt;
||Details=Currently it requires an additional patch, but the functionality should be available in 2.3+ soon. [[IPv6]] has more information.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I can't do all I want with the network interfaces inside the guest?&lt;br /&gt;
||Details=For now the networking is 'Host Business' -- the host is a router, and each guest is a server. You can set the capability ICMP_RAW in the context of the guest, or even the capability CAP_NET_RAW (which would even allow to sniff interfaces of other guests!). Likely to change with ngnet.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I add several IPs to a vserver?&lt;br /&gt;
||Details=First of all a single guest vserver only supports up to 16 IPs (There is a 64-IP patch available, which is in &amp;quot;derjohn's kernel&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Update from IRC (2011-08-22):&lt;br /&gt;
&amp;lt;mmouse&amp;gt; quick question: what is the maximum count of IPs (v4) I can have in a single guest?&lt;br /&gt;
&amp;lt;daniel_hozac&amp;gt; unlimited.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a little helper-script that adds a list of IPs defined in a text file, one per line.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
j=1&lt;br /&gt;
for i in `cat myiplist`; do&lt;br /&gt;
        j=$(($j+1))&lt;br /&gt;
        mkdir $j&lt;br /&gt;
        echo $i &amp;gt; $j/ip&lt;br /&gt;
        echo &amp;quot;24&amp;quot; &amp;gt; $j/prefix&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I assign a new IP address to a running guest?&lt;br /&gt;
||Details=This is done from the host server:&lt;br /&gt;
* add the ip on the host, for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ip addr add 194.169.123.23/24 dev eth0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* add the ip to the guest's network context (a guests NID is the same as the XID {context ID})&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
naddress --add --nid &amp;lt;nid&amp;gt; --ip 194.169.123.23/24 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* enter the guest (best via ssh) &lt;br /&gt;
* restart the services that need to make use of the new address if required &lt;br /&gt;
* update the config in ''/etc/vserver/&amp;lt;servername&amp;gt;/interfaces'' to reflect the changes for the next guest restart (if desired)&lt;br /&gt;
|Signature=BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=If my host has only one a single public IP, can I use RFC1918 IP (e.g. 192.168.foo.bar) for the guest vservers?&lt;br /&gt;
||Details=Yes, use iptables with SNAT to masquerade it. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -t nat -I POSTROUTING -s $VSERVER_NETZ  ! -d $VSERVER_NETZ -j SNAT --to $EXT_IP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See: [[HowtoPrivateNetworking]] and &lt;br /&gt;
http://www.tgunkel.de/it/software/doc/linux_server.en#h3-VServer_Masquerading_SNAT (THX, [MUPPETS]Gonzo)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=If I shut down my vserver guest, the whole Internet interface ethX on the host is shut down.  What happened?&lt;br /&gt;
||Details=When you shut down a guest (''i.e. vserver foo stop''), the IP is brought down on the host also. If this IP happens to be the primary IP of the host, the kernel will not only bring down the primary IP, but also all secondary IP addresses. Similarly, if your guests bring up IPs of more than one subnet, all other IPs from a specific subnet will be shut down if you stop the guest which created the first (&amp;quot;parent&amp;quot;) IP.&lt;br /&gt;
&lt;br /&gt;
You can check this on the host using the command &amp;quot;ip addr show&amp;quot;. Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1: eth0: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000&lt;br /&gt;
    link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
    inet 192.168.249.172/27 brd 192.168.249.191 scope global eth0&lt;br /&gt;
    inet 192.168.234.194/27 brd 192.168.234.223 scope global eth0&lt;br /&gt;
    inet 192.168.249.169/27 brd 192.168.249.191 scope global secondary eth0&lt;br /&gt;
    inet 192.168.234.195/27 brd 192.168.234.223 scope global secondary eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, if you stop the guest which brings down the IP 192.168.249.172, the IP 192.168.249.169 will be brought down as well, because it is a secondary IP of the &amp;quot;parent&amp;quot; 192.168.249.172.&lt;br /&gt;
&lt;br /&gt;
But in very recent kernels, there is an option ''settable'' which prevents that nasty feature. It's called &amp;quot;alias promotion&amp;quot;. You may set it via sysctl by adding ''net.ipv4.conf.all.promote_secondaries=1'' in /etc/sysctl.conf or via sysctl command line.&lt;br /&gt;
|Signature=derjohn, Hurga}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Can I run an OpenVPN Server in a guest?&lt;br /&gt;
||Details=&lt;br /&gt;
Yes. To get a OpenVPN Server running in a guest, all networking setup has to be done on the host. This answer describes the common case and shows some pitfalls, for detailled information about OpenVPN, please consult the appropriate documentation on the OpenVPN homepage.&lt;br /&gt;
This is the minimal OpenVPN configuration for the Server which will be used to demonstrate how to get it running in a client:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Networking setup&lt;br /&gt;
server 192.168.16.0     255.255.255.0&lt;br /&gt;
dev tun16&lt;br /&gt;
ifconfig-noexec&lt;br /&gt;
comp-lzo&lt;br /&gt;
# Certificates&lt;br /&gt;
dh ...&lt;br /&gt;
ca ...&lt;br /&gt;
cert ...&lt;br /&gt;
key ...&lt;br /&gt;
# Management&lt;br /&gt;
persist-key&lt;br /&gt;
keepalive 10 60&lt;br /&gt;
verb 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First of all you have to prepare the host with a persistent interface in the right mode and with the right settings. This is easily done by using openvpn and the ip and route tools.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# openvpn --mktun --dev tun16&lt;br /&gt;
# ip link set dev tun16 txqueuelen 100&lt;br /&gt;
# ifconfig tun16 192.168.16.1 pointopoint 192.168.16.2 mtu 1500&lt;br /&gt;
# route add -net 192.168.16.0 netmask 255.255.255.0 gw 192.168.16.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you need different settings, openvpn will tell you the ifconfig and route commands it uses to configure the interface when being started on the host with the original config file, but without ifconfig-noexec.&lt;br /&gt;
Additionally, the guest needs /dev/net/tun to make OpenVPN happy. This can be created with MAKEDEV:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/lib/vserver/&amp;lt;myopenvpnserver&amp;gt;/dev/&lt;br /&gt;
# ./MAKEDEV tun&lt;br /&gt;
  (creates the dev/net/tun device accessible by the guest - even a tap interface needs /dev/net/tun !)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally, the guest needs to have the tun device assigned:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/*&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/ip &amp;lt;==&lt;br /&gt;
192.168.16.1&lt;br /&gt;
&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/nodev &amp;lt;==&lt;br /&gt;
tun16&lt;br /&gt;
&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/prefix &amp;lt;==&lt;br /&gt;
24&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The client's conf may look like that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Basic setup&lt;br /&gt;
client&lt;br /&gt;
proto tcp-client&lt;br /&gt;
dev tun&lt;br /&gt;
remote &amp;lt;ipaddress&amp;gt;&lt;br /&gt;
comp-lzo&lt;br /&gt;
verb 4&lt;br /&gt;
&lt;br /&gt;
# Certificate&lt;br /&gt;
ca ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[ Based on derJohn's original answer, all errors mine ] &lt;br /&gt;
|Signature=DavidS}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Trying to connect to a vserver from the host or another vserver on the same host fails&lt;br /&gt;
||Details=strace shows&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
sin_addr=inet_addr(&amp;quot;xx.xx.xx.xx&amp;quot;)}, yy) = -1 EINVAL (Invalid argument)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A: The host/guest cannot communicate with another guest on same host.&lt;br /&gt;
* check all netmasks on all interfaces (do they overlap) ?&lt;br /&gt;
* check policy routing (disable it temporary) ?&lt;br /&gt;
* check that lo is up (Networking within a host/guest always uses lo interface)&lt;br /&gt;
|Signature=CommonProblems}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Can I use iptables ?&lt;br /&gt;
||Details=Yes but right now only on the host (rootserver). Please realize that all traffic is local and will not touch the forward chain.&lt;br /&gt;
&amp;lt;br&amp;gt;If you really, really, really need iptables on the guest and you are aware about loosing a big part of VServer isolation and security you could add the NET_ADMIN capability. Consider writing wrappers to manage iptables on the host instead.&lt;br /&gt;
|Signature=_are_}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to prevent guest from bringing down primary ip?&lt;br /&gt;
||Details=Yes. Remove /etc/vservers/&amp;lt;guest&amp;gt;/interfaces/X/dev, and touch /etc/vservers/&amp;lt;guest&amp;gt;/interfaces/X/nodev&lt;br /&gt;
|Signature=Daniel&amp;amp;Serge}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to provide a different MAC address per vServer?&lt;br /&gt;
||Details=Short answer - yes but it's a hassle.&lt;br /&gt;
&lt;br /&gt;
Real answer from '''_are_''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
When I once needed 'real' seperate MAC-addresses I used TAP-devices and VDE2 ([http://vde.sourceforge.net/ Virtual Distributed Ethernet]).&lt;br /&gt;
Basically vServer is an isolation of existing resources, not a virtualization of 'new' devices.&lt;br /&gt;
Without extra fuss you can't add a 'new' network interface to a vServer, no matter if it is eth* or tap*, you always add it to the host and give the vServer access to it.&lt;br /&gt;
I got the TAP+VDE2 up and running, but I think it is too much trouble for basically the simple adding of IPs to a vServer unless you really need the MAC address separate.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also utilize MACVLAN ability from kernel.&lt;br /&gt;
I.e. create ''macvlan0'' interface with:&lt;br /&gt;
&amp;lt;pre&amp;gt;ip link add link eth0 address 00:19:d1:29:d2:58 macvlan0 type macvlan&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[http://jim.studt.net/depository/index.php/notes-on-linux-s-macvlan-module Reference]]&lt;br /&gt;
|Signature=bobnormal&amp;amp;swenTjuln&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to hide packet counters on the host network interface from vServer guests?&lt;br /&gt;
||Details=Yes, see [[Networking_vserver_guests|Networking vServer Guests]]&lt;br /&gt;
|Signature=bobnormal}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Services won't bind to 127.0.0.1 when I configure them to bind to all available IPs / (binding service to * doesn't bind to loopback)?&lt;br /&gt;
||Details=You've configured single public IP and have kernel option &amp;quot;Linux VServer -&amp;gt; Automatic Single IP Special Casing&amp;quot; enabled.&lt;br /&gt;
It means somehow &amp;quot;optimized&amp;quot; :D&lt;br /&gt;
If you don't want this you have 3 possible solutions (quoting Bertl):&lt;br /&gt;
  * disable the auto single IP in the kernel&lt;br /&gt;
  * assign more than one IP to the guest&lt;br /&gt;
  * disable single ip special casing for that guest&lt;br /&gt;
&lt;br /&gt;
The later is done by : echo &amp;quot;~single_ip&amp;quot; &amp;gt;&amp;gt; /etc/vservers/&amp;lt;VSERVER&amp;gt;/nflags&lt;br /&gt;
At runtime to avoid restarting the vserver: nattribute --set --nid &amp;lt;guest&amp;gt; --flag ~single_ip&lt;br /&gt;
|Signature=swenTjuln}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When using network namespaces and vserver together, netstat does not work in the vserver. What's wrong? &lt;br /&gt;
||Details=All proc entries are hidden by default in the guests. During startup of the host system a tool called vprocunhide makes some /proc files visible.&lt;br /&gt;
&lt;br /&gt;
If you create a new network namespace you have to do the same in the network namespace because the new /proc/net files are not available for the vprocunhide outside the new network namespace. So something like that should be sufficient to get netstat working in vservers with network namespaces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ip netns exec $NAMESPACE /usr/lib/util-vserver/vprocunhide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=AlexanderS}}&lt;br /&gt;
&lt;br /&gt;
== Administration tools ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Which guest vservers are running?&lt;br /&gt;
||Details=Use vserver-stat to find out.  Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME&lt;br /&gt;
0       77 965.1M 334.6M  14m14s18   2m28s69   1h33m46 root server&lt;br /&gt;
49152    7    14M   5.2M   0m00s40   0m00s30   1h30m15 chiffon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is there a web-based interface for vserver that will allow creation/deletion/configuration etc. of vserver guests?&lt;br /&gt;
||Details=&lt;br /&gt;
* http://OpenVPS.org which is a set of scripts with a web-interface for webhosters/ISPs&lt;br /&gt;
* http://Openvcp.org which is a distributed system (agent!) with a web-interface, with which you can build/remove guests&lt;br /&gt;
* http://vsmon.revolutionlinux.com/ is a distributed monitoring-only solution that allows you to search for a particular vserver in your park.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
== Hosting foreign distributions ==&lt;br /&gt;
 &lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I run a Debian host and want to build an Ubuntu guest. Howto?&lt;br /&gt;
||Details=Simple ;) Assume you want to build a breezy guest on a sid host with IP 192.168.0.2 and hostname vubuntu, then do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver vubuntu build --force -m debootstrap --hostname vubuntu.myvservers.net --netdev eth0 --interface 192.168.0.2/24 \&lt;br /&gt;
--context 42 -- -d breezy -m http://de.archive.ubuntu.com/ubuntu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[UPDATE] Currently there are problems in building breezy under unclear circumstances, which seems to have to do with udev. If the above didnt work, try:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver vubuntu build --force -m debootstrap --hostname vubuntu.myvservers.net --netdev eth0 --interface 192.168.0.2/24 \&lt;br /&gt;
--context 42 -- -d breezy -m http://de.archive.ubuntu.com/ubuntu -- --exclude=udev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In very recent versions of the utils, the problem should not occur anymore (it has to do with the 'secure-mount' if you look in the MLs)&lt;br /&gt;
&lt;br /&gt;
Well, sid's debootstrap knows how to bootstrap Ubuntu linux. Make sure to have a current debootstrap package: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install debootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 The knowledge how to build ubuntu 'breezy badger' (which you probably want to be your guest at the time of writing) has been added recently.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want to build a Gentoo guest. Howto?&lt;br /&gt;
||Details=Even simpler ;) See http://www.gentoo.org/proj/en/vps/vserver-howto.xml#doc_chap3 .&lt;br /&gt;
|Signature=gcc}}&lt;br /&gt;
&lt;br /&gt;
== Application level problems ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I did everything right, but the application foo does not start. What's up there?&lt;br /&gt;
||Details=Before asking on the IRC channel, please check out the 'problematic programs' page:&lt;br /&gt;
[[Problematic Programs]]&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to ssh to the guest, I log into the host, even if I installed sshd on the guest. What's wrong here?&lt;br /&gt;
||Details=Look at /etc/ssh/sshd_config of the host:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Port 22&lt;br /&gt;
# Use these options to restrict which interfaces/protocols sshd will bind to&lt;br /&gt;
#ListenAddress ::&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And now change the setting to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Port 22&lt;br /&gt;
# Use these options to restrict which interfaces/protocols sshd will bind to&lt;br /&gt;
ListenAddress your.hosts.ip.here  # not the guests IP! &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then '/etc/init.d/ssh restart' on the host, after that on the guest (if you did apt-get install ssh on the guest already.)&lt;br /&gt;
Do I have to explain more? If the hosts sshd binds all available IP addresses on port 22 (The hosts 'sees' even all addresses of the guests!). So if the guest starts its sshd, it can't bind to port 22 any more. You need to change that setting only on the host. &lt;br /&gt;
(BTW: A similar approach has to be done for a lot of daemons, e.g. Apache. If the daemon does not support an explicit bind, you may use the chbind command to 'hide' IP addresses from the daemon before starting.)|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Bind9 does not like to start in my guest.&lt;br /&gt;
||Details=Check out the [[Problematic Programs]] page and/or get my [http://linux-vserver.derjohn.de/bind9-packages/bind9-capacheck_9.3.2-2_i386.deb vserver-guest-ready Debian package] for Debian Sid guests and check out the [http://linux-vserver.derjohn.de/bind9-packages/README.txt readme]. (Hint: This is fresh stuff. Please give me feedback)&lt;br /&gt;
 &lt;br /&gt;
[UPDATE] Since VServer Devel 2.1.1-rc18 you do not need to patch the userland tools anymore. The capabilities are masked.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=My mysqld running in a guest behaves strangely and is awfully slow/locks up&lt;br /&gt;
||Details=This can be related to /tmp being too small. mysqld stores temporary tables in /tmp and as such, if a lot of queries happen and /tmp runs full this can cause one query to lock up whilst creating the tmp table and all other queries waiting to acquire the lock. There are two possible solutions to that problem: a.) Modify /etc/vservers/vserver-name/fstab and assign more memory to the tmpfs of /tmp and b.) remove the /tmp entry from /etc/vservers/vserver-name/fstab completly. Especially on database servers with a rather high load the second one might be the preferred method. &lt;br /&gt;
If you prefer not to modify or disable tmpfs, you can reconfigure MySQL to use a different tmpdir such as &amp;quot;/var/tmp&amp;quot;.  For example, edit /etc/my.cnf (RHEL/CentOS) or create /etc/mysql/conf.d/mysqld_custom.conf (Debian) and add the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tmpdir = /var/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Afterwards, restart MySQL (/etc/init.d/mysqld restart) and then review MySQL variables (mysqladmin -uroot -p variables) to confirm &amp;quot;tmpdir&amp;quot; is no longer pointing to &amp;quot;/tmp&amp;quot;. |Signature=sp, jrklein}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Pure-FTP does not run inside a VServer?&lt;br /&gt;
||Details=That's because it has capabilities enabled, make sure you rebuild your distro's package passing also the `--without-capabilities` flag to configure.&lt;br /&gt;
|Signature=Pedro Algarvio, aka, s0undt3ch}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why do neither sshd nor crond (vixie-cron) work correctly in my CentOS / Fedora guest? I get 'pam_loginuid(crond:session): set_loginuid failed opening loginuid' and similar lines in my logs.&lt;br /&gt;
||Details=Took me a while to figure this out, and it turned out to be mentioned in the old wiki. Here is the solution on how to solve a common problem with sshd / crond, somehow related to selinux and auditing:&lt;br /&gt;
&lt;br /&gt;
pam authentication (also used with openssh) enables &amp;quot;pam_loginuid.so&amp;quot; in the /etc/pam.d/* files. Comment those out as they are not necessary and will not load within a guest anyway. This probably is also necessary on updates later on, if the configs get changed. You therefore may add the following command line to a cronjob file or your software update script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/bin/sed --in-place -e &amp;quot;s/^session.*required.*pam_loginuid.so/# session\trequired\tpam_loginuid.so/g&amp;quot; /etc/pam.d/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UPDATE:''' If you are compiling your own kernel this can be fixed system-wide by setting CONFIG_AUDIT_LOGINUID_IMMUTABLE=n in kernels .config file.&lt;br /&gt;
&lt;br /&gt;
|Signature=patrick, SwenTjuln}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do i install nagios-plugins on a Gentoo guest?&lt;br /&gt;
||Details=Unfortunately, the nagios-plugins ./configure scripts wants to ping 127.0.0.1 which is not available inside a guest. Therefore you have to build nagios-plugins outside the guest.&lt;br /&gt;
The easiest way to do this from the host (assuming the guest is running) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;xid&amp;gt; -- chroot /vservers/&amp;lt;name&amp;gt; emerge nagios-plugins -va&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=Hollow}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Somebody runs ntpd in guest and you can't use ntpdate in host?&lt;br /&gt;
||Details=Try to run ntpdate with options -u :&lt;br /&gt;
 ntpdate -u ntp.domain.xy&lt;br /&gt;
or you can use command:&lt;br /&gt;
 chbind --nid 42 --ip 1.2.3.4 -- ntpdate ntp.domain.xy&lt;br /&gt;
where IP will be the IP of host.&lt;br /&gt;
|Signature=Punkie/Bertl}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Start / Stop a VServer ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I make a vserver guest start by default?&lt;br /&gt;
||Details=At least on Debian, I can tell you how to do it with the new-style config. If your guest is called &amp;quot;derjohn&amp;quot; and you want it to be started somewhere at the of your bootstrap process, then do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;default&amp;quot; &amp;gt; /etc/vservers/derjohn/apps/init/mark&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to start it earlier, please read the init script &amp;quot;/etc/init.d/util-vserver&amp;quot; to find out how to do it. In most cases you don't need to change this. On Debian the vservers are started at &amp;quot;20&amp;quot;, so after most other stuff is up (networking etc.).&lt;br /&gt;
&lt;br /&gt;
Besides that I created a small helper script for managing the autostart foo: ((vserver-autostart))|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=My host works, but when I start a guest it says that it has a problem with chbind.&lt;br /&gt;
||Details=You are probably using util-vserver &amp;lt;= 0.30.209, which does use dynamic network contexts internally (With 0.30.210 this fact changed). So if you compiled your kernel without dynamic contexts, you may start guests, but you can't use the network context.The solution is either to switch to .210 util (or Hollow's toolset) or compile the kernel with dynamic network contexts.&lt;br /&gt;
SE Keyword: invalid option `nid' testme.sh&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is old-style and new-style config?&lt;br /&gt;
||Details=Old-style config refers to a single text-file that contains all the configuration settings. With new-style config the configuration is split into several directories and files. You should probably go for new-style config if you are asking.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I reboot/halt guests?&lt;br /&gt;
||Details=It depends. &lt;br /&gt;
For legacy Linux-VServer (i.e. 1.2.x), you have to replace /sbin/halt in the guests with vreboot and start rebootmgr in the host. You also need to have a &amp;lt;guest&amp;gt;.conf file in /etc/vservers for each guest. Please have a look at /etc/init.d/rebootmgr.&lt;br /&gt;
For Linux-VServer 2.0+, sys_reboot has been virtualized to do the right thing. No changes are needed in guests. Please note that some things depend on the init style used by the guest : read [[util-vserver:InitStyles]]&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the initial PATH?&lt;br /&gt;
||Details=By default, vserver uses the 'sysv' startup style, which mimics the init process by running the 3rd runlevel through '/etc/init.d/rc 3' (or '/etc/rc.d/rc 3'). Usually this 'rc' script uses a hard-coded PATH. In the case it doesn't, util-vserver also mimics init's default PATH through /etc/vservers/.defaults/apps/init/environment, or if not present /usr/local/lib/util-vserver/defaults/environment. Beware that all those default PATH usually do not include /usr/local.&lt;br /&gt;
|Signature=daniel_hozac&amp;amp;Beuc}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to start a guest i get this message &amp;quot;/proc/uptime can not be accessed. Usually, this is caused by procfs-security. Please read the FAQ for more details&amp;quot;?&lt;br /&gt;
||Details=After a reboot you need to run the vprocunhide script. If running this script causes many errors to print on the screen, try checking the kernel you have booted with (perhaps it does not have the linux-vserver extensions enabled).&lt;br /&gt;
|Signature=mattzerah}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to start a guest i get this message &amp;quot;vsched: vc_set_sched(): Function not implemented&amp;quot;.  &lt;br /&gt;
||Details=After an upgrade of the kernel/tools if you used the old scheduler function you must convert them to cgroup cpu limits. If you do not want limits search and remove/rename /etc/vservers/*/sched/ and the guest will start again. This might also happen when you use a newer kernel patch but did not yet update the vserver utils to a recent version (Thorsten).&lt;br /&gt;
|Signature=aqueos}}&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is SMP Supported?&lt;br /&gt;
||Details=Yes, on all SMP capable kernel architectures.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Do I really need the legacy-interfaces? What are these legacy-interfaces?&lt;br /&gt;
||Details=Since Linux-VServer is an ongoing project, new features might replace old ones, some might require a development version. Legacy-interfaces are available for backward compability (which might be removed someday) with Linux-VServer 1.2.x.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I have a vserver running on a Linux kernel with preemption. Is VServer &amp;quot;preempt&amp;quot; safe?&lt;br /&gt;
||Details=There are no known issues about running vserver on a preemption enabled kernel. I would like to add, that the vserver kernelhackers would probably exclude that option in 'make menuconfig' if there would be an incompatibility. Just my $.02 :)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=32 vs 64 Bit? What should I take?&lt;br /&gt;
||Details=If you have the choice make the host a 64 bit one. You can run a guest as 32 bit or as 64 bit on a 64 bit host. To run it as 32 bit, you need to compile the x86_64 (a.k.a. AMD64) with the following options:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[*] Kernel support for ELF binaries&lt;br /&gt;
&amp;lt;M&amp;gt; Kernel support for MISC binaries&lt;br /&gt;
[*] IA32 Emulation &amp;lt;---- without that, the entire 32bit API is not present&lt;br /&gt;
&amp;lt;M&amp;gt;   IA32 a.out support  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can force the guest to behave like a 32 environment like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo linux_32bit &amp;gt; /etc/vservers/$NAME/personality&lt;br /&gt;
echo i686 &amp;gt; /etc/vservers/$NAME/uts/machine&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(thanks cehteh for the hint!)&lt;br /&gt;
&lt;br /&gt;
But you can force debootstrap to put 32 bit binaries into the guest by 'export ARCH=i386';&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=i386 ; vserver build .... &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On debian when using the newvserver script &amp;quot;export ARCH=i386&amp;quot; has no effect, just use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newvserver --arch i386 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On debian debootstrap can also be gived the arch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver myguest \&lt;br /&gt;
build -m debootstrap -n myguest \&lt;br /&gt;
--hostname myguest.mydomain.com \&lt;br /&gt;
-- -d squeeze -- \&lt;br /&gt;
--arch=amd64  (or i386 if you want 32bit)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What does the guest privacy option do in the kernel settings ?&lt;br /&gt;
||Details=&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;i was wondering about the real thing that guest privacy does. &lt;br /&gt;
#ifdef  CONFIG_VSERVER_PRIVACY&lt;br /&gt;
#define VS_ADMIN_P      (0)&lt;br /&gt;
#define VS_WATCH_P      (0)&lt;br /&gt;
#else&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &amp;gt; Does it just prevent the spectator context ? &lt;br /&gt;
 &lt;br /&gt;
it prevents the spectator context and the admin &lt;br /&gt;
functionality in all cases which are privacy&lt;br /&gt;
sensitive, which includes:&lt;br /&gt;
&lt;br /&gt;
 - ptrace&lt;br /&gt;
 - devmapper&lt;br /&gt;
 - devpts&lt;br /&gt;
 - inode tag permissions&lt;br /&gt;
 - mountinfo&lt;br /&gt;
 - kill/signal&lt;br /&gt;
 - netlink dumps&lt;br /&gt;
 - tun control&lt;br /&gt;
 - iopriority&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &amp;gt; What security do it bring to the system ?&lt;br /&gt;
&lt;br /&gt;
together with the VXF_STATE_ADMIN it can be&lt;br /&gt;
used to secure a guest (to some degree) from&lt;br /&gt;
unwanted access from the host admin, of course,&lt;br /&gt;
as the admin can change the kernel, this is a&lt;br /&gt;
voluntary feature which mostly prevents certain&lt;br /&gt;
kinds of accidential peeking or guest modification&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=ghislain}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distribution specific questions ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=VServer is included in the stable Debian GNU/Linux for years now. What VS version did they include?&lt;br /&gt;
||Details=There is no support in Debian for Linux-Vserver since the Wheezy release. Debian Squeeze included a 2.6.32 based kernel-package called 2.6.32-5-vserver-ARCH. This contained VServer 2.3.0.36.29.6 with some additional fixes.&lt;br /&gt;
|Signature=scientes}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Were can I get newer versions of VServer as ready made packages for Debian?&lt;br /&gt;
||Details= There are a number of locations&lt;br /&gt;
* http://repo.psand.net/info/ has Debian Lenny, Squeeze and Wheezy repositories. Many kernel versions are present. Currently (Febraury 2013) 3.2 kernels are being maintained for Wheezy, with additional packages for 3.4 and 3.10 also available. Architectures available are i386 and amd64. This repository also contains curremt util-vserver builds. Build will shortly begin for Jessie.&lt;br /&gt;
* http://www.lihas.de/anleitungen-und-service/linux-vserver-kernel-fuer-debian/linux-vserver-kernel-english details their automatically built repository currently for 3.4 kernels. Building, patching and testing for the kernels is automated.&lt;br /&gt;
&lt;br /&gt;
Older unmaintained repositories are/were here:&lt;br /&gt;
&lt;br /&gt;
* http://linux-vserver.derjohn.de/ - &amp;quot;my kernels are always 'devel' branch&amp;quot; (derjohn). This repo contain kernels up to 2.6.29 for amd64, 2.6.26 for i386.&lt;br /&gt;
* http://backports.debian.org/ contains 2.6.32 backports for Lenny at time of writing (11th May 2010)&lt;br /&gt;
* http://zbla.net/debian/ Unofficial debian vserver packages '''WARNING : i386 packets are compiled for 64bits !''' apt source line: ''deb http://zbla.net/debian/ ./'' (N/A as of 2011/12/27)&lt;br /&gt;
|Signature=Gremble&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Were can I get newer versions of VServer as ready made packages for Ubuntu?&lt;br /&gt;
||Details= There is only one location for &lt;br /&gt;
*http://repo-ubuntu.psand.net/dists/ is the only repository maintained for Ubuntu. It covers the same builds as http://repo.psand.net/info/ - and information there should be used, replacing 'precise' as distro in your /etc/apt/source.list.&lt;br /&gt;
|Signature=Gremble&lt;br /&gt;
}}&lt;br /&gt;
== Misc ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why isn't there a device /dev/xyz within a guest?&lt;br /&gt;
||Details=Device nodes allow userspace to access hardware (or virtual resources). Creating a device node inside the guest's namespace will give access to that device, so for security reasons, the number of 'given' devices is small.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want to (re)mount a virtual filesystem (like tmpfs) in a running guest ... but the guest has no rights (capability) to (re)mount?&lt;br /&gt;
||Details=I take as example your /tmp partition within the guest is too small, what will be likely the case if you stay with the 16MB default (vserver build mounts /tmp as 16 MB tmpfs!).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vnamespace -e XID  mount -t tmpfs -o remount,size=256m,mode=1777 none /var/lib/vservers/&amp;lt;guest&amp;gt;/tmp/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(if there's a problem, try expanding the symlinks in the mount path)&lt;br /&gt;
Be warned that the guest will not recognize the change, as the /etc/mtab file is not updated when you mount like this. To permanently change the mount, edit /etc/vserver/&amp;lt;guest&amp;gt;/fstab on the host.&lt;br /&gt;
&lt;br /&gt;
If you get:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount: can't find /var/lib/vservers/&amp;lt;guest&amp;gt;/tmp in /etc/fstab or /etc/mtab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then try instead:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e builder chroot /var/lib/vservers/&amp;lt;guest&amp;gt;/ mount -o remount,size=64m,mode=1777 /tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn/BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I bind mount a host directory inside a running guest?&lt;br /&gt;
||Details=There are two ways to do this: one is to enter the bind mount in the guest fstab and restart the guest.&lt;br /&gt;
&lt;br /&gt;
To understand the other way, let me explain how mount namespaces work.&lt;br /&gt;
&lt;br /&gt;
Every guest has two mount namespaces associated with it: one &amp;quot;''management namespace''&amp;quot; and one &amp;quot;''operational namespace''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On starting the guest, first the management namespace is created as a copy of the host namespace (which means that everything that was mounted on the host is mounted in the new namespace as well). This has unwelcome side effects: for example, if you had a cdrom mounted while starting the guest, you wouldn't be able to eject it until you stop the guest even if you umount it on the host, because it's still mounted in the guest. Therefore, the namespace is ''cleaned up'': filesystems that are mounted outside the root of the guest get unmounted in the guest namespace.&lt;br /&gt;
&lt;br /&gt;
Subsequently, the operational namespace of the guest is created as a copy of the management namespace, and the guest's processes are started in it.&lt;br /&gt;
&lt;br /&gt;
To bind mount a host directory in the guest, you must first make that host directory visible in the management namespace of the guest. This is automatically the case if the directory resides inside a mountpoint that exists in the guest namespace as well; however, if the guest config referenced no part of this mountpoint (or it didn't yet exist when you started the guest), then the cleanup mentioned above removed it from the guest's management namespace and you need to re-add it.&lt;br /&gt;
&lt;br /&gt;
Let's assume, as an example, that we want a guest to see a subdirectory, called &amp;lt;tt&amp;gt;foo&amp;lt;/tt&amp;gt;, of the cdrom we just mounted on the host (e.g. under &amp;lt;tt&amp;gt;/media/cdrom&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Let's enter the management namespace of the guest (that's what &amp;lt;tt&amp;gt;-i 0&amp;lt;/tt&amp;gt; is for):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vnamespace -i 0 -e &amp;lt;guest-xid&amp;gt; -- /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you have access to all host devices; mount the device that contains your directory wherever you want, but you may prefer to mount it in the same location you used on the host. (Note, though, that it's not even necessary for the device to be mounted in the host namespace at all.)&lt;br /&gt;
&lt;br /&gt;
It's likely best to use &amp;lt;tt&amp;gt;mount -n&amp;lt;/tt&amp;gt; lest your host &amp;lt;tt&amp;gt;/etc/mtab&amp;lt;/tt&amp;gt; get polluted with mounts from other namespaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -n /dev/sr0 /media/cdrom&lt;br /&gt;
# exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We're now back in the host namespace. &amp;lt;tt&amp;gt;vmount&amp;lt;/tt&amp;gt; can now be used to bind mount &amp;lt;tt&amp;gt;/media/cdrom/foo&amp;lt;/tt&amp;gt; inside a running guest (in this example, under &amp;lt;tt&amp;gt;/foo&amp;lt;/tt&amp;gt; inside the vserver root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vmount guestname -- --bind /media/cdrom/foo /mnt/foo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=[[User:KornAndras|Guy-]] 01:31, 10 January 2012 (UTC)}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I mount a device present on the host under a directory in a running guest?&lt;br /&gt;
||Details=Use something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;guestname&amp;gt; mount -n /dev/&amp;lt;device&amp;gt; /vservers/&amp;lt;guest&amp;gt;/place/you/want/to/mount/it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This device can be unmounted with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;guestname&amp;gt; umount -n /vservers/&amp;lt;guest&amp;gt;/place/you/want/to/mount/it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|Signature=derjohn/BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Does anyone know how to increase the size of /tmp within a vserver w/o restarting?&lt;br /&gt;
||Details=Use the remount option for mount.&lt;br /&gt;
 # vnamespace -e XID mount -n -t tmpfs -o remount,size=32m tmpfs /&amp;lt;vdir&amp;gt;/&amp;lt;guest&amp;gt;/tmp&lt;br /&gt;
or something like that.  The arguments are needed since mount is not going to be using /etc/fstab for the information and the version of /proc/mounts is best understood by&lt;br /&gt;
 # vnamespace -e XID cat /proc/mounts.&lt;br /&gt;
See [[Frequently_Asked_Questions#I want to (re)mount a partition in a running guest ... but the guest has no rights (capability) to (re)mount?]]&lt;br /&gt;
|Signature=derjohn/dhozac}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=#1 ERROR:  capset(): Operation not permitted&lt;br /&gt;
||Details=capabilities are not enabled in kernel-setup&lt;br /&gt;
please check that CONFIG_SECURITY_CAPABILITIES is loaded or included in the kernel. ( check with &amp;quot;cat /path_to_kernel/.config | grep -i cap &amp;quot;) &lt;br /&gt;
(2.6.11.5-vs-1.9.5 + 0.30-205)&lt;br /&gt;
|Signature=IrcQuestions}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I make 'vserver start' mount the root filesystem?&lt;br /&gt;
||Details=Mount it via /etc/vservers/vserver-name/fstab, make sure to set the option 'dev' e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/drbd0     /       xfs     rw,dev          0 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=AdrianReyer}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I deleted a guest's directory without shutting it down. Now I have a &amp;quot;ghost&amp;quot; running. Is there any possibility to get it out of proc without rebooting?&lt;br /&gt;
||Details=&lt;br /&gt;
 vkill --xid &amp;lt;xid&amp;gt; -s 15; sleep 2; vkill --xid &amp;lt;xid&amp;gt; -s 9&lt;br /&gt;
&lt;br /&gt;
You will also need to remove guest's ip, for example with:&lt;br /&gt;
 ip addr del &amp;lt;ip&amp;gt; dev eth0&lt;br /&gt;
|Signature=daniel_hozac &amp;amp; gebura }}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When using nice and su (for example, in the updatedb cron job), I get: su: Permission denied. What does it mean?&lt;br /&gt;
||Details=A guest cannot lower its nice value - and that's what 'su' does through pam_limits which sets a nice value of 0. You can see it through strace:&lt;br /&gt;
 $ strace nice su nobody&lt;br /&gt;
 [...]&lt;br /&gt;
 setpriority(PRIO_PROCESS, 0, 0)         = -1 EACCES (Permission denied)&lt;br /&gt;
You can use 'su nobody -c nice some_cmd' instead.&lt;br /&gt;
&lt;br /&gt;
The problem is caused by the fact that host system is setting limits for guests (when instructed to do so) and the dropped capability dissallows processess on guest systems to change and increase them later. That means no process on a guest can lower nice value above the limit set by host.&lt;br /&gt;
&lt;br /&gt;
If the pam_limits module is activated on a guest system it will first try to '''reset nice value to 0''' even if &amp;lt;tt&amp;gt;/etc/security/limits.conf&amp;lt;/tt&amp;gt; file is empty or even if there are lower priority limits set in it. The pam_limits module does that since [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=241663 its developers decided] that it should reset some limits to defaults and start from scratch when applying new restrictions. Unfortunately, already limited guest system won't be able to do it since resetting nice value to 0 means increasing the limit which is forbidden. See [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311058 Debian Bug report logs - #311058] for more information about that Debian bug.&lt;br /&gt;
&lt;br /&gt;
See also [[Frequently_Asked_Questions#Cron is not working on my guest system (which is Debian). How can I fix it?|Cron is not working…]]&lt;br /&gt;
&lt;br /&gt;
|Signature=daniel_hozac &amp;amp; Beuc &amp;amp; Paweł Wilk}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Cron is not working on my guest system (which is Debian). How can I fix it?&lt;br /&gt;
||Details=On a guest system the cron daemon may not work properly. When looking into the log file (e.g. &amp;lt;tt&amp;gt;/var/log/syslog&amp;lt;/tt&amp;gt;) the following message may appear repeatedly:&lt;br /&gt;
 CRON[xxxxx]: Permission denied&lt;br /&gt;
&lt;br /&gt;
Similar thing may happen with the &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt; when trying to execute a command as root.&lt;br /&gt;
&lt;br /&gt;
It's not the problem in Cron but in the pam_limits module on a guest system (see [[Frequently_Asked_Questions#When using nice and su (for example, in the updatedb cron job), I get: su: Permission denied. What does it mean?|FAQ:When using nice and su…]] for more information about the cause).&lt;br /&gt;
&lt;br /&gt;
There are 4 ways to solve or work-around this problem:&lt;br /&gt;
&lt;br /&gt;
'''1. Allowing guests to reset resource limits:'''&lt;br /&gt;
&lt;br /&gt;
It's clean solution but you may expect some guest processes increasing their limits because not everything is controlled by PAM. It also breaks centralized resources limiting approach so a guest can do bad things that may cause other guests and host to be overloaded and unresponsive.&lt;br /&gt;
&lt;br /&gt;
To apply it you have to add &amp;lt;tt&amp;gt;CAP_SYS_RESOURCE&amp;lt;/tt&amp;gt; flag to &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/bcapabilities&amp;lt;/tt&amp;gt; (2.6 kernels).&lt;br /&gt;
&lt;br /&gt;
See [[util-vserver:Capabilities_and_Flags|Capabilities and Flags]] for more information.&lt;br /&gt;
&lt;br /&gt;
'''2. Disabling pam_limits on a guest systems:'''&lt;br /&gt;
&lt;br /&gt;
This workaround is easy and works fine when your guest systems aren't really multiuser but rather service boxes. It disables setting of the resource limits by PAM so the limits can only be set globally for the whole guest (using rlimits or cgroups on a host) but never increased inside of the guest system.&lt;br /&gt;
&lt;br /&gt;
To apply it just enter the guest and edit the files listed below, commenting out any line containing &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 /etc/pam.d/su&lt;br /&gt;
 /etc/pam.d/sudo&lt;br /&gt;
 /etc/pam.d/cron&lt;br /&gt;
&lt;br /&gt;
You can also use this one-liner on a guest:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/bin/sed --in-place -e &amp;quot;s/^\s\?session.*pam_limits.so.*/\#\0/g&amp;quot; /etc/pam.d/{su,sudo,cron}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Allowing guest's pam_limits to set limits when possible:'''&lt;br /&gt;
&lt;br /&gt;
This workaround allows you to have working &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt; inside a guest system and global limits set by a host system. What's the catch? The problematic PAM module won't fully work for the root user on a guest system as expected and there might appear some PAM's warnings in guest's &amp;lt;tt&amp;gt;auth.log&amp;lt;/tt&amp;gt;. Since using pam_limits to limit regular user processes is far more frequent than using it to limit root processes, this solution may be a good compromise. It is about setting a proper limits in pam_limits configuration and about setting this PAM module in a way that its function is optional (instead of required). The last change makes PAM to continue with session even if pam_limits encounters some error during setting limits (it usually applies to superuser sessions).&lt;br /&gt;
&lt;br /&gt;
The not so nice news is that there might be a need of keeping guest's limits configuration up to date according to limits globally set for a guest. The limits set in pam_limits configuration file(s) shouldn't be higher (lower in case of nice value) than global guest's limits.&lt;br /&gt;
&lt;br /&gt;
To apply it enter the guest and edit the files listed below, replacing occurences of &amp;lt;tt&amp;gt;required&amp;lt;/tt&amp;gt; by &amp;lt;tt&amp;gt;optional&amp;lt;/tt&amp;gt; in the lines containing &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 /etc/pam.d/su&lt;br /&gt;
 /etc/pam.d/sudo&lt;br /&gt;
 /etc/pam.d/cron&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # Sets up user limits, please define limits for cron tasks&lt;br /&gt;
 # through /etc/security/limits.conf&lt;br /&gt;
 session       optional        pam_limits.so&lt;br /&gt;
&lt;br /&gt;
Then on a guest system create the file &amp;lt;tt&amp;gt;/etc/security/limits.d/01-fixpam.conf&amp;lt;/tt&amp;gt; containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*         -        priority        X   # replace X with your guest's nice value &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can automate this process to happen automagically for any guest by creating the startup script named &amp;lt;tt&amp;gt;/etc/vservers/.defaults/scripts/post-start.d/01-pamfix&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# This script tries to fix pam_limits entries&lt;br /&gt;
# to make it possible for PAM in a guest system to&lt;br /&gt;
# set its own limits.&lt;br /&gt;
&lt;br /&gt;
PAM_DIR=&amp;quot;etc/pam.d&amp;quot;&lt;br /&gt;
PAM_SERVICES=&amp;quot;su sudo cron&amp;quot;&lt;br /&gt;
LIMITS_FILE=&amp;quot;etc/security/limits.d/01-pamfix.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
vname=&amp;quot;$2&amp;quot;&lt;br /&gt;
[ -z &amp;quot;$vname&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
&lt;br /&gt;
vcfg=$( /usr/sbin/vserver-info &amp;quot;$vname&amp;quot; CFGDIR )&lt;br /&gt;
[ ! -d &amp;quot;$vcfg&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
&lt;br /&gt;
for s in $PAM_SERVICES&lt;br /&gt;
do&lt;br /&gt;
        pamfile=&amp;quot;${PAM_DIR#\/}/$s&amp;quot;&lt;br /&gt;
        [ -f &amp;quot;$pamfile&amp;quot; ] &amp;amp;&amp;amp; /bin/sed --in-place -e &amp;quot;s/\(^\s\?session.*\)required\(.*pam_limits.so.*\)/\1optional\2/g&amp;quot; &amp;quot;$pamfile&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
[ ! -f &amp;quot;${vcfg}/nice&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
nval=$( /usr/bin/head -1 &amp;quot;${vcfg}/nice&amp;quot; )&lt;br /&gt;
[ -n &amp;quot;$nval&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;* - priority $nval # (added by vserver startup script)&amp;quot; &amp;gt; &amp;quot;${LIMITS_FILE#\/}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4. Disabling resource limits for a guest:'''&lt;br /&gt;
&lt;br /&gt;
It easy, clean and… unsafe solution. You just have to not set resource limits (e.g. priority, nice value) for a guest or set the nice value limit to 0 on a host system. Resetting it later by guest's &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt; will not generate an error.&lt;br /&gt;
&lt;br /&gt;
|Signature=Paweł Wilk}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I handle NFS mounts within in a guest?&lt;br /&gt;
||Details=There are at least four ways.&lt;br /&gt;
&lt;br /&gt;
In any case, you probably want to force the nfs version to 3 or lower to avoid id mapping issues (one symptom of having an id mapping issue is that &amp;lt;tt&amp;gt;no_root_squash&amp;lt;/tt&amp;gt; appears to be ignored). You can check whether the mount uses nfsv4 by looking at &amp;lt;tt&amp;gt;/proc/mounts&amp;lt;/tt&amp;gt; inside the guest. You can force the protocol version to 3 by passing the mount options &amp;lt;tt&amp;gt;nfsvers=3,mountvers=3&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''1)''' Mount the NFS share from the host OS and let vserver guest access it as part of it's file system.&lt;br /&gt;
&lt;br /&gt;
''mount --bind'' may also be beneficial in this scenario.&lt;br /&gt;
&lt;br /&gt;
'''2)''' Use util-vserver and create a ''fstab.remote'' file in the /etc/vserver/&amp;lt;vserver_name&amp;gt; directory. Populate this with the NFS shares and they will be mounted in the context of the vserver guest.&lt;br /&gt;
&lt;br /&gt;
See http://www.nongnu.org/util-vserver/doc/conf/configuration.html&lt;br /&gt;
&lt;br /&gt;
Note that as of 0.30.216-pre3000 and kernel 3.0.4-vs2.3.1-pre10.1, the mount request will appear to originate from the IP of the host, not the guest. It is unclear (to [[User:KornAndras|Guy-]]) whether this is a bug.&lt;br /&gt;
&lt;br /&gt;
'''3)''' Add capabilities to the vserver guest instance to grant sufficient rights to allow NFS mounts.&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/vserver/&amp;lt;vserver_name&amp;gt;/bcapabilities&lt;br /&gt;
 SYS_ADMIN&lt;br /&gt;
Add the following to /etc/vserver/&amp;lt;vserver_name&amp;gt;/ccapabilities&lt;br /&gt;
 SECURE_MOUNT&lt;br /&gt;
 BINARY_MOUNT&lt;br /&gt;
&lt;br /&gt;
See [[Capabilities_and_Flags]] for more information about vserver capabilities.&lt;br /&gt;
&lt;br /&gt;
If you want the NFS shares to be mounted when the guest starts, add them to /etc/vserver/&amp;lt;vserver_name&amp;gt;/fstab.&lt;br /&gt;
&lt;br /&gt;
'''4)''' Before starting the guest, make a directory of the host &amp;quot;shared&amp;quot; using &amp;lt;tt&amp;gt;mount --make-shared /path/to/dir&amp;lt;/tt&amp;gt;, then set up autofs to mount nfs shares under &amp;lt;tt&amp;gt;/path/to/dir/sharename&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
rbind mount subdirectories of &amp;lt;tt&amp;gt;/path/to/dir&amp;lt;/tt&amp;gt; in the guest from its fstab.&lt;br /&gt;
&lt;br /&gt;
This setup is good if the nfs shares are not often needed, and especially if they're occasionally needed by more than one guest. (As of September 2011, running autofs inside a vserver guest didn't work for me. --[[User:KornAndras|Guy-]] 01:05, 30 October 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
||Signature=martindk}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=vserver start/stop/enter fails with something like &amp;quot;vnamespace: execvp(&amp;quot;/usr/sbin/vserver&amp;quot;): No such file or directory&amp;quot; ?&lt;br /&gt;
||Details=Check whether ''/usr'' is mounted in the namespace you are working with.&lt;br /&gt;
&amp;lt;pre&amp;gt;vnamespace -e &amp;lt;guest&amp;gt; cat /proc/mounts&amp;lt;/pre&amp;gt;&lt;br /&gt;
If there is no ''/usr'', you can fix your problem with simply mounting it using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;vnamespace -e &amp;lt;guest&amp;gt; mount /dev/&amp;lt;device&amp;gt; /usr&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Signature=sim0n}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=The command vserver &amp;lt;$server&amp;gt; start gives '/etc/init.d/rc: line 74: /etc/default/rcS: No such file or directory', what do I do? &lt;br /&gt;
||Details=The vserver has not been correctly installed, this has several reasons&lt;br /&gt;
check your install log and it should tell you something about that your server didn't get installed properly&lt;br /&gt;
* use stable distribution of debian as server (debootstrap may be different over the versions)&lt;br /&gt;
* deny_mount, deny_caps and deny_pivot should be off if your running grsec.&lt;br /&gt;
&lt;br /&gt;
||Signature=Dude}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How could I rename a vserver directory?&lt;br /&gt;
||Details=Please note : this procedure renames the '''directory''', not the '''hostname''' !&lt;br /&gt;
#Stop the vserver in question&lt;br /&gt;
#rename the &amp;lt;tt&amp;gt;/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
#rename the &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/run&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/var/run/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/vdir&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/.defaults/vdirbase/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/cache&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/.defaults/cachebase/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/var/run/vservers.rev/&amp;lt;server XID&amp;gt;&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Start the vserver in question. It should start properly.&lt;br /&gt;
&lt;br /&gt;
|Signature=FlorianD (from ''hillct'' page in old wiki)}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=what if i see my vserver in vserver-stat but with no name ?&lt;br /&gt;
||Details=the link in /var/run/vservers is missing&lt;br /&gt;
Just do a :  cat /etc/vservers/&amp;lt;guest&amp;gt;/context &amp;gt;  /var/run/vservers/&amp;lt;guest&amp;gt;&lt;br /&gt;
check that the &amp;lt;guest&amp;gt; is the good one by using  vuname --get --xid &amp;lt;context&amp;gt;  with the context you have in the vserver-stat listing.&lt;br /&gt;
|Signature=IrcQuestions}}&lt;br /&gt;
&lt;br /&gt;
== Upgrade from 2.0 to 2.2 ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I now get errors like &amp;quot;ncontext: vc_net_create(): Invalid argument; dynamic contexts disabled.&amp;quot; on startup. Vservers are not started&lt;br /&gt;
||Details=Dynamic context are disabled by default and are deprecated. For example, tagxid and network checks won't be useable with dynamic ids. Now you should manually assign a explicit context to your vservers, like&lt;br /&gt;
 echo 101 &amp;gt; /etc/vservers/myvserv/context&lt;br /&gt;
ADDENDUM: please consider that valid static contexts are between 2 and 49151 ( daniel_hozac on IRC ) otherwise you will end up with unexplainable error &amp;quot;ncontext: vc_net_migrate(): No such process&amp;quot; when trying to start the vserver.&lt;br /&gt;
&lt;br /&gt;
|Signature=daniel_hozac&amp;amp;Beuc}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I assign a static context to an existing vserver?&lt;br /&gt;
||Details=Simple ;) See the answer above. &lt;br /&gt;
|Signature=gcc}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Since upgrading to a newer VS version my guest complains about &amp;quot;vsched: non-numeric value specified for '--priority_bias&amp;quot; at start time. What's wrong?&lt;br /&gt;
||Details=The scheduler paramters changed.You can use this (ugly) script to convert them or do it by hand:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /usr/local/sbin/vserver-convert-schedule-to-scheddir&lt;br /&gt;
#/bin/sh&lt;br /&gt;
mkdir /etc/vservers/$1/sched&lt;br /&gt;
sed -e 1p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/fill-rate&lt;br /&gt;
sed -e 2p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/interval&lt;br /&gt;
sed -e 3p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens&lt;br /&gt;
sed -e 4p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens-min&lt;br /&gt;
sed -e 5p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens-max&lt;br /&gt;
&lt;br /&gt;
mv /etc/vservers/$1/schedule /etc/vservers/$1/schedule.converted.see.scheddir&lt;br /&gt;
&lt;br /&gt;
# see: http://oldwiki.linux-vserver.org/Scheduler+Parameters&lt;br /&gt;
# see: http://www.nongnu.org/util-vserver/doc/conf/configuration.html#sched&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Since upgrading to a newer VS version my guest doesn't have the amount of shared memory (SHM / SHMMAX / SHMALL ) as it had in the former version. What changed?&lt;br /&gt;
||Details=Every VS version that runs on a kernel &amp;gt;= 2.6.19 offers sysctl values per guest. This has to do with the 'ipc namespace' feature that was added to the mainline kernel in version 2.6.19. Linux-VServer uses that feature to give each guest a separate 'ipc namespace' and thus 'own' sysctl values per guest. Because shmmax is such a sysctl value, you have to set it per guest.&lt;br /&gt;
Here is an example how to do so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0 -p&lt;br /&gt;
# echo kernel.shmall &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0/setting&lt;br /&gt;
# echo 134217728 &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0/value&lt;br /&gt;
# mkdir /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1 -p&lt;br /&gt;
# echo kernel.shmmax &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1/setting&lt;br /&gt;
# echo 134217728 &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It's also explained on the geat flower page:&lt;br /&gt;
# see: http://www.nongnu.org/util-vserver/doc/conf/configuration.html -&amp;gt; Look for &amp;quot;sysctl&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After changing those values, restart your guest, enter it and check if the values are set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sysctl -a | grep shm&lt;br /&gt;
...&lt;br /&gt;
kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change a value for a running guest, on the host use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vspace -e CONTEXTID --ipc sysctl -w kernel.shmall=134217728&lt;br /&gt;
 vspace -e CONTEXTID --ipc sysctl -w kernel.shmmax=134217728&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Signature=derjohn&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;br /&gt;
[[Category:Categories]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Frequently_Asked_Questions</id>
		<title>Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Frequently_Asked_Questions"/>
				<updated>2013-09-29T09:43:50Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: Updated FAQ regarding Debian Repositories&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Icon-Caution.png|left]]&lt;br /&gt;
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 look at the [http://oldwiki.linux-vserver.org old wiki] to find the information not migrated yet.&lt;br /&gt;
&lt;br /&gt;
'''To ease migration we created a [[List of old Documentation pages]].'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CURRENTLY THE CONTENT OF THE OLD WIKI FAQ (AND MORE) IS BEING MIGRATED TO THIS PAGE (TASK: DERJOHN)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the status of Linux-VServer?&lt;br /&gt;
||Details=Linux-VServer has more than a decade of maturity and is actively developed. Two projects are similar to Linux-VServer, [[http://lxc.sf.net LXC]], and [[http://openvz.org OpenVZ]]. Of the two, OpenVZ is the more mature and offers some similar functionality to Linux-VServer. LXC is solely based on the kernel mechanisms such as cgroups that are present in modern kernels. These kernel mechanisms will continue to be refined and isolation will mature. As that occurs, Linux-VServer will take advantage of those new features separately from LXC and continue to provide the same robust user interface that it does currently. Currently, LXC offers significantly less functionality and isolation than Linux-vserver. LXC will eventually be a robust wrapper around kernel mechanisms but is still under heavy development and not considered ready for production use.&lt;br /&gt;
|Signature=beck}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is a 'Guest'?&lt;br /&gt;
||Details=To talk about stuff, we need some naming. The physical machine is called 'Host' and the 'main' context running the Host Distro is called 'Host Context'. The virtual machine/distro is called 'Guest' and basically is a Distribution (Userspace) running inside a 'Guest Context'.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What kind of Operating System (OS) can I run as guest?&lt;br /&gt;
||Details= With VServer you can only run Linux guests. The trick is that a guest does not run a kernel on its own (as XEN and UML do), it merely uses a virtualized host kernel-interface. VServer offers so called security contexts which make it possible to separate one guest from each other, i.e. they cannot get data from each other. Imagine it as a chroot environment with much more security and features.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is this a new project? When was it started?&lt;br /&gt;
||Details=The first public occurrence of Linux-VServer was Oct 2001. The initial mail can be found here: http://www.cs.helsinki.fi/linux/linux-kernel/2001-40/1065.html&lt;br /&gt;
So you can expect a mature software product which does its magic quite well (And hey, we have a version &amp;gt; 2.0!)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Which distributions did you test?&lt;br /&gt;
||Details=Some. Check out the wiki for ready-made guest images. But you can easily build own guest images, e.g. with Debian's debootstrap. Checkout [[Building Guest Systems]] how to do that.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is VServer comparable to XEN/UML/QEMU?&lt;br /&gt;
||Details=Nope. XEN/UML/QEMU and VServer are just good friends. Because you ask, you probably know what XEN/UML/QEMU are. VServer in contrary to XEN/UML/QEMU does not &amp;quot;emulate&amp;quot; any hardware you run a kernel on. The purpose of Linux VServer is to isolate (groups of) applications.  The isolation is done by the kernel (see [[Overview]] for a more detailed comparison). You can run a VServer kernel in a XEN/UML/QEMU guest. This is confirmed to work at least with Linux 2.6/vs2.0.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=With which version should I begin?&lt;br /&gt;
||Details=If you are new to VServer I recommend to try the latest stable kernel patch, and the latest util-vserver &amp;quot;alpha&amp;quot; release.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is VServer secure?&lt;br /&gt;
||Details=We hope so. It should be as least as secure as Linux is. We consider it much much more secure though.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Performance?&lt;br /&gt;
||Details=For a single guest, we basically have native performance. Some tests showed insignificant overhead (about 1-2%) others ran faster than on an unpatched kernel. This is IMVHO significantly less than other solutions waste, especially if you have more than a single guest (because of the resource sharing).&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the &amp;quot;great flower page&amp;quot;?&lt;br /&gt;
||Details=Well, [http://www.nongnu.org/util-vserver/doc/conf/configuration.html this page] contains all configuration options for util-vserver. The name of the page is derived from the stylesheet(s) it contains.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Resources usage ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Resource sharing?&lt;br /&gt;
||Details=Yes ....&lt;br /&gt;
* memory: Dynamically.&lt;br /&gt;
* CPU usage: Dynamically (token bucket)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Resource limiting?&lt;br /&gt;
||Details=You can put limits per guest on different subsystems.&lt;br /&gt;
* using ulimits and rlimits (rlimit is a new feature of kernel 2.6/vs2.0.) per guest, to limit the memory consumption, the number of processes or file-handles, ... : see [[Resource Limits]]&lt;br /&gt;
* CPU usage : see [[CPU Scheduler]]&lt;br /&gt;
* disk space usage : see [[Disk Limits and Quota]]&lt;br /&gt;
Note that you can only offer guaranteed resource availability with some ticks at the time.&lt;br /&gt;
|Signature=derjohn&amp;amp;xm}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I limit a guests RAM? I want to prevent OOM situations on the host!&lt;br /&gt;
||Details=First you can read [http://linux-vserver.org/Memory+Allocation] and [[Memory Limits]].&lt;br /&gt;
If you want a recipe, do this:&lt;br /&gt;
# Check the size of memory pages. On x86 and x86_64 is usually 4 KB per page. (on linux &amp;quot;getconf -a|grep PAGE&amp;quot; will give you the information)&lt;br /&gt;
# Create /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/&lt;br /&gt;
# Check your physical memory size on the host, e.g. with &amp;quot;free -m&amp;quot;. maxram = kilobytes/pagesize.&lt;br /&gt;
# Limit the guests physical RAM to value smaller then maxram:&amp;lt;pre&amp;gt;echo %%insertYourPagesHereSmallerThanMaxram%% &amp;gt; /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/rss &amp;lt;/pre&amp;gt;&lt;br /&gt;
# Check your swapspace, e.g. with 'swapon -s'. maxswap = swapkilobytes/pagesize.&lt;br /&gt;
# Limit the guest's maximum number of as pages to a value smaller than (maxram+maxswap): &amp;lt;pre&amp;gt; echo %%desiredvalue%% &amp;gt; /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/as &amp;lt;/pre&amp;gt;&lt;br /&gt;
# Correctly display the memory information inside the guest:&amp;lt;pre&amp;gt;echo &amp;quot;VIRT_MEM&amp;quot; &amp;gt;&amp;gt; /etc/vservers/&amp;lt;guest&amp;gt;/flags&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should be clear this can still lead to OOM situations. Example: You have two guests and your as limit per guest is greater than 50% of (maxram+maxswap). If both guests request their maximum at the same point in time, there will be not enough mem .....&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Disk I/O limiting? Is that possible?&lt;br /&gt;
||Details=Well, since vs2.1.1 Linux-VServer supports a mechanism called 'I/O scheduling', which appeared in the 2.6 mainline some time ago. The mainline kernel offers several I/O schedulers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/block/hdc/queue/scheduler&lt;br /&gt;
noop [anticipatory] deadline cfq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default since 2.6.18 in Sept 2006 is CFQ, described below, and prior to that was anticipatory a.k.a. &amp;quot;AS&amp;quot; ([[http://en.wikipedia.org/wiki/CFQ#Kernel_2.6.18_.2820_September_2006.29 Wikipedia]]). When running several guests on a host you probably want the I/O performance shared in a fair way among the different guests. The kernel comes with a &amp;quot;completely fair queueing&amp;quot; scheduler, CFQ, which can do that. (More on schedulers can be found at http://lwn.net/Articles/114770/)&lt;br /&gt;
This is how to set the scheduler to &amp;quot;cfq&amp;quot; manually:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root# echo &amp;quot;cfq&amp;quot; &amp;gt; /sys/block/hdc/queue/scheduler&lt;br /&gt;
root# cat /sys/block/hdc/queue/scheduler&lt;br /&gt;
noop anticipatory deadline [cfq]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Keep in mind that you have to do it on all physical discs. So if you run an md-softraid, do it to all physical /dev/hdXYZ discs!&lt;br /&gt;
If you run Debian there is a predefined way to set the /sys values at boot-time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get install sysfsutils&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# grep cfq /etc/sysfs.conf&lt;br /&gt;
block/sda/queue/scheduler = cfq&lt;br /&gt;
block/sdc/queue/scheduler = cfq&lt;br /&gt;
&lt;br /&gt;
# /etc/init.d/sysfsutils restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For non-vserver processes and CFQ you can set by which key the kernel decides about the fairness:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat /sys/block/hdc/queue/iosched/key_type&lt;br /&gt;
pgid [tgid] uid gid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hint: The 'key_type'-feature has been removed in the mainline kernel recently. Don't look for it any longer :(&lt;br /&gt;
&lt;br /&gt;
The default is tgid, which means to share fairly among process groups. Think every guest is treated like a own process group. It's not possible to set a scheduler strategy within a guest. All processes belonging to the same guest are treated like &amp;quot;noop&amp;quot; within the guest. So: If you run apache and some ftp-server within the _same_ guest, there is no fair scheduling between them, but there is fair scheduling between the whole guest and all other guests.&lt;br /&gt;
&lt;br /&gt;
And: It's possible to tune the scheduler parameters in several ways. Have a look at /sys/block/hdc/queue/....&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Nice disk I/O scheduling, is that possible?&lt;br /&gt;
||Details=Well, since linux 2.6.13 processess have another priority next to the cpu nice scheduling hint, it's called io nice.&lt;br /&gt;
It's split into three groups, called real-time, best effort and idle. The default is best-effort, but within best-effort, you can have a niceness from 0 to and including 7.&lt;br /&gt;
You can set this niceness by the tool ionice, which for debian is either in the package util-linux or schedutils.&lt;br /&gt;
To change the io-niceness you need the &amp;lt;tt&amp;gt;CAP_SYS_NICE&amp;lt;/tt&amp;gt;, '''and''' need to have the same uid as the processe you want to ionice.&lt;br /&gt;
&lt;br /&gt;
:'''Note:''' If you want to use any schedulung other than best-effort you will also need the &amp;lt;tt&amp;gt;CAP_SYS_ADMIN&amp;lt;/tt&amp;gt;-flag. Be warned that this gives quite some capabilities to the vserver, not just for I/O scheduling!&lt;br /&gt;
&lt;br /&gt;
If you want to increase the niceness of an I/O hogging process within a vserver you need to do:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
chcontext --xid sponlp1 sudo -u '#2089' ionice -c2 -n5 -p24409&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
with sudo and ionice installed on the root server to increase the *nice*ness of pid 24409, with uid 2089&lt;br /&gt;
|Signature=Groteblup}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want iotop to display all guest processes on host to give me a nice overview of I/O usage.&lt;br /&gt;
||Details=You must allow iotop to read information from all guests. Add &lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
# setattr --watch /proc/vmstat&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
to, for example, rc.local, and later run iotop:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
# vcontext --migrate --xid 1 -- iotop&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
|Signature=corey via ser}}&lt;br /&gt;
&lt;br /&gt;
== Unification ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is unification (vunify)?&lt;br /&gt;
||Details=[[Unification]] is Hard Links on Steroids. Guests can 'share' common files (usually binaries and libraries) in a secure way, by creating hard links with special properties (immutable but unlinkable (removable)). The tool to identify common files and to unify them is called [[vunify]].&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is [[vhashify]]?&lt;br /&gt;
||Details=The successor of [[vunify]], a tool which does unification based on hash values (which allows to find common files in arbitrary paths.)&lt;br /&gt;
It creates hardlinks to files named after a hash of the content of the file. If you have a recent version of the vserver patch (2.2+), with CONFIG_VSERVER_COWBL enabled, you can even modify the hardlinked files inside the vservers and the links will be broken automatically.&lt;br /&gt;
There seems to be a catch when a hashified file has multiple hardlinks inside a guest, or when another internal hardlink is added after hashification. Link breaking will remove all the internal hardlinks too, so the guest will end up with different copies of the original file. The correct solution would be to not hashify files that have multiple links prior to hashification, and to break the link to the hashified version when a new internal hardlink is created. Apparently, this is not implemented yet (?).&lt;br /&gt;
&amp;lt;br/&amp;gt;|Signature=Guy-&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Note: hashify cannot cross XFS project QUOTA because hardlinks cannot cross projects.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I manage a multi-guest setup with vhashify?&lt;br /&gt;
||Details=For '[[vhashify]]', just do these once:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /etc/vservers/.defaults/apps/vunify/hash /vservers/.hash&lt;br /&gt;
ln -s /vservers/.hash /etc/vservers/.defaults/apps/vunify/hash/root&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, do this one line per vserver:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /etc/vservers/&amp;lt;vservername&amp;gt;/apps/vunify   # vhashify reuses vunify configuration&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To hashify a running vserver, do (possibly from a cronjob):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver name-of-guest hashify&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The guest needs to be running because vhashify tries to figure out what files not to hashify by calling the package manager of the guest via &amp;lt;tt&amp;gt;vserver enter&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In order for the OS cache to benefit from the hardlinking, you'll have to restart the vservers.&lt;br /&gt;
&lt;br /&gt;
To clean up hashified files that are no longer referenced by any vserver, do (possibly from a cronjob):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
find /vservers/.hash -type f -links 1 -print0 | xargs -0 rm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Until you do this, the files still take up place even though no vservers need them.&lt;br /&gt;
|Signature=Guy-}}&lt;br /&gt;
&lt;br /&gt;
== Filesystem usage ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is there a way to implement &amp;quot;user/group quota&amp;quot; per VServer?&lt;br /&gt;
||Details=Yes, but not on a shared partition for now. You need to put the guest on a separate partition, setup a vroot device (to make the quota access secure), copy that into the guest, and adjust the mtab line inside the guest. If 8 vroot device is not enough for you, you can add more with the kernel parameter max_vroot (exemple for built in kernel vroot /vmlinuz-2.6.31.6-vs2.3.0.36.26aq root=/dev/md1 ro max_vroot=20 ). If vroot is a module you'd actually want to put for exemple &amp;quot;options vroot max_vroot=20&amp;quot; in /etc/modprobe.conf and then just do modprobe vroot&lt;br /&gt;
|Signature=derjohn,gadnet}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What about &amp;quot;Quota&amp;quot; for a context? Howto limit disk usage?&lt;br /&gt;
||Details=Context quotas are now called Disk Limits (so that we can tell them apart from the user/group quotas :). They are supported out of the box (with vs2.0+) for all major filesystems (ext2/3, ReiserFS, JFS). You need to tag the FS with XID (see below). Please read [[Disk Limits and Quota]] for more information.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I tag a guest's directory with xid?&lt;br /&gt;
||Details=Tagging the guest's files gives you several advantages, e.g. the accounting will work properly.&lt;br /&gt;
Filesystem XID tagging only works on supported filesystem. Those are currently: ext2/3, reiserfs/reiser3, xfs and jfs.&lt;br /&gt;
To activate the XID tagging you have to mount the filesystem with &amp;quot;-o tag&amp;quot; (former tagxid is outdated since VS2.2). Attention: It's _not_ possible to &amp;quot;-o remount,tag&amp;quot;, you have to mount it freshly. The guests will tag their files automatiaclly. If you copy files in from the host, you have to tag them manually like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chxid -c xid -R /var/lib/vservers/&amp;lt;guest&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Context 0 and 1 will see all files, guests will only be able to access untagged files and their own XID. They can see other XID files but no information about the file, e.g. no owner, no group, no permissions.&lt;br /&gt;
Note: It is not advised to tag the root filesystem, as [http://www.paul.sladen.org/vserver/archives/200602/0020.html explained by Herbert] : trying to do so will expose you to some troubles !&lt;br /&gt;
|Signature=derjohn_and_gonzo_and_are}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I copy anything from host to guest partition, normally unvisible on host?&lt;br /&gt;
||Details=You should just change namespace, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace --enter &amp;lt;xid&amp;gt; -- /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and then use standard cp or rsync programs.&lt;br /&gt;
|Signature=SergiuszPawlowicz}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why is the barrier attribute disappearing on reiserfs filesystem after umount or host reboot?&lt;br /&gt;
||Details=The filesystem has to be mounted with explicitly defining the 'attrs' option, i.e. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount /dev/reiserfsdev /vservers -oattrs&lt;br /&gt;
setattr --barrier /vservers&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to get the barrier survive after umount/reboot.&lt;br /&gt;
|Signature=Nikolay Kichukov}}&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Does it support IPv6?&lt;br /&gt;
||Details=Currently it requires an additional patch, but the functionality should be available in 2.3+ soon. [[IPv6]] has more information.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I can't do all I want with the network interfaces inside the guest?&lt;br /&gt;
||Details=For now the networking is 'Host Business' -- the host is a router, and each guest is a server. You can set the capability ICMP_RAW in the context of the guest, or even the capability CAP_NET_RAW (which would even allow to sniff interfaces of other guests!). Likely to change with ngnet.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I add several IPs to a vserver?&lt;br /&gt;
||Details=First of all a single guest vserver only supports up to 16 IPs (There is a 64-IP patch available, which is in &amp;quot;derjohn's kernel&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Update from IRC (2011-08-22):&lt;br /&gt;
&amp;lt;mmouse&amp;gt; quick question: what is the maximum count of IPs (v4) I can have in a single guest?&lt;br /&gt;
&amp;lt;daniel_hozac&amp;gt; unlimited.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a little helper-script that adds a list of IPs defined in a text file, one per line.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
j=1&lt;br /&gt;
for i in `cat myiplist`; do&lt;br /&gt;
        j=$(($j+1))&lt;br /&gt;
        mkdir $j&lt;br /&gt;
        echo $i &amp;gt; $j/ip&lt;br /&gt;
        echo &amp;quot;24&amp;quot; &amp;gt; $j/prefix&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I assign a new IP address to a running guest?&lt;br /&gt;
||Details=This is done from the host server:&lt;br /&gt;
* add the ip on the host, for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ip addr add 194.169.123.23/24 dev eth0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* add the ip to the guest's network context (a guests NID is the same as the XID {context ID})&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
naddress --add --nid &amp;lt;nid&amp;gt; --ip 194.169.123.23/24 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* enter the guest (best via ssh) &lt;br /&gt;
* restart the services that need to make use of the new address if required &lt;br /&gt;
* update the config in ''/etc/vserver/&amp;lt;servername&amp;gt;/interfaces'' to reflect the changes for the next guest restart (if desired)&lt;br /&gt;
|Signature=BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=If my host has only one a single public IP, can I use RFC1918 IP (e.g. 192.168.foo.bar) for the guest vservers?&lt;br /&gt;
||Details=Yes, use iptables with SNAT to masquerade it. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -t nat -I POSTROUTING -s $VSERVER_NETZ  ! -d $VSERVER_NETZ -j SNAT --to $EXT_IP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See: [[HowtoPrivateNetworking]] and &lt;br /&gt;
http://www.tgunkel.de/it/software/doc/linux_server.en#h3-VServer_Masquerading_SNAT (THX, [MUPPETS]Gonzo)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=If I shut down my vserver guest, the whole Internet interface ethX on the host is shut down.  What happened?&lt;br /&gt;
||Details=When you shut down a guest (''i.e. vserver foo stop''), the IP is brought down on the host also. If this IP happens to be the primary IP of the host, the kernel will not only bring down the primary IP, but also all secondary IP addresses. Similarly, if your guests bring up IPs of more than one subnet, all other IPs from a specific subnet will be shut down if you stop the guest which created the first (&amp;quot;parent&amp;quot;) IP.&lt;br /&gt;
&lt;br /&gt;
You can check this on the host using the command &amp;quot;ip addr show&amp;quot;. Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1: eth0: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000&lt;br /&gt;
    link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
    inet 192.168.249.172/27 brd 192.168.249.191 scope global eth0&lt;br /&gt;
    inet 192.168.234.194/27 brd 192.168.234.223 scope global eth0&lt;br /&gt;
    inet 192.168.249.169/27 brd 192.168.249.191 scope global secondary eth0&lt;br /&gt;
    inet 192.168.234.195/27 brd 192.168.234.223 scope global secondary eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, if you stop the guest which brings down the IP 192.168.249.172, the IP 192.168.249.169 will be brought down as well, because it is a secondary IP of the &amp;quot;parent&amp;quot; 192.168.249.172.&lt;br /&gt;
&lt;br /&gt;
But in very recent kernels, there is an option ''settable'' which prevents that nasty feature. It's called &amp;quot;alias promotion&amp;quot;. You may set it via sysctl by adding ''net.ipv4.conf.all.promote_secondaries=1'' in /etc/sysctl.conf or via sysctl command line.&lt;br /&gt;
|Signature=derjohn, Hurga}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Can I run an OpenVPN Server in a guest?&lt;br /&gt;
||Details=&lt;br /&gt;
Yes. To get a OpenVPN Server running in a guest, all networking setup has to be done on the host. This answer describes the common case and shows some pitfalls, for detailled information about OpenVPN, please consult the appropriate documentation on the OpenVPN homepage.&lt;br /&gt;
This is the minimal OpenVPN configuration for the Server which will be used to demonstrate how to get it running in a client:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Networking setup&lt;br /&gt;
server 192.168.16.0     255.255.255.0&lt;br /&gt;
dev tun16&lt;br /&gt;
ifconfig-noexec&lt;br /&gt;
comp-lzo&lt;br /&gt;
# Certificates&lt;br /&gt;
dh ...&lt;br /&gt;
ca ...&lt;br /&gt;
cert ...&lt;br /&gt;
key ...&lt;br /&gt;
# Management&lt;br /&gt;
persist-key&lt;br /&gt;
keepalive 10 60&lt;br /&gt;
verb 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First of all you have to prepare the host with a persistent interface in the right mode and with the right settings. This is easily done by using openvpn and the ip and route tools.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# openvpn --mktun --dev tun16&lt;br /&gt;
# ip link set dev tun16 txqueuelen 100&lt;br /&gt;
# ifconfig tun16 192.168.16.1 pointopoint 192.168.16.2 mtu 1500&lt;br /&gt;
# route add -net 192.168.16.0 netmask 255.255.255.0 gw 192.168.16.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you need different settings, openvpn will tell you the ifconfig and route commands it uses to configure the interface when being started on the host with the original config file, but without ifconfig-noexec.&lt;br /&gt;
Additionally, the guest needs /dev/net/tun to make OpenVPN happy. This can be created with MAKEDEV:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/lib/vserver/&amp;lt;myopenvpnserver&amp;gt;/dev/&lt;br /&gt;
# ./MAKEDEV tun&lt;br /&gt;
  (creates the dev/net/tun device accessible by the guest - even a tap interface needs /dev/net/tun !)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally, the guest needs to have the tun device assigned:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/*&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/ip &amp;lt;==&lt;br /&gt;
192.168.16.1&lt;br /&gt;
&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/nodev &amp;lt;==&lt;br /&gt;
tun16&lt;br /&gt;
&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/prefix &amp;lt;==&lt;br /&gt;
24&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The client's conf may look like that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Basic setup&lt;br /&gt;
client&lt;br /&gt;
proto tcp-client&lt;br /&gt;
dev tun&lt;br /&gt;
remote &amp;lt;ipaddress&amp;gt;&lt;br /&gt;
comp-lzo&lt;br /&gt;
verb 4&lt;br /&gt;
&lt;br /&gt;
# Certificate&lt;br /&gt;
ca ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[ Based on derJohn's original answer, all errors mine ] &lt;br /&gt;
|Signature=DavidS}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Trying to connect to a vserver from the host or another vserver on the same host fails&lt;br /&gt;
||Details=strace shows&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
sin_addr=inet_addr(&amp;quot;xx.xx.xx.xx&amp;quot;)}, yy) = -1 EINVAL (Invalid argument)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A: The host/guest cannot communicate with another guest on same host.&lt;br /&gt;
* check all netmasks on all interfaces (do they overlap) ?&lt;br /&gt;
* check policy routing (disable it temporary) ?&lt;br /&gt;
* check that lo is up (Networking within a host/guest always uses lo interface)&lt;br /&gt;
|Signature=CommonProblems}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Can I use iptables ?&lt;br /&gt;
||Details=Yes but right now only on the host (rootserver). Please realize that all traffic is local and will not touch the forward chain.&lt;br /&gt;
&amp;lt;br&amp;gt;If you really, really, really need iptables on the guest and you are aware about loosing a big part of VServer isolation and security you could add the NET_ADMIN capability. Consider writing wrappers to manage iptables on the host instead.&lt;br /&gt;
|Signature=_are_}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to prevent guest from bringing down primary ip?&lt;br /&gt;
||Details=Yes. Remove /etc/vservers/&amp;lt;guest&amp;gt;/interfaces/X/dev, and touch /etc/vservers/&amp;lt;guest&amp;gt;/interfaces/X/nodev&lt;br /&gt;
|Signature=Daniel&amp;amp;Serge}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to provide a different MAC address per vServer?&lt;br /&gt;
||Details=Short answer - yes but it's a hassle.&lt;br /&gt;
&lt;br /&gt;
Real answer from '''_are_''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
When I once needed 'real' seperate MAC-addresses I used TAP-devices and VDE2 ([http://vde.sourceforge.net/ Virtual Distributed Ethernet]).&lt;br /&gt;
Basically vServer is an isolation of existing resources, not a virtualization of 'new' devices.&lt;br /&gt;
Without extra fuss you can't add a 'new' network interface to a vServer, no matter if it is eth* or tap*, you always add it to the host and give the vServer access to it.&lt;br /&gt;
I got the TAP+VDE2 up and running, but I think it is too much trouble for basically the simple adding of IPs to a vServer unless you really need the MAC address separate.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also utilize MACVLAN ability from kernel.&lt;br /&gt;
I.e. create ''macvlan0'' interface with:&lt;br /&gt;
&amp;lt;pre&amp;gt;ip link add link eth0 address 00:19:d1:29:d2:58 macvlan0 type macvlan&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[http://jim.studt.net/depository/index.php/notes-on-linux-s-macvlan-module Reference]]&lt;br /&gt;
|Signature=bobnormal&amp;amp;swenTjuln&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to hide packet counters on the host network interface from vServer guests?&lt;br /&gt;
||Details=Yes, see [[Networking_vserver_guests|Networking vServer Guests]]&lt;br /&gt;
|Signature=bobnormal}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Services won't bind to 127.0.0.1 when I configure them to bind to all available IPs / (binding service to * doesn't bind to loopback)?&lt;br /&gt;
||Details=You've configured single public IP and have kernel option &amp;quot;Linux VServer -&amp;gt; Automatic Single IP Special Casing&amp;quot; enabled.&lt;br /&gt;
It means somehow &amp;quot;optimized&amp;quot; :D&lt;br /&gt;
If you don't want this you have 3 possible solutions (quoting Bertl):&lt;br /&gt;
  * disable the auto single IP in the kernel&lt;br /&gt;
  * assign more than one IP to the guest&lt;br /&gt;
  * disable single ip special casing for that guest&lt;br /&gt;
&lt;br /&gt;
The later is done by : echo &amp;quot;~single_ip&amp;quot; &amp;gt;&amp;gt; /etc/vservers/&amp;lt;VSERVER&amp;gt;/nflags&lt;br /&gt;
At runtime to avoid restarting the vserver: nattribute --set --nid &amp;lt;guest&amp;gt; --flag ~single_ip&lt;br /&gt;
|Signature=swenTjuln}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When using network namespaces and vserver together, netstat does not work in the vserver. What's wrong? &lt;br /&gt;
||Details=All proc entries are hidden by default in the guests. During startup of the host system a tool called vprocunhide makes some /proc files visible.&lt;br /&gt;
&lt;br /&gt;
If you create a new network namespace you have to do the same in the network namespace because the new /proc/net files are not available for the vprocunhide outside the new network namespace. So something like that should be sufficient to get netstat working in vservers with network namespaces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ip netns exec $NAMESPACE /usr/lib/util-vserver/vprocunhide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=AlexanderS}}&lt;br /&gt;
&lt;br /&gt;
== Administration tools ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Which guest vservers are running?&lt;br /&gt;
||Details=Use vserver-stat to find out.  Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME&lt;br /&gt;
0       77 965.1M 334.6M  14m14s18   2m28s69   1h33m46 root server&lt;br /&gt;
49152    7    14M   5.2M   0m00s40   0m00s30   1h30m15 chiffon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is there a web-based interface for vserver that will allow creation/deletion/configuration etc. of vserver guests?&lt;br /&gt;
||Details=&lt;br /&gt;
* http://OpenVPS.org which is a set of scripts with a web-interface for webhosters/ISPs&lt;br /&gt;
* http://Openvcp.org which is a distributed system (agent!) with a web-interface, with which you can build/remove guests&lt;br /&gt;
* http://vsmon.revolutionlinux.com/ is a distributed monitoring-only solution that allows you to search for a particular vserver in your park.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
== Hosting foreign distributions ==&lt;br /&gt;
 &lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I run a Debian host and want to build an Ubuntu guest. Howto?&lt;br /&gt;
||Details=Simple ;) Assume you want to build a breezy guest on a sid host with IP 192.168.0.2 and hostname vubuntu, then do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver vubuntu build --force -m debootstrap --hostname vubuntu.myvservers.net --netdev eth0 --interface 192.168.0.2/24 \&lt;br /&gt;
--context 42 -- -d breezy -m http://de.archive.ubuntu.com/ubuntu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[UPDATE] Currently there are problems in building breezy under unclear circumstances, which seems to have to do with udev. If the above didnt work, try:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver vubuntu build --force -m debootstrap --hostname vubuntu.myvservers.net --netdev eth0 --interface 192.168.0.2/24 \&lt;br /&gt;
--context 42 -- -d breezy -m http://de.archive.ubuntu.com/ubuntu -- --exclude=udev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In very recent versions of the utils, the problem should not occur anymore (it has to do with the 'secure-mount' if you look in the MLs)&lt;br /&gt;
&lt;br /&gt;
Well, sid's debootstrap knows how to bootstrap Ubuntu linux. Make sure to have a current debootstrap package: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install debootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 The knowledge how to build ubuntu 'breezy badger' (which you probably want to be your guest at the time of writing) has been added recently.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want to build a Gentoo guest. Howto?&lt;br /&gt;
||Details=Even simpler ;) See http://www.gentoo.org/proj/en/vps/vserver-howto.xml#doc_chap3 .&lt;br /&gt;
|Signature=gcc}}&lt;br /&gt;
&lt;br /&gt;
== Application level problems ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I did everything right, but the application foo does not start. What's up there?&lt;br /&gt;
||Details=Before asking on the IRC channel, please check out the 'problematic programs' page:&lt;br /&gt;
[[Problematic Programs]]&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to ssh to the guest, I log into the host, even if I installed sshd on the guest. What's wrong here?&lt;br /&gt;
||Details=Look at /etc/ssh/sshd_config of the host:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Port 22&lt;br /&gt;
# Use these options to restrict which interfaces/protocols sshd will bind to&lt;br /&gt;
#ListenAddress ::&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And now change the setting to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Port 22&lt;br /&gt;
# Use these options to restrict which interfaces/protocols sshd will bind to&lt;br /&gt;
ListenAddress your.hosts.ip.here  # not the guests IP! &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then '/etc/init.d/ssh restart' on the host, after that on the guest (if you did apt-get install ssh on the guest already.)&lt;br /&gt;
Do I have to explain more? If the hosts sshd binds all available IP addresses on port 22 (The hosts 'sees' even all addresses of the guests!). So if the guest starts its sshd, it can't bind to port 22 any more. You need to change that setting only on the host. &lt;br /&gt;
(BTW: A similar approach has to be done for a lot of daemons, e.g. Apache. If the daemon does not support an explicit bind, you may use the chbind command to 'hide' IP addresses from the daemon before starting.)|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Bind9 does not like to start in my guest.&lt;br /&gt;
||Details=Check out the [[Problematic Programs]] page and/or get my [http://linux-vserver.derjohn.de/bind9-packages/bind9-capacheck_9.3.2-2_i386.deb vserver-guest-ready Debian package] for Debian Sid guests and check out the [http://linux-vserver.derjohn.de/bind9-packages/README.txt readme]. (Hint: This is fresh stuff. Please give me feedback)&lt;br /&gt;
 &lt;br /&gt;
[UPDATE] Since VServer Devel 2.1.1-rc18 you do not need to patch the userland tools anymore. The capabilities are masked.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=My mysqld running in a guest behaves strangely and is awfully slow/locks up&lt;br /&gt;
||Details=This can be related to /tmp being too small. mysqld stores temporary tables in /tmp and as such, if a lot of queries happen and /tmp runs full this can cause one query to lock up whilst creating the tmp table and all other queries waiting to acquire the lock. There are two possible solutions to that problem: a.) Modify /etc/vservers/vserver-name/fstab and assign more memory to the tmpfs of /tmp and b.) remove the /tmp entry from /etc/vservers/vserver-name/fstab completly. Especially on database servers with a rather high load the second one might be the preferred method. &lt;br /&gt;
If you prefer not to modify or disable tmpfs, you can reconfigure MySQL to use a different tmpdir such as &amp;quot;/var/tmp&amp;quot;.  For example, edit /etc/my.cnf (RHEL/CentOS) or create /etc/mysql/conf.d/mysqld_custom.conf (Debian) and add the following line: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tmpdir = /var/tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Afterwards, restart MySQL (/etc/init.d/mysqld restart) and then review MySQL variables (mysqladmin -uroot -p variables) to confirm &amp;quot;tmpdir&amp;quot; is no longer pointing to &amp;quot;/tmp&amp;quot;. |Signature=sp, jrklein}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Pure-FTP does not run inside a VServer?&lt;br /&gt;
||Details=That's because it has capabilities enabled, make sure you rebuild your distro's package passing also the `--without-capabilities` flag to configure.&lt;br /&gt;
|Signature=Pedro Algarvio, aka, s0undt3ch}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why do neither sshd nor crond (vixie-cron) work correctly in my CentOS / Fedora guest? I get 'pam_loginuid(crond:session): set_loginuid failed opening loginuid' and similar lines in my logs.&lt;br /&gt;
||Details=Took me a while to figure this out, and it turned out to be mentioned in the old wiki. Here is the solution on how to solve a common problem with sshd / crond, somehow related to selinux and auditing:&lt;br /&gt;
&lt;br /&gt;
pam authentication (also used with openssh) enables &amp;quot;pam_loginuid.so&amp;quot; in the /etc/pam.d/* files. Comment those out as they are not necessary and will not load within a guest anyway. This probably is also necessary on updates later on, if the configs get changed. You therefore may add the following command line to a cronjob file or your software update script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/bin/sed --in-place -e &amp;quot;s/^session.*required.*pam_loginuid.so/# session\trequired\tpam_loginuid.so/g&amp;quot; /etc/pam.d/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''UPDATE:''' If you are compiling your own kernel this can be fixed system-wide by setting CONFIG_AUDIT_LOGINUID_IMMUTABLE=n in kernels .config file.&lt;br /&gt;
&lt;br /&gt;
|Signature=patrick, SwenTjuln}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do i install nagios-plugins on a Gentoo guest?&lt;br /&gt;
||Details=Unfortunately, the nagios-plugins ./configure scripts wants to ping 127.0.0.1 which is not available inside a guest. Therefore you have to build nagios-plugins outside the guest.&lt;br /&gt;
The easiest way to do this from the host (assuming the guest is running) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;xid&amp;gt; -- chroot /vservers/&amp;lt;name&amp;gt; emerge nagios-plugins -va&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=Hollow}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Somebody runs ntpd in guest and you can't use ntpdate in host?&lt;br /&gt;
||Details=Try to run ntpdate with options -u :&lt;br /&gt;
 ntpdate -u ntp.domain.xy&lt;br /&gt;
or you can use command:&lt;br /&gt;
 chbind --nid 42 --ip 1.2.3.4 -- ntpdate ntp.domain.xy&lt;br /&gt;
where IP will be the IP of host.&lt;br /&gt;
|Signature=Punkie/Bertl}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Start / Stop a VServer ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I make a vserver guest start by default?&lt;br /&gt;
||Details=At least on Debian, I can tell you how to do it with the new-style config. If your guest is called &amp;quot;derjohn&amp;quot; and you want it to be started somewhere at the of your bootstrap process, then do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;default&amp;quot; &amp;gt; /etc/vservers/derjohn/apps/init/mark&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to start it earlier, please read the init script &amp;quot;/etc/init.d/util-vserver&amp;quot; to find out how to do it. In most cases you don't need to change this. On Debian the vservers are started at &amp;quot;20&amp;quot;, so after most other stuff is up (networking etc.).&lt;br /&gt;
&lt;br /&gt;
Besides that I created a small helper script for managing the autostart foo: ((vserver-autostart))|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=My host works, but when I start a guest it says that it has a problem with chbind.&lt;br /&gt;
||Details=You are probably using util-vserver &amp;lt;= 0.30.209, which does use dynamic network contexts internally (With 0.30.210 this fact changed). So if you compiled your kernel without dynamic contexts, you may start guests, but you can't use the network context.The solution is either to switch to .210 util (or Hollow's toolset) or compile the kernel with dynamic network contexts.&lt;br /&gt;
SE Keyword: invalid option `nid' testme.sh&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is old-style and new-style config?&lt;br /&gt;
||Details=Old-style config refers to a single text-file that contains all the configuration settings. With new-style config the configuration is split into several directories and files. You should probably go for new-style config if you are asking.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I reboot/halt guests?&lt;br /&gt;
||Details=It depends. &lt;br /&gt;
For legacy Linux-VServer (i.e. 1.2.x), you have to replace /sbin/halt in the guests with vreboot and start rebootmgr in the host. You also need to have a &amp;lt;guest&amp;gt;.conf file in /etc/vservers for each guest. Please have a look at /etc/init.d/rebootmgr.&lt;br /&gt;
For Linux-VServer 2.0+, sys_reboot has been virtualized to do the right thing. No changes are needed in guests. Please note that some things depend on the init style used by the guest : read [[util-vserver:InitStyles]]&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the initial PATH?&lt;br /&gt;
||Details=By default, vserver uses the 'sysv' startup style, which mimics the init process by running the 3rd runlevel through '/etc/init.d/rc 3' (or '/etc/rc.d/rc 3'). Usually this 'rc' script uses a hard-coded PATH. In the case it doesn't, util-vserver also mimics init's default PATH through /etc/vservers/.defaults/apps/init/environment, or if not present /usr/local/lib/util-vserver/defaults/environment. Beware that all those default PATH usually do not include /usr/local.&lt;br /&gt;
|Signature=daniel_hozac&amp;amp;Beuc}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to start a guest i get this message &amp;quot;/proc/uptime can not be accessed. Usually, this is caused by procfs-security. Please read the FAQ for more details&amp;quot;?&lt;br /&gt;
||Details=After a reboot you need to run the vprocunhide script. If running this script causes many errors to print on the screen, try checking the kernel you have booted with (perhaps it does not have the linux-vserver extensions enabled).&lt;br /&gt;
|Signature=mattzerah}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to start a guest i get this message &amp;quot;vsched: vc_set_sched(): Function not implemented&amp;quot;.  &lt;br /&gt;
||Details=After an upgrade of the kernel/tools if you used the old scheduler function you must convert them to cgroup cpu limits. If you do not want limits search and remove/rename /etc/vservers/*/sched/ and the guest will start again. This might also happen when you use a newer kernel patch but did not yet update the vserver utils to a recent version (Thorsten).&lt;br /&gt;
|Signature=aqueos}}&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is SMP Supported?&lt;br /&gt;
||Details=Yes, on all SMP capable kernel architectures.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Do I really need the legacy-interfaces? What are these legacy-interfaces?&lt;br /&gt;
||Details=Since Linux-VServer is an ongoing project, new features might replace old ones, some might require a development version. Legacy-interfaces are available for backward compability (which might be removed someday) with Linux-VServer 1.2.x.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I have a vserver running on a Linux kernel with preemption. Is VServer &amp;quot;preempt&amp;quot; safe?&lt;br /&gt;
||Details=There are no known issues about running vserver on a preemption enabled kernel. I would like to add, that the vserver kernelhackers would probably exclude that option in 'make menuconfig' if there would be an incompatibility. Just my $.02 :)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=32 vs 64 Bit? What should I take?&lt;br /&gt;
||Details=If you have the choice make the host a 64 bit one. You can run a guest as 32 bit or as 64 bit on a 64 bit host. To run it as 32 bit, you need to compile the x86_64 (a.k.a. AMD64) with the following options:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[*] Kernel support for ELF binaries&lt;br /&gt;
&amp;lt;M&amp;gt; Kernel support for MISC binaries&lt;br /&gt;
[*] IA32 Emulation &amp;lt;---- without that, the entire 32bit API is not present&lt;br /&gt;
&amp;lt;M&amp;gt;   IA32 a.out support  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can force the guest to behave like a 32 environment like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo linux_32bit &amp;gt; /etc/vservers/$NAME/personality&lt;br /&gt;
echo i686 &amp;gt; /etc/vservers/$NAME/uts/machine&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(thanks cehteh for the hint!)&lt;br /&gt;
&lt;br /&gt;
But you can force debootstrap to put 32 bit binaries into the guest by 'export ARCH=i386';&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=i386 ; vserver build .... &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On debian when using the newvserver script &amp;quot;export ARCH=i386&amp;quot; has no effect, just use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newvserver --arch i386 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On debian debootstrap can also be gived the arch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver myguest \&lt;br /&gt;
build -m debootstrap -n myguest \&lt;br /&gt;
--hostname myguest.mydomain.com \&lt;br /&gt;
-- -d squeeze -- \&lt;br /&gt;
--arch=amd64  (or i386 if you want 32bit)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What does the guest privacy option do in the kernel settings ?&lt;br /&gt;
||Details=&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;i was wondering about the real thing that guest privacy does. &lt;br /&gt;
#ifdef  CONFIG_VSERVER_PRIVACY&lt;br /&gt;
#define VS_ADMIN_P      (0)&lt;br /&gt;
#define VS_WATCH_P      (0)&lt;br /&gt;
#else&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &amp;gt; Does it just prevent the spectator context ? &lt;br /&gt;
 &lt;br /&gt;
it prevents the spectator context and the admin &lt;br /&gt;
functionality in all cases which are privacy&lt;br /&gt;
sensitive, which includes:&lt;br /&gt;
&lt;br /&gt;
 - ptrace&lt;br /&gt;
 - devmapper&lt;br /&gt;
 - devpts&lt;br /&gt;
 - inode tag permissions&lt;br /&gt;
 - mountinfo&lt;br /&gt;
 - kill/signal&lt;br /&gt;
 - netlink dumps&lt;br /&gt;
 - tun control&lt;br /&gt;
 - iopriority&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &amp;gt; What security do it bring to the system ?&lt;br /&gt;
&lt;br /&gt;
together with the VXF_STATE_ADMIN it can be&lt;br /&gt;
used to secure a guest (to some degree) from&lt;br /&gt;
unwanted access from the host admin, of course,&lt;br /&gt;
as the admin can change the kernel, this is a&lt;br /&gt;
voluntary feature which mostly prevents certain&lt;br /&gt;
kinds of accidential peeking or guest modification&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=ghislain}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distribution specific questions ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=VServer is included in the stable Debian GNU/Linux for years now. What VS version did they include?&lt;br /&gt;
||Details=There is no support in Debian for Linux-Vserver since the Wheezy release. Debian Squeeze included a 2.6.32 based kernel-package called 2.6.32-5-vserver-ARCH. This contained VServer 2.3.0.36.29.6 with some additional fixes.&lt;br /&gt;
|Signature=scientes}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Were can I get newer versions of VServer as ready made packages for Debian?&lt;br /&gt;
||Details= There are a number of locations&lt;br /&gt;
* http://repo.psand.net/info/ has Debian Lenny, Squeeze and Wheezy repositories. Many kernel versions are present. Currently (Febraury 2013) 3.2 kernels are being maintained for Wheezy, with additional packages for 3.4 and 3.10 also available. Architectures available are i386 and amd64. This repository also contains curremt util-vserver builds. Build will shortly begin for Jessie.&lt;br /&gt;
* http://www.lihas.de/anleitungen-und-service/linux-vserver-kernel-fuer-debian/linux-vserver-kernel-english details their automatically built repository currently for 3.4 kernels. Building, patching and testing for the kernels is automated.&lt;br /&gt;
&lt;br /&gt;
Older unmaintained repositories are/were here:&lt;br /&gt;
&lt;br /&gt;
* http://linux-vserver.derjohn.de/ - &amp;quot;my kernels are always 'devel' branch&amp;quot; (derjohn). This repo contain kernels up to 2.6.29 for amd64, 2.6.26 for i386.&lt;br /&gt;
* http://backports.debian.org/ contains 2.6.32 backports for Lenny at time of writing (11th May 2010)&lt;br /&gt;
* http://zbla.net/debian/ Unofficial debian vserver packages '''WARNING : i386 packets are compiled for 64bits !''' apt source line: ''deb http://zbla.net/debian/ ./'' (N/A as of 2011/12/27)&lt;br /&gt;
|Signature=Gremble&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Were can I get newer versions of VServer as ready made packages for Ubuntu?&lt;br /&gt;
||Details= There is only one location for &lt;br /&gt;
*http://repo-ubuntu.psand.net/dists/ is the only repository maintained for Ubuntu. It covers Precise (LTS) and the 3.2 kernel series for amd64 and i386.&lt;br /&gt;
|Signature=Gremble&lt;br /&gt;
}}&lt;br /&gt;
== Misc ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why isn't there a device /dev/xyz within a guest?&lt;br /&gt;
||Details=Device nodes allow userspace to access hardware (or virtual resources). Creating a device node inside the guest's namespace will give access to that device, so for security reasons, the number of 'given' devices is small.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want to (re)mount a virtual filesystem (like tmpfs) in a running guest ... but the guest has no rights (capability) to (re)mount?&lt;br /&gt;
||Details=I take as example your /tmp partition within the guest is too small, what will be likely the case if you stay with the 16MB default (vserver build mounts /tmp as 16 MB tmpfs!).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vnamespace -e XID  mount -t tmpfs -o remount,size=256m,mode=1777 none /var/lib/vservers/&amp;lt;guest&amp;gt;/tmp/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(if there's a problem, try expanding the symlinks in the mount path)&lt;br /&gt;
Be warned that the guest will not recognize the change, as the /etc/mtab file is not updated when you mount like this. To permanently change the mount, edit /etc/vserver/&amp;lt;guest&amp;gt;/fstab on the host.&lt;br /&gt;
&lt;br /&gt;
If you get:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount: can't find /var/lib/vservers/&amp;lt;guest&amp;gt;/tmp in /etc/fstab or /etc/mtab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then try instead:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e builder chroot /var/lib/vservers/&amp;lt;guest&amp;gt;/ mount -o remount,size=64m,mode=1777 /tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn/BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I bind mount a host directory inside a running guest?&lt;br /&gt;
||Details=There are two ways to do this: one is to enter the bind mount in the guest fstab and restart the guest.&lt;br /&gt;
&lt;br /&gt;
To understand the other way, let me explain how mount namespaces work.&lt;br /&gt;
&lt;br /&gt;
Every guest has two mount namespaces associated with it: one &amp;quot;''management namespace''&amp;quot; and one &amp;quot;''operational namespace''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On starting the guest, first the management namespace is created as a copy of the host namespace (which means that everything that was mounted on the host is mounted in the new namespace as well). This has unwelcome side effects: for example, if you had a cdrom mounted while starting the guest, you wouldn't be able to eject it until you stop the guest even if you umount it on the host, because it's still mounted in the guest. Therefore, the namespace is ''cleaned up'': filesystems that are mounted outside the root of the guest get unmounted in the guest namespace.&lt;br /&gt;
&lt;br /&gt;
Subsequently, the operational namespace of the guest is created as a copy of the management namespace, and the guest's processes are started in it.&lt;br /&gt;
&lt;br /&gt;
To bind mount a host directory in the guest, you must first make that host directory visible in the management namespace of the guest. This is automatically the case if the directory resides inside a mountpoint that exists in the guest namespace as well; however, if the guest config referenced no part of this mountpoint (or it didn't yet exist when you started the guest), then the cleanup mentioned above removed it from the guest's management namespace and you need to re-add it.&lt;br /&gt;
&lt;br /&gt;
Let's assume, as an example, that we want a guest to see a subdirectory, called &amp;lt;tt&amp;gt;foo&amp;lt;/tt&amp;gt;, of the cdrom we just mounted on the host (e.g. under &amp;lt;tt&amp;gt;/media/cdrom&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Let's enter the management namespace of the guest (that's what &amp;lt;tt&amp;gt;-i 0&amp;lt;/tt&amp;gt; is for):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vnamespace -i 0 -e &amp;lt;guest-xid&amp;gt; -- /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you have access to all host devices; mount the device that contains your directory wherever you want, but you may prefer to mount it in the same location you used on the host. (Note, though, that it's not even necessary for the device to be mounted in the host namespace at all.)&lt;br /&gt;
&lt;br /&gt;
It's likely best to use &amp;lt;tt&amp;gt;mount -n&amp;lt;/tt&amp;gt; lest your host &amp;lt;tt&amp;gt;/etc/mtab&amp;lt;/tt&amp;gt; get polluted with mounts from other namespaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -n /dev/sr0 /media/cdrom&lt;br /&gt;
# exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We're now back in the host namespace. &amp;lt;tt&amp;gt;vmount&amp;lt;/tt&amp;gt; can now be used to bind mount &amp;lt;tt&amp;gt;/media/cdrom/foo&amp;lt;/tt&amp;gt; inside a running guest (in this example, under &amp;lt;tt&amp;gt;/foo&amp;lt;/tt&amp;gt; inside the vserver root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vmount guestname -- --bind /media/cdrom/foo /mnt/foo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=[[User:KornAndras|Guy-]] 01:31, 10 January 2012 (UTC)}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I mount a device present on the host under a directory in a running guest?&lt;br /&gt;
||Details=Use something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;guestname&amp;gt; mount -n /dev/&amp;lt;device&amp;gt; /vservers/&amp;lt;guest&amp;gt;/place/you/want/to/mount/it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This device can be unmounted with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;guestname&amp;gt; umount -n /vservers/&amp;lt;guest&amp;gt;/place/you/want/to/mount/it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|Signature=derjohn/BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Does anyone know how to increase the size of /tmp within a vserver w/o restarting?&lt;br /&gt;
||Details=Use the remount option for mount.&lt;br /&gt;
 # vnamespace -e XID mount -n -t tmpfs -o remount,size=32m tmpfs /&amp;lt;vdir&amp;gt;/&amp;lt;guest&amp;gt;/tmp&lt;br /&gt;
or something like that.  The arguments are needed since mount is not going to be using /etc/fstab for the information and the version of /proc/mounts is best understood by&lt;br /&gt;
 # vnamespace -e XID cat /proc/mounts.&lt;br /&gt;
See [[Frequently_Asked_Questions#I want to (re)mount a partition in a running guest ... but the guest has no rights (capability) to (re)mount?]]&lt;br /&gt;
|Signature=derjohn/dhozac}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=#1 ERROR:  capset(): Operation not permitted&lt;br /&gt;
||Details=capabilities are not enabled in kernel-setup&lt;br /&gt;
please check that CONFIG_SECURITY_CAPABILITIES is loaded or included in the kernel. ( check with &amp;quot;cat /path_to_kernel/.config | grep -i cap &amp;quot;) &lt;br /&gt;
(2.6.11.5-vs-1.9.5 + 0.30-205)&lt;br /&gt;
|Signature=IrcQuestions}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I make 'vserver start' mount the root filesystem?&lt;br /&gt;
||Details=Mount it via /etc/vservers/vserver-name/fstab, make sure to set the option 'dev' e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/drbd0     /       xfs     rw,dev          0 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=AdrianReyer}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I deleted a guest's directory without shutting it down. Now I have a &amp;quot;ghost&amp;quot; running. Is there any possibility to get it out of proc without rebooting?&lt;br /&gt;
||Details=&lt;br /&gt;
 vkill --xid &amp;lt;xid&amp;gt; -s 15; sleep 2; vkill --xid &amp;lt;xid&amp;gt; -s 9&lt;br /&gt;
&lt;br /&gt;
You will also need to remove guest's ip, for example with:&lt;br /&gt;
 ip addr del &amp;lt;ip&amp;gt; dev eth0&lt;br /&gt;
|Signature=daniel_hozac &amp;amp; gebura }}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When using nice and su (for example, in the updatedb cron job), I get: su: Permission denied. What does it mean?&lt;br /&gt;
||Details=A guest cannot lower its nice value - and that's what 'su' does through pam_limits which sets a nice value of 0. You can see it through strace:&lt;br /&gt;
 $ strace nice su nobody&lt;br /&gt;
 [...]&lt;br /&gt;
 setpriority(PRIO_PROCESS, 0, 0)         = -1 EACCES (Permission denied)&lt;br /&gt;
You can use 'su nobody -c nice some_cmd' instead.&lt;br /&gt;
&lt;br /&gt;
The problem is caused by the fact that host system is setting limits for guests (when instructed to do so) and the dropped capability dissallows processess on guest systems to change and increase them later. That means no process on a guest can lower nice value above the limit set by host.&lt;br /&gt;
&lt;br /&gt;
If the pam_limits module is activated on a guest system it will first try to '''reset nice value to 0''' even if &amp;lt;tt&amp;gt;/etc/security/limits.conf&amp;lt;/tt&amp;gt; file is empty or even if there are lower priority limits set in it. The pam_limits module does that since [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=241663 its developers decided] that it should reset some limits to defaults and start from scratch when applying new restrictions. Unfortunately, already limited guest system won't be able to do it since resetting nice value to 0 means increasing the limit which is forbidden. See [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311058 Debian Bug report logs - #311058] for more information about that Debian bug.&lt;br /&gt;
&lt;br /&gt;
See also [[Frequently_Asked_Questions#Cron is not working on my guest system (which is Debian). How can I fix it?|Cron is not working…]]&lt;br /&gt;
&lt;br /&gt;
|Signature=daniel_hozac &amp;amp; Beuc &amp;amp; Paweł Wilk}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Cron is not working on my guest system (which is Debian). How can I fix it?&lt;br /&gt;
||Details=On a guest system the cron daemon may not work properly. When looking into the log file (e.g. &amp;lt;tt&amp;gt;/var/log/syslog&amp;lt;/tt&amp;gt;) the following message may appear repeatedly:&lt;br /&gt;
 CRON[xxxxx]: Permission denied&lt;br /&gt;
&lt;br /&gt;
Similar thing may happen with the &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt; when trying to execute a command as root.&lt;br /&gt;
&lt;br /&gt;
It's not the problem in Cron but in the pam_limits module on a guest system (see [[Frequently_Asked_Questions#When using nice and su (for example, in the updatedb cron job), I get: su: Permission denied. What does it mean?|FAQ:When using nice and su…]] for more information about the cause).&lt;br /&gt;
&lt;br /&gt;
There are 4 ways to solve or work-around this problem:&lt;br /&gt;
&lt;br /&gt;
'''1. Allowing guests to reset resource limits:'''&lt;br /&gt;
&lt;br /&gt;
It's clean solution but you may expect some guest processes increasing their limits because not everything is controlled by PAM. It also breaks centralized resources limiting approach so a guest can do bad things that may cause other guests and host to be overloaded and unresponsive.&lt;br /&gt;
&lt;br /&gt;
To apply it you have to add &amp;lt;tt&amp;gt;CAP_SYS_RESOURCE&amp;lt;/tt&amp;gt; flag to &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/bcapabilities&amp;lt;/tt&amp;gt; (2.6 kernels).&lt;br /&gt;
&lt;br /&gt;
See [[util-vserver:Capabilities_and_Flags|Capabilities and Flags]] for more information.&lt;br /&gt;
&lt;br /&gt;
'''2. Disabling pam_limits on a guest systems:'''&lt;br /&gt;
&lt;br /&gt;
This workaround is easy and works fine when your guest systems aren't really multiuser but rather service boxes. It disables setting of the resource limits by PAM so the limits can only be set globally for the whole guest (using rlimits or cgroups on a host) but never increased inside of the guest system.&lt;br /&gt;
&lt;br /&gt;
To apply it just enter the guest and edit the files listed below, commenting out any line containing &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 /etc/pam.d/su&lt;br /&gt;
 /etc/pam.d/sudo&lt;br /&gt;
 /etc/pam.d/cron&lt;br /&gt;
&lt;br /&gt;
You can also use this one-liner on a guest:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/bin/sed --in-place -e &amp;quot;s/^\s\?session.*pam_limits.so.*/\#\0/g&amp;quot; /etc/pam.d/{su,sudo,cron}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Allowing guest's pam_limits to set limits when possible:'''&lt;br /&gt;
&lt;br /&gt;
This workaround allows you to have working &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt; inside a guest system and global limits set by a host system. What's the catch? The problematic PAM module won't fully work for the root user on a guest system as expected and there might appear some PAM's warnings in guest's &amp;lt;tt&amp;gt;auth.log&amp;lt;/tt&amp;gt;. Since using pam_limits to limit regular user processes is far more frequent than using it to limit root processes, this solution may be a good compromise. It is about setting a proper limits in pam_limits configuration and about setting this PAM module in a way that its function is optional (instead of required). The last change makes PAM to continue with session even if pam_limits encounters some error during setting limits (it usually applies to superuser sessions).&lt;br /&gt;
&lt;br /&gt;
The not so nice news is that there might be a need of keeping guest's limits configuration up to date according to limits globally set for a guest. The limits set in pam_limits configuration file(s) shouldn't be higher (lower in case of nice value) than global guest's limits.&lt;br /&gt;
&lt;br /&gt;
To apply it enter the guest and edit the files listed below, replacing occurences of &amp;lt;tt&amp;gt;required&amp;lt;/tt&amp;gt; by &amp;lt;tt&amp;gt;optional&amp;lt;/tt&amp;gt; in the lines containing &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 /etc/pam.d/su&lt;br /&gt;
 /etc/pam.d/sudo&lt;br /&gt;
 /etc/pam.d/cron&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # Sets up user limits, please define limits for cron tasks&lt;br /&gt;
 # through /etc/security/limits.conf&lt;br /&gt;
 session       optional        pam_limits.so&lt;br /&gt;
&lt;br /&gt;
Then on a guest system create the file &amp;lt;tt&amp;gt;/etc/security/limits.d/01-fixpam.conf&amp;lt;/tt&amp;gt; containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*         -        priority        X   # replace X with your guest's nice value &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can automate this process to happen automagically for any guest by creating the startup script named &amp;lt;tt&amp;gt;/etc/vservers/.defaults/scripts/post-start.d/01-pamfix&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# This script tries to fix pam_limits entries&lt;br /&gt;
# to make it possible for PAM in a guest system to&lt;br /&gt;
# set its own limits.&lt;br /&gt;
&lt;br /&gt;
PAM_DIR=&amp;quot;etc/pam.d&amp;quot;&lt;br /&gt;
PAM_SERVICES=&amp;quot;su sudo cron&amp;quot;&lt;br /&gt;
LIMITS_FILE=&amp;quot;etc/security/limits.d/01-pamfix.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
vname=&amp;quot;$2&amp;quot;&lt;br /&gt;
[ -z &amp;quot;$vname&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
&lt;br /&gt;
vcfg=$( /usr/sbin/vserver-info &amp;quot;$vname&amp;quot; CFGDIR )&lt;br /&gt;
[ ! -d &amp;quot;$vcfg&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
&lt;br /&gt;
for s in $PAM_SERVICES&lt;br /&gt;
do&lt;br /&gt;
        pamfile=&amp;quot;${PAM_DIR#\/}/$s&amp;quot;&lt;br /&gt;
        [ -f &amp;quot;$pamfile&amp;quot; ] &amp;amp;&amp;amp; /bin/sed --in-place -e &amp;quot;s/\(^\s\?session.*\)required\(.*pam_limits.so.*\)/\1optional\2/g&amp;quot; &amp;quot;$pamfile&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
[ ! -f &amp;quot;${vcfg}/nice&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
nval=$( /usr/bin/head -1 &amp;quot;${vcfg}/nice&amp;quot; )&lt;br /&gt;
[ -n &amp;quot;$nval&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;* - priority $nval # (added by vserver startup script)&amp;quot; &amp;gt; &amp;quot;${LIMITS_FILE#\/}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4. Disabling resource limits for a guest:'''&lt;br /&gt;
&lt;br /&gt;
It easy, clean and… unsafe solution. You just have to not set resource limits (e.g. priority, nice value) for a guest or set the nice value limit to 0 on a host system. Resetting it later by guest's &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt; will not generate an error.&lt;br /&gt;
&lt;br /&gt;
|Signature=Paweł Wilk}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I handle NFS mounts within in a guest?&lt;br /&gt;
||Details=There are at least four ways.&lt;br /&gt;
&lt;br /&gt;
In any case, you probably want to force the nfs version to 3 or lower to avoid id mapping issues (one symptom of having an id mapping issue is that &amp;lt;tt&amp;gt;no_root_squash&amp;lt;/tt&amp;gt; appears to be ignored). You can check whether the mount uses nfsv4 by looking at &amp;lt;tt&amp;gt;/proc/mounts&amp;lt;/tt&amp;gt; inside the guest. You can force the protocol version to 3 by passing the mount options &amp;lt;tt&amp;gt;nfsvers=3,mountvers=3&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''1)''' Mount the NFS share from the host OS and let vserver guest access it as part of it's file system.&lt;br /&gt;
&lt;br /&gt;
''mount --bind'' may also be beneficial in this scenario.&lt;br /&gt;
&lt;br /&gt;
'''2)''' Use util-vserver and create a ''fstab.remote'' file in the /etc/vserver/&amp;lt;vserver_name&amp;gt; directory. Populate this with the NFS shares and they will be mounted in the context of the vserver guest.&lt;br /&gt;
&lt;br /&gt;
See http://www.nongnu.org/util-vserver/doc/conf/configuration.html&lt;br /&gt;
&lt;br /&gt;
Note that as of 0.30.216-pre3000 and kernel 3.0.4-vs2.3.1-pre10.1, the mount request will appear to originate from the IP of the host, not the guest. It is unclear (to [[User:KornAndras|Guy-]]) whether this is a bug.&lt;br /&gt;
&lt;br /&gt;
'''3)''' Add capabilities to the vserver guest instance to grant sufficient rights to allow NFS mounts.&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/vserver/&amp;lt;vserver_name&amp;gt;/bcapabilities&lt;br /&gt;
 SYS_ADMIN&lt;br /&gt;
Add the following to /etc/vserver/&amp;lt;vserver_name&amp;gt;/ccapabilities&lt;br /&gt;
 SECURE_MOUNT&lt;br /&gt;
 BINARY_MOUNT&lt;br /&gt;
&lt;br /&gt;
See [[Capabilities_and_Flags]] for more information about vserver capabilities.&lt;br /&gt;
&lt;br /&gt;
If you want the NFS shares to be mounted when the guest starts, add them to /etc/vserver/&amp;lt;vserver_name&amp;gt;/fstab.&lt;br /&gt;
&lt;br /&gt;
'''4)''' Before starting the guest, make a directory of the host &amp;quot;shared&amp;quot; using &amp;lt;tt&amp;gt;mount --make-shared /path/to/dir&amp;lt;/tt&amp;gt;, then set up autofs to mount nfs shares under &amp;lt;tt&amp;gt;/path/to/dir/sharename&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
rbind mount subdirectories of &amp;lt;tt&amp;gt;/path/to/dir&amp;lt;/tt&amp;gt; in the guest from its fstab.&lt;br /&gt;
&lt;br /&gt;
This setup is good if the nfs shares are not often needed, and especially if they're occasionally needed by more than one guest. (As of September 2011, running autofs inside a vserver guest didn't work for me. --[[User:KornAndras|Guy-]] 01:05, 30 October 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
||Signature=martindk}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=vserver start/stop/enter fails with something like &amp;quot;vnamespace: execvp(&amp;quot;/usr/sbin/vserver&amp;quot;): No such file or directory&amp;quot; ?&lt;br /&gt;
||Details=Check whether ''/usr'' is mounted in the namespace you are working with.&lt;br /&gt;
&amp;lt;pre&amp;gt;vnamespace -e &amp;lt;guest&amp;gt; cat /proc/mounts&amp;lt;/pre&amp;gt;&lt;br /&gt;
If there is no ''/usr'', you can fix your problem with simply mounting it using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;vnamespace -e &amp;lt;guest&amp;gt; mount /dev/&amp;lt;device&amp;gt; /usr&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Signature=sim0n}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=The command vserver &amp;lt;$server&amp;gt; start gives '/etc/init.d/rc: line 74: /etc/default/rcS: No such file or directory', what do I do? &lt;br /&gt;
||Details=The vserver has not been correctly installed, this has several reasons&lt;br /&gt;
check your install log and it should tell you something about that your server didn't get installed properly&lt;br /&gt;
* use stable distribution of debian as server (debootstrap may be different over the versions)&lt;br /&gt;
* deny_mount, deny_caps and deny_pivot should be off if your running grsec.&lt;br /&gt;
&lt;br /&gt;
||Signature=Dude}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How could I rename a vserver directory?&lt;br /&gt;
||Details=Please note : this procedure renames the '''directory''', not the '''hostname''' !&lt;br /&gt;
#Stop the vserver in question&lt;br /&gt;
#rename the &amp;lt;tt&amp;gt;/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
#rename the &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/run&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/var/run/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/vdir&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/.defaults/vdirbase/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/cache&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/.defaults/cachebase/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/var/run/vservers.rev/&amp;lt;server XID&amp;gt;&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Start the vserver in question. It should start properly.&lt;br /&gt;
&lt;br /&gt;
|Signature=FlorianD (from ''hillct'' page in old wiki)}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=what if i see my vserver in vserver-stat but with no name ?&lt;br /&gt;
||Details=the link in /var/run/vservers is missing&lt;br /&gt;
Just do a :  cat /etc/vservers/&amp;lt;guest&amp;gt;/context &amp;gt;  /var/run/vservers/&amp;lt;guest&amp;gt;&lt;br /&gt;
check that the &amp;lt;guest&amp;gt; is the good one by using  vuname --get --xid &amp;lt;context&amp;gt;  with the context you have in the vserver-stat listing.&lt;br /&gt;
|Signature=IrcQuestions}}&lt;br /&gt;
&lt;br /&gt;
== Upgrade from 2.0 to 2.2 ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I now get errors like &amp;quot;ncontext: vc_net_create(): Invalid argument; dynamic contexts disabled.&amp;quot; on startup. Vservers are not started&lt;br /&gt;
||Details=Dynamic context are disabled by default and are deprecated. For example, tagxid and network checks won't be useable with dynamic ids. Now you should manually assign a explicit context to your vservers, like&lt;br /&gt;
 echo 101 &amp;gt; /etc/vservers/myvserv/context&lt;br /&gt;
ADDENDUM: please consider that valid static contexts are between 2 and 49151 ( daniel_hozac on IRC ) otherwise you will end up with unexplainable error &amp;quot;ncontext: vc_net_migrate(): No such process&amp;quot; when trying to start the vserver.&lt;br /&gt;
&lt;br /&gt;
|Signature=daniel_hozac&amp;amp;Beuc}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I assign a static context to an existing vserver?&lt;br /&gt;
||Details=Simple ;) See the answer above. &lt;br /&gt;
|Signature=gcc}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Since upgrading to a newer VS version my guest complains about &amp;quot;vsched: non-numeric value specified for '--priority_bias&amp;quot; at start time. What's wrong?&lt;br /&gt;
||Details=The scheduler paramters changed.You can use this (ugly) script to convert them or do it by hand:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /usr/local/sbin/vserver-convert-schedule-to-scheddir&lt;br /&gt;
#/bin/sh&lt;br /&gt;
mkdir /etc/vservers/$1/sched&lt;br /&gt;
sed -e 1p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/fill-rate&lt;br /&gt;
sed -e 2p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/interval&lt;br /&gt;
sed -e 3p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens&lt;br /&gt;
sed -e 4p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens-min&lt;br /&gt;
sed -e 5p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens-max&lt;br /&gt;
&lt;br /&gt;
mv /etc/vservers/$1/schedule /etc/vservers/$1/schedule.converted.see.scheddir&lt;br /&gt;
&lt;br /&gt;
# see: http://oldwiki.linux-vserver.org/Scheduler+Parameters&lt;br /&gt;
# see: http://www.nongnu.org/util-vserver/doc/conf/configuration.html#sched&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Since upgrading to a newer VS version my guest doesn't have the amount of shared memory (SHM / SHMMAX / SHMALL ) as it had in the former version. What changed?&lt;br /&gt;
||Details=Every VS version that runs on a kernel &amp;gt;= 2.6.19 offers sysctl values per guest. This has to do with the 'ipc namespace' feature that was added to the mainline kernel in version 2.6.19. Linux-VServer uses that feature to give each guest a separate 'ipc namespace' and thus 'own' sysctl values per guest. Because shmmax is such a sysctl value, you have to set it per guest.&lt;br /&gt;
Here is an example how to do so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0 -p&lt;br /&gt;
# echo kernel.shmall &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0/setting&lt;br /&gt;
# echo 134217728 &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0/value&lt;br /&gt;
# mkdir /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1 -p&lt;br /&gt;
# echo kernel.shmmax &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1/setting&lt;br /&gt;
# echo 134217728 &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It's also explained on the geat flower page:&lt;br /&gt;
# see: http://www.nongnu.org/util-vserver/doc/conf/configuration.html -&amp;gt; Look for &amp;quot;sysctl&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After changing those values, restart your guest, enter it and check if the values are set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sysctl -a | grep shm&lt;br /&gt;
...&lt;br /&gt;
kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change a value for a running guest, on the host use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vspace -e CONTEXTID --ipc sysctl -w kernel.shmall=134217728&lt;br /&gt;
 vspace -e CONTEXTID --ipc sysctl -w kernel.shmmax=134217728&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Signature=derjohn&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;br /&gt;
[[Category:Categories]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Installation_on_Debian</id>
		<title>Installation on Debian</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Installation_on_Debian"/>
				<updated>2013-09-24T11:35:19Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note:''' Debian 6.0 is the final version to include precompiled Linux-Vserver kernels. In newer versions (including Debian Testing), you'll have to compile the kernel yourself or [http://linux-vserver.org/Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F use a pre-packaged kernel]. [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574529]&lt;br /&gt;
&lt;br /&gt;
This guide is written against Debian Etch (4.0) and works on Lenny (5.0) as well. Both releases include kernel '''linux-image-vserver-686''', so no manual patching is needed. Hence, Installation on Debian Etch/Lenny is pretty easy and straightforward.&lt;br /&gt;
&lt;br /&gt;
If you need to compile your own kernel, you need to apply the vserver-version.patch. [http://www.kwu.hu/vserver.txt Details at 2007/May/04]&lt;br /&gt;
&lt;br /&gt;
In lenny and etch the tools are for the 2.2 version of vservers, you can find on beng repository packages for the 2.3 version of util-vserver until it is integrated in debian. See &lt;br /&gt;
* [[util-vserver:Devdebianpackage]] - Info about debian v2.3 package from the community&lt;br /&gt;
* explanation on how to use this repository from: http://repo.psand.net/info   How to use the Debian Repository&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Packages installation ==&lt;br /&gt;
The packages required by Linux-VServer are:&lt;br /&gt;
* '''linux-image-vserver-686''' - This is the current kernel, use '''linux-image-vserver-amd64''' on 64-bit systems, you can still create 32-bit guests&lt;br /&gt;
* '''util-vserver''' - These are the utilities used to administer the guests&lt;br /&gt;
* '''ssh''' - This is probably already installed, but just in case it isn't&lt;br /&gt;
&lt;br /&gt;
All the packages you need can be obtained via&lt;br /&gt;
&amp;lt;pre&amp;gt;aptitude install linux-image-vserver-686 util-vserver ssh&amp;lt;/pre&amp;gt;&lt;br /&gt;
so run this as ''root'' and reboot.&lt;br /&gt;
To check out wherever everything went fine you may run&lt;br /&gt;
&amp;lt;pre&amp;gt;uname -r&amp;lt;/pre&amp;gt;&lt;br /&gt;
and check that kernel version contains '''vserver''', e.g. '''2.6.18-4-vserver-686'''. That's it.&lt;br /&gt;
&lt;br /&gt;
Now that the host system is ready, you can proceed with [[Building Guest Systems|building guests]].&lt;br /&gt;
&lt;br /&gt;
=== Install util-vserver by source ===&lt;br /&gt;
Occasionally, Debian's util-vserver package can be too old. So, we'll need to compile from [http://people.linux-vserver.org/~dhozac/t/uv-testing/ source].&lt;br /&gt;
&lt;br /&gt;
First, install the required packages for util-vserver to compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;apt-get install vlan dietlibc-dev pkg-config libnss3-dev&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, we configure util-vserver&lt;br /&gt;
&amp;lt;pre&amp;gt;./configure --prefix=/usr --enable-release --mandir=/usr/share/man \&lt;br /&gt;
--infodir=/usr/share/info --sysconfdir=/etc --enable-dietlibc \&lt;br /&gt;
--localstatedir=/var --with-vrootdir=/home&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: You should change ''--with-vrootdir'' accordingly&lt;br /&gt;
&lt;br /&gt;
Finally, we run make to finalise the installation&lt;br /&gt;
&amp;lt;pre&amp;gt;make &amp;amp;&amp;amp; make install install-distribution&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Running ''vserver-info'' will show you that the proper util-vserver is installed. :)&lt;br /&gt;
&lt;br /&gt;
Debian likes to be funny, so we need to enable the following,&lt;br /&gt;
* echo /usr/lib/util-vserver/vshelper &amp;gt;| /proc/sys/kernel/vshelper&lt;br /&gt;
* echo kernel.vshelper = /usr/lib/util-vserver/vshelper &amp;gt;&amp;gt; /etc/sysctl.conf&lt;br /&gt;
* update-rc.d vprocunhide defaults&lt;br /&gt;
* update-rc.d vservers-default defaults&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
&lt;br /&gt;
Debian already contains vservers kernels, so no manual patching and compiling is needed. &lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitablenowrap&amp;quot;&lt;br /&gt;
!Debian release &lt;br /&gt;
!Kernel version&lt;br /&gt;
!VServer version&lt;br /&gt;
|-&lt;br /&gt;
| Squeeze&lt;br /&gt;
| 2.6.32&lt;br /&gt;
| 2.3.0.36.29.6&lt;br /&gt;
|-&lt;br /&gt;
| Lenny&lt;br /&gt;
| 2.6.26+17&lt;br /&gt;
| 2.3.0.35&lt;br /&gt;
|-&lt;br /&gt;
| Etch&lt;br /&gt;
| 2.6.18+6&lt;br /&gt;
| 2.0.2.2-rc9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Vserver versions given above are not completely pure, they have additional patches to fix various issues.&lt;br /&gt;
&lt;br /&gt;
Information on alternative Debian repositories with more functional packages is [[Frequently_Asked_Questions#Were_can_I_get_newer_versions_of_VServer_as_ready_made_packages_for_Debian.3F | contained in this section of the FAQ]].&lt;br /&gt;
&lt;br /&gt;
== Issues with Squeeze's 2.6.32 Kernel and Util-vserver ==&lt;br /&gt;
&lt;br /&gt;
* Util-vserver shipping with debian, does not have the symbolic link for squeeze, fixed by &lt;br /&gt;
  ln -s debian /usr/lib/util-vserver/distributions/squeeze&lt;br /&gt;
&lt;br /&gt;
== Issues with Lenny's 2.6.26 Kernel and Util-vserver ==&lt;br /&gt;
&lt;br /&gt;
=== Hard CPU scheduling ===&lt;br /&gt;
&lt;br /&gt;
This will not work in the Debian 'Lenny' Kernel, the patch used simply does not contain any of this functionality.&lt;br /&gt;
&lt;br /&gt;
=== Problems due to Xattrs ===&lt;br /&gt;
&lt;br /&gt;
There are two sets of issues within the Lenny kernel caused by the change in value of the Xattrs (extended attributes) applied to file in Vserver setups. The patch used in Debian Lenny uses Xattr flags which are set in positions which differ from the flags set by Debian kernels as well as most of the mainline Vserver patches. This result is that Xattrs of files in a non lenny system appear to have completely different flags in Lenny and vice versa. Since these flags are crucial to vserver hashification and chroot security, they can have devastating effects on Vserver guests and on host system security. If you have recently moved to or away from the stock Lenny Vserver kernel, have look at the symptoms below to see if any match your experiences, and apply the fixes/use another kernel as you see fit.&lt;br /&gt;
&lt;br /&gt;
As of writing these issue has not been corrected within the Debian archive.   These fixes must be applied whenever moving vserver guest '''from''' or '''to''' the Debian 'Lenny's vserver kernel. For more details and a more concise explanation see [http://irc.13thfloor.at/LOG/2009-05/LOG_2009-05-12.txt Bertls IRC explanation ].&lt;br /&gt;
&lt;br /&gt;
==== Chroot Security Problems ====&lt;br /&gt;
&lt;br /&gt;
Linux-Vserver uses file Xattrs to protect guest superusers from being able to view files above their root, preventing access to host file. This creates issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has created a guest with a Debian 2.6.26-*-vserver kernel and wishes to use it with another kernel.&lt;br /&gt;
* has created a guest with a different kernel and wishes to use it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
In effect, the barrier normally in place for guest servers is not recognised by the kernel (the chroot problem) in the situation above and/or immutable links will not function correctly (the unification problem)failing to break when overwritten) in a unified guest setup. Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* the possibility of vserver guest processes escaping their chroots and accessing other parts of the filesystem&lt;br /&gt;
* guest not starting&lt;br /&gt;
&lt;br /&gt;
To fix the barrier flags for a current kernel, see [[Secure_chroot_Barrier#Solution:_Secure_Barrier | these instructions]]. Note that on some setups a barrier flags will appear on all directories under the guest hierarchy, and need to be unset in order to allow the servers to run. Use showattr to reveal the state of play for your guests and fix appropriately.&lt;br /&gt;
&lt;br /&gt;
==== Unification Problems ====&lt;br /&gt;
&lt;br /&gt;
There is a discrepancy between the immutable-unlink flag used for file unification, the process used in vhashify. This creates considerable issues for anyone who:&lt;br /&gt;
&lt;br /&gt;
* has unified guests with a Debian 2.6.26-*-vserver kernel and wishes to use them with another kernel.&lt;br /&gt;
* has unified guests with a different kernel and wishes to then it on a Debian 2.6.26-*-vserver kernel based host.&lt;br /&gt;
&lt;br /&gt;
Symptoms suffered may include:&lt;br /&gt;
&lt;br /&gt;
* file that cannot be deleted&lt;br /&gt;
* any process involving the writing of files in guests not working&lt;br /&gt;
* files not being unlinked on write&lt;br /&gt;
&lt;br /&gt;
To fix the problem each file must be unlinked then the unification re-applied, or one could try this script submitted to [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508523 bugs.debian.org].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== /proc/mounts issue ===&lt;br /&gt;
&lt;br /&gt;
The vserver's /proc/mounts let appear the vserver path on the host. lsof (for example) is able to print it.&lt;br /&gt;
&lt;br /&gt;
=== &amp;quot;Ghosts&amp;quot; guests ===&lt;br /&gt;
&lt;br /&gt;
==== Issue ====&lt;br /&gt;
Sometimes a guests loose it's name in vserver-stats and is acting like a zombie. It's impossible to restart or kill it. Stopping all the guests with the util-vserver init.d script doesn't solve the issue. vkill --xid $CTX  doesn't either.&lt;br /&gt;
&lt;br /&gt;
==== Fix ====&lt;br /&gt;
  echo 50 &amp;gt; /var/run/vservers/$vserver&lt;br /&gt;
&lt;br /&gt;
Seems to fix the issue&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Linux-VServer HOWTO by Daniel15: http://howtoforge.com/linux_vserver_debian_etch&lt;br /&gt;
&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	<entry>
		<id>http://www.linux-vserver.at/Frequently_Asked_Questions</id>
		<title>Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="http://www.linux-vserver.at/Frequently_Asked_Questions"/>
				<updated>2013-02-25T12:38:41Z</updated>
		
		<summary type="html">&lt;p&gt;BenjaminGreen: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;margin: 2em auto 2em auto; padding: 10px; background-color: #F9ECCD; border: 1px solid #004433; text-align: center;&amp;quot;&amp;gt;&lt;br /&gt;
[[Image:Icon-Caution.png|left]]&lt;br /&gt;
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 look at the [http://oldwiki.linux-vserver.org old wiki] to find the information not migrated yet.&lt;br /&gt;
&lt;br /&gt;
'''To ease migration we created a [[List of old Documentation pages]].'''&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
CURRENTLY THE CONTENT OF THE OLD WIKI FAQ (AND MORE) IS BEING MIGRATED TO THIS PAGE (TASK: DERJOHN)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the status of Linux-VServer?&lt;br /&gt;
||Details=Linux-VServer has more than a decade of maturity and is actively developed. Two projects are similar to Linux-VServer, [[http://lxc.sf.net LXC]], and [[http://openvz.org OpenVZ]]. Of the two, OpenVZ is the more mature and offers some similar functionality to Linux-VServer. LXC is solely based on the kernel mechanisms such as cgroups that are present in modern kernels. These kernel mechanisms will continue to be refined and isolation will mature. As that occurs, Linux-VServer will take advantage of those new features separately from LXC and continue to provide the same robust user interface that it does currently. Currently, LXC offers significantly less functionality and isolation than Linux-vserver. LXC will eventually be a robust wrapper around kernel mechanisms but is still under heavy development and not considered ready for production use.&lt;br /&gt;
|Signature=beck}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is a 'Guest'?&lt;br /&gt;
||Details=To talk about stuff, we need some naming. The physical machine is called 'Host' and the 'main' context running the Host Distro is called 'Host Context'. The virtual machine/distro is called 'Guest' and basically is a Distribution (Userspace) running inside a 'Guest Context'.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What kind of Operating System (OS) can I run as guest?&lt;br /&gt;
||Details= With VServer you can only run Linux guests. The trick is that a guest does not run a kernel on its own (as XEN and UML do), it merely uses a virtualized host kernel-interface. VServer offers so called security contexts which make it possible to separate one guest from each other, i.e. they cannot get data from each other. Imagine it as a chroot environment with much more security and features.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is this a new project? When was it started?&lt;br /&gt;
||Details=The first public occurrence of Linux-VServer was Oct 2001. The initial mail can be found here: http://www.cs.helsinki.fi/linux/linux-kernel/2001-40/1065.html&lt;br /&gt;
So you can expect a mature software product which does its magic quite well (And hey, we have a version &amp;gt; 2.0!)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Which distributions did you test?&lt;br /&gt;
||Details=Some. Check out the wiki for ready-made guest images. But you can easily build own guest images, e.g. with Debian's debootstrap. Checkout [[Building Guest Systems]] how to do that.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is VServer comparable to XEN/UML/QEMU?&lt;br /&gt;
||Details=Nope. XEN/UML/QEMU and VServer are just good friends. Because you ask, you probably know what XEN/UML/QEMU are. VServer in contrary to XEN/UML/QEMU does not &amp;quot;emulate&amp;quot; any hardware you run a kernel on. The purpose of Linux VServer is to isolate (groups of) applications.  The isolation is done by the kernel (see [[Overview]] for a more detailed comparison). You can run a VServer kernel in a XEN/UML/QEMU guest. This is confirmed to work at least with Linux 2.6/vs2.0.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=With which version should I begin?&lt;br /&gt;
||Details=If you are new to VServer I recommend to try the latest stable kernel patch, and the latest util-vserver &amp;quot;alpha&amp;quot; release.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is VServer secure?&lt;br /&gt;
||Details=We hope so. It should be as least as secure as Linux is. We consider it much much more secure though.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Performance?&lt;br /&gt;
||Details=For a single guest, we basically have native performance. Some tests showed insignificant overhead (about 1-2%) others ran faster than on an unpatched kernel. This is IMVHO significantly less than other solutions waste, especially if you have more than a single guest (because of the resource sharing).&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the &amp;quot;great flower page&amp;quot;?&lt;br /&gt;
||Details=Well, [http://www.nongnu.org/util-vserver/doc/conf/configuration.html this page] contains all configuration options for util-vserver. The name of the page is derived from the stylesheet(s) it contains.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Resources usage ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Resource sharing?&lt;br /&gt;
||Details=Yes ....&lt;br /&gt;
* memory: Dynamically.&lt;br /&gt;
* CPU usage: Dynamically (token bucket)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Resource limiting?&lt;br /&gt;
||Details=You can put limits per guest on different subsystems.&lt;br /&gt;
* using ulimits and rlimits (rlimit is a new feature of kernel 2.6/vs2.0.) per guest, to limit the memory consumption, the number of processes or file-handles, ... : see [[Resource Limits]]&lt;br /&gt;
* CPU usage : see [[CPU Scheduler]]&lt;br /&gt;
* disk space usage : see [[Disk Limits and Quota]]&lt;br /&gt;
Note that you can only offer guaranteed resource availability with some ticks at the time.&lt;br /&gt;
|Signature=derjohn&amp;amp;xm}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I limit a guests RAM? I want to prevent OOM situations on the host!&lt;br /&gt;
||Details=First you can read [http://linux-vserver.org/Memory+Allocation] and [[Memory Limits]].&lt;br /&gt;
If you want a recipe, do this:&lt;br /&gt;
# Check the size of memory pages. On x86 and x86_64 is usually 4 KB per page. (on linux &amp;quot;getconf -a|grep PAGE&amp;quot; will give you the information)&lt;br /&gt;
# Create /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/&lt;br /&gt;
# Check your physical memory size on the host, e.g. with &amp;quot;free -m&amp;quot;. maxram = kilobytes/pagesize.&lt;br /&gt;
# Limit the guests physical RAM to value smaller then maxram:&amp;lt;pre&amp;gt;echo %%insertYourPagesHereSmallerThanMaxram%% &amp;gt; /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/rss &amp;lt;/pre&amp;gt;&lt;br /&gt;
# Check your swapspace, e.g. with 'swapon -s'. maxswap = swapkilobytes/pagesize.&lt;br /&gt;
# Limit the guest's maximum number of as pages to a value smaller than (maxram+maxswap): &amp;lt;pre&amp;gt; echo %%desiredvalue%% &amp;gt; /etc/vserver/&amp;lt;guest&amp;gt;/rlimits/as &amp;lt;/pre&amp;gt;&lt;br /&gt;
# Correctly display the memory information inside the guest:&amp;lt;pre&amp;gt;echo &amp;quot;VIRT_MEM&amp;quot; &amp;gt;&amp;gt; /etc/vservers/&amp;lt;guest&amp;gt;/flags&amp;lt;/pre&amp;gt;&lt;br /&gt;
It should be clear this can still lead to OOM situations. Example: You have two guests and your as limit per guest is greater than 50% of (maxram+maxswap). If both guests request their maximum at the same point in time, there will be not enough mem .....&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Disk I/O limiting? Is that possible?&lt;br /&gt;
||Details=Well, since vs2.1.1 Linux-VServer supports a mechanism called 'I/O scheduling', which appeared in the 2.6 mainline some time ago. The mainline kernel offers several I/O schedulers:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /sys/block/hdc/queue/scheduler&lt;br /&gt;
noop [anticipatory] deadline cfq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The default since 2.6.18 in Sept 2006 is CFQ, described below, and prior to that was anticipatory a.k.a. &amp;quot;AS&amp;quot; ([[http://en.wikipedia.org/wiki/CFQ#Kernel_2.6.18_.2820_September_2006.29 Wikipedia]]). When running several guests on a host you probably want the I/O performance shared in a fair way among the different guests. The kernel comes with a &amp;quot;completely fair queueing&amp;quot; scheduler, CFQ, which can do that. (More on schedulers can be found at http://lwn.net/Articles/114770/)&lt;br /&gt;
This is how to set the scheduler to &amp;quot;cfq&amp;quot; manually:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root# echo &amp;quot;cfq&amp;quot; &amp;gt; /sys/block/hdc/queue/scheduler&lt;br /&gt;
root# cat /sys/block/hdc/queue/scheduler&lt;br /&gt;
noop anticipatory deadline [cfq]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Keep in mind that you have to do it on all physical discs. So if you run an md-softraid, do it to all physical /dev/hdXYZ discs!&lt;br /&gt;
If you run Debian there is a predefined way to set the /sys values at boot-time:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get install sysfsutils&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# grep cfq /etc/sysfs.conf&lt;br /&gt;
block/sda/queue/scheduler = cfq&lt;br /&gt;
block/sdc/queue/scheduler = cfq&lt;br /&gt;
&lt;br /&gt;
# /etc/init.d/sysfsutils restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For non-vserver processes and CFQ you can set by which key the kernel decides about the fairness:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cat /sys/block/hdc/queue/iosched/key_type&lt;br /&gt;
pgid [tgid] uid gid&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hint: The 'key_type'-feature has been removed in the mainline kernel recently. Don't look for it any longer :(&lt;br /&gt;
&lt;br /&gt;
The default is tgid, which means to share fairly among process groups. Think every guest is treated like a own process group. It's not possible to set a scheduler strategy within a guest. All processes belonging to the same guest are treated like &amp;quot;noop&amp;quot; within the guest. So: If you run apache and some ftp-server within the _same_ guest, there is no fair scheduling between them, but there is fair scheduling between the whole guest and all other guests.&lt;br /&gt;
&lt;br /&gt;
And: It's possible to tune the scheduler parameters in several ways. Have a look at /sys/block/hdc/queue/....&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Nice disk I/O scheduling, is that possible?&lt;br /&gt;
||Details=Well, since linux 2.6.13 processess have another priority next to the cpu nice scheduling hint, it's called io nice.&lt;br /&gt;
It's split into three groups, called real-time, best effort and idle. The default is best-effort, but within best-effort, you can have a niceness from 0 to and including 7.&lt;br /&gt;
You can set this niceness by the tool ionice, which for debian is either in the package util-linux or schedutils.&lt;br /&gt;
To change the io-niceness you need the &amp;lt;tt&amp;gt;CAP_SYS_NICE&amp;lt;/tt&amp;gt;, '''and''' need to have the same uid as the processe you want to ionice.&lt;br /&gt;
&lt;br /&gt;
:'''Note:''' If you want to use any schedulung other than best-effort you will also need the &amp;lt;tt&amp;gt;CAP_SYS_ADMIN&amp;lt;/tt&amp;gt;-flag. Be warned that this gives quite some capabilities to the vserver, not just for I/O scheduling!&lt;br /&gt;
&lt;br /&gt;
If you want to increase the niceness of an I/O hogging process within a vserver you need to do:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
chcontext --xid sponlp1 sudo -u '#2089' ionice -c2 -n5 -p24409&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
with sudo and ionice installed on the root server to increase the *nice*ness of pid 24409, with uid 2089&lt;br /&gt;
|Signature=Groteblup}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want iotop to display all guest processes on host to give me a nice overview of I/O usage.&lt;br /&gt;
||Details=You must allow iotop to read information from all guests. Add &lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
# setattr --watch /proc/vmstat&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
to, for example, rc.local, and later run iotop:&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
# vcontext --migrate --xid 1 -- iotop&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;br /&gt;
|Signature=corey via ser}}&lt;br /&gt;
&lt;br /&gt;
== Unification ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is unification (vunify)?&lt;br /&gt;
||Details=[[Unification]] is Hard Links on Steroids. Guests can 'share' common files (usually binaries and libraries) in a secure way, by creating hard links with special properties (immutable but unlinkable (removable)). The tool to identify common files and to unify them is called [[vunify]].&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is [[vhashify]]?&lt;br /&gt;
||Details=The successor of [[vunify]], a tool which does unification based on hash values (which allows to find common files in arbitrary paths.)&lt;br /&gt;
It creates hardlinks to files named after a hash of the content of the file. If you have a recent version of the vserver patch (2.2+), with CONFIG_VSERVER_COWBL enabled, you can even modify the hardlinked files inside the vservers and the links will be broken automatically.&lt;br /&gt;
There seems to be a catch when a hashified file has multiple hardlinks inside a guest, or when another internal hardlink is added after hashification. Link breaking will remove all the internal hardlinks too, so the guest will end up with different copies of the original file. The correct solution would be to not hashify files that have multiple links prior to hashification, and to break the link to the hashified version when a new internal hardlink is created. Apparently, this is not implemented yet (?).&lt;br /&gt;
|Signature=Guy-}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I manage a multi-guest setup with vhashify?&lt;br /&gt;
||Details=For '[[vhashify]]', just do these once:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /etc/vservers/.defaults/apps/vunify/hash /vservers/.hash&lt;br /&gt;
ln -s /vservers/.hash /etc/vservers/.defaults/apps/vunify/hash/root&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, do this one line per vserver:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir /etc/vservers/&amp;lt;vservername&amp;gt;/apps/vunify   # vhashify reuses vunify configuration&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To hashify a running vserver, do (possibly from a cronjob):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver name-of-guest hashify&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The guest needs to be running because vhashify tries to figure out what files not to hashify by calling the package manager of the guest via &amp;lt;tt&amp;gt;vserver enter&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In order for the OS cache to benefit from the hardlinking, you'll have to restart the vservers.&lt;br /&gt;
&lt;br /&gt;
To clean up hashified files that are no longer referenced by any vserver, do (possibly from a cronjob):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
find /vservers/.hash -type f -links 1 -print0 | xargs -0 rm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Until you do this, the files still take up place even though no vservers need them.&lt;br /&gt;
|Signature=Guy-}}&lt;br /&gt;
&lt;br /&gt;
== Filesystem usage ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is there a way to implement &amp;quot;user/group quota&amp;quot; per VServer?&lt;br /&gt;
||Details=Yes, but not on a shared partition for now. You need to put the guest on a separate partition, setup a vroot device (to make the quota access secure), copy that into the guest, and adjust the mtab line inside the guest. If 8 vroot device is not enough for you, you can add more with the kernel parameter max_vroot (exemple for built in kernel vroot /vmlinuz-2.6.31.6-vs2.3.0.36.26aq root=/dev/md1 ro max_vroot=20 ). If vroot is a module you'd actually want to put for exemple &amp;quot;options vroot max_vroot=20&amp;quot; in /etc/modprobe.conf and then just do modprobe vroot&lt;br /&gt;
|Signature=derjohn,gadnet}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What about &amp;quot;Quota&amp;quot; for a context? Howto limit disk usage?&lt;br /&gt;
||Details=Context quotas are now called Disk Limits (so that we can tell them apart from the user/group quotas :). They are supported out of the box (with vs2.0+) for all major filesystems (ext2/3, ReiserFS, JFS). You need to tag the FS with XID (see below). Please read [[Disk Limits and Quota]] for more information.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I tag a guest's directory with xid?&lt;br /&gt;
||Details=Tagging the guest's files gives you several advantages, e.g. the accounting will work properly.&lt;br /&gt;
Filesystem XID tagging only works on supported filesystem. Those are currently: ext2/3, reiserfs/reiser3, xfs and jfs.&lt;br /&gt;
To activate the XID tagging you have to mount the filesystem with &amp;quot;-o tag&amp;quot; (former tagxid is outdated since VS2.2). Attention: It's _not_ possible to &amp;quot;-o remount,tag&amp;quot;, you have to mount it freshly. The guests will tag their files automatiaclly. If you copy files in from the host, you have to tag them manually like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chxid -c xid -R /var/lib/vservers/&amp;lt;guest&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note: Context 0 and 1 will see all files, guests will only be able to access untagged files and their own XID. They can see other XID files but no information about the file, e.g. no owner, no group, no permissions.&lt;br /&gt;
Note: It is not advised to tag the root filesystem, as [http://www.paul.sladen.org/vserver/archives/200602/0020.html explained by Herbert] : trying to do so will expose you to some troubles !&lt;br /&gt;
|Signature=derjohn_and_gonzo_and_are}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I copy anything from host to guest partition, normally unvisible on host?&lt;br /&gt;
||Details=You should just change namespace, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace --enter &amp;lt;xid&amp;gt; -- /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and then use standard cp or rsync programs.&lt;br /&gt;
|Signature=SergiuszPawlowicz}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why is the barrier attribute disappearing on reiserfs filesystem after umount or host reboot?&lt;br /&gt;
||Details=The filesystem has to be mounted with explicitly defining the 'attrs' option, i.e. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount /dev/reiserfsdev /vservers -oattrs&lt;br /&gt;
setattr --barrier /vservers&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
to get the barrier survive after umount/reboot.&lt;br /&gt;
|Signature=Nikolay Kichukov}}&lt;br /&gt;
&lt;br /&gt;
== Network ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Does it support IPv6?&lt;br /&gt;
||Details=Currently it requires an additional patch, but the functionality should be available in 2.3+ soon. [[IPv6]] has more information.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I can't do all I want with the network interfaces inside the guest?&lt;br /&gt;
||Details=For now the networking is 'Host Business' -- the host is a router, and each guest is a server. You can set the capability ICMP_RAW in the context of the guest, or even the capability CAP_NET_RAW (which would even allow to sniff interfaces of other guests!). Likely to change with ngnet.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I add several IPs to a vserver?&lt;br /&gt;
||Details=First of all a single guest vserver only supports up to 16 IPs (There is a 64-IP patch available, which is in &amp;quot;derjohn's kernel&amp;quot;).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Update from IRC (2011-08-22):&lt;br /&gt;
&amp;lt;mmouse&amp;gt; quick question: what is the maximum count of IPs (v4) I can have in a single guest?&lt;br /&gt;
&amp;lt;daniel_hozac&amp;gt; unlimited.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a little helper-script that adds a list of IPs defined in a text file, one per line.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
j=1&lt;br /&gt;
for i in `cat myiplist`; do&lt;br /&gt;
        j=$(($j+1))&lt;br /&gt;
        mkdir $j&lt;br /&gt;
        echo $i &amp;gt; $j/ip&lt;br /&gt;
        echo &amp;quot;24&amp;quot; &amp;gt; $j/prefix&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I assign a new IP address to a running guest?&lt;br /&gt;
||Details=This is done from the host server:&lt;br /&gt;
* add the ip on the host, for example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ip addr add 194.169.123.23/24 dev eth0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* add the ip to the guest's network context (a guests NID is the same as the XID {context ID})&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
naddress --add --nid &amp;lt;nid&amp;gt; --ip 194.169.123.23/24 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* enter the guest (best via ssh) &lt;br /&gt;
* restart the services that need to make use of the new address if required &lt;br /&gt;
* update the config in ''/etc/vserver/&amp;lt;servername&amp;gt;/interfaces'' to reflect the changes for the next guest restart (if desired)&lt;br /&gt;
|Signature=BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=If my host has only one a single public IP, can I use RFC1918 IP (e.g. 192.168.foo.bar) for the guest vservers?&lt;br /&gt;
||Details=Yes, use iptables with SNAT to masquerade it. &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -t nat -I POSTROUTING -s $VSERVER_NETZ  ! -d $VSERVER_NETZ -j SNAT --to $EXT_IP&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
See: [[HowtoPrivateNetworking]] and &lt;br /&gt;
http://www.tgunkel.de/it/software/doc/linux_server.en#h3-VServer_Masquerading_SNAT (THX, [MUPPETS]Gonzo)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=If I shut down my vserver guest, the whole Internet interface ethX on the host is shut down.  What happened?&lt;br /&gt;
||Details=When you shut down a guest (''i.e. vserver foo stop''), the IP is brought down on the host also. If this IP happens to be the primary IP of the host, the kernel will not only bring down the primary IP, but also all secondary IP addresses. Similarly, if your guests bring up IPs of more than one subnet, all other IPs from a specific subnet will be shut down if you stop the guest which created the first (&amp;quot;parent&amp;quot;) IP.&lt;br /&gt;
&lt;br /&gt;
You can check this on the host using the command &amp;quot;ip addr show&amp;quot;. Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1: eth0: &amp;lt;BROADCAST,MULTICAST,UP,LOWER_UP&amp;gt; mtu 1500 qdisc pfifo_fast state UP qlen 1000&lt;br /&gt;
    link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff&lt;br /&gt;
    inet 192.168.249.172/27 brd 192.168.249.191 scope global eth0&lt;br /&gt;
    inet 192.168.234.194/27 brd 192.168.234.223 scope global eth0&lt;br /&gt;
    inet 192.168.249.169/27 brd 192.168.249.191 scope global secondary eth0&lt;br /&gt;
    inet 192.168.234.195/27 brd 192.168.234.223 scope global secondary eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In this example, if you stop the guest which brings down the IP 192.168.249.172, the IP 192.168.249.169 will be brought down as well, because it is a secondary IP of the &amp;quot;parent&amp;quot; 192.168.249.172.&lt;br /&gt;
&lt;br /&gt;
But in very recent kernels, there is an option ''settable'' which prevents that nasty feature. It's called &amp;quot;alias promotion&amp;quot;. You may set it via sysctl by adding ''net.ipv4.conf.all.promote_secondaries=1'' in /etc/sysctl.conf or via sysctl command line.&lt;br /&gt;
|Signature=derjohn, Hurga}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Can I run an OpenVPN Server in a guest?&lt;br /&gt;
||Details=&lt;br /&gt;
Yes. To get a OpenVPN Server running in a guest, all networking setup has to be done on the host. This answer describes the common case and shows some pitfalls, for detailled information about OpenVPN, please consult the appropriate documentation on the OpenVPN homepage.&lt;br /&gt;
This is the minimal OpenVPN configuration for the Server which will be used to demonstrate how to get it running in a client:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Networking setup&lt;br /&gt;
server 192.168.16.0     255.255.255.0&lt;br /&gt;
dev tun16&lt;br /&gt;
ifconfig-noexec&lt;br /&gt;
comp-lzo&lt;br /&gt;
# Certificates&lt;br /&gt;
dh ...&lt;br /&gt;
ca ...&lt;br /&gt;
cert ...&lt;br /&gt;
key ...&lt;br /&gt;
# Management&lt;br /&gt;
persist-key&lt;br /&gt;
keepalive 10 60&lt;br /&gt;
verb 4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
First of all you have to prepare the host with a persistent interface in the right mode and with the right settings. This is easily done by using openvpn and the ip and route tools.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# openvpn --mktun --dev tun16&lt;br /&gt;
# ip link set dev tun16 txqueuelen 100&lt;br /&gt;
# ifconfig tun16 192.168.16.1 pointopoint 192.168.16.2 mtu 1500&lt;br /&gt;
# route add -net 192.168.16.0 netmask 255.255.255.0 gw 192.168.16.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you need different settings, openvpn will tell you the ifconfig and route commands it uses to configure the interface when being started on the host with the original config file, but without ifconfig-noexec.&lt;br /&gt;
Additionally, the guest needs /dev/net/tun to make OpenVPN happy. This can be created with MAKEDEV:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /var/lib/vserver/&amp;lt;myopenvpnserver&amp;gt;/dev/&lt;br /&gt;
# ./MAKEDEV tun&lt;br /&gt;
  (creates the dev/net/tun device accessible by the guest - even a tap interface needs /dev/net/tun !)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Finally, the guest needs to have the tun device assigned:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# head /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/*&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/ip &amp;lt;==&lt;br /&gt;
192.168.16.1&lt;br /&gt;
&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/nodev &amp;lt;==&lt;br /&gt;
tun16&lt;br /&gt;
&lt;br /&gt;
==&amp;gt; /etc/vservers/&amp;lt;myopenvpnserver&amp;gt;/interfaces/1/prefix &amp;lt;==&lt;br /&gt;
24&lt;br /&gt;
#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The client's conf may look like that:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Basic setup&lt;br /&gt;
client&lt;br /&gt;
proto tcp-client&lt;br /&gt;
dev tun&lt;br /&gt;
remote &amp;lt;ipaddress&amp;gt;&lt;br /&gt;
comp-lzo&lt;br /&gt;
verb 4&lt;br /&gt;
&lt;br /&gt;
# Certificate&lt;br /&gt;
ca ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[ Based on derJohn's original answer, all errors mine ] &lt;br /&gt;
|Signature=DavidS}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Trying to connect to a vserver from the host or another vserver on the same host fails&lt;br /&gt;
||Details=strace shows&lt;br /&gt;
&amp;lt;pre&amp;gt; &lt;br /&gt;
sin_addr=inet_addr(&amp;quot;xx.xx.xx.xx&amp;quot;)}, yy) = -1 EINVAL (Invalid argument)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
A: The host/guest cannot communicate with another guest on same host.&lt;br /&gt;
* check all netmasks on all interfaces (do they overlap) ?&lt;br /&gt;
* check policy routing (disable it temporary) ?&lt;br /&gt;
* check that lo is up (Networking within a host/guest always uses lo interface)&lt;br /&gt;
|Signature=CommonProblems}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Can I use iptables ?&lt;br /&gt;
||Details=Yes but right now only on the host (rootserver). Please realize that all traffic is local and will not touch the forward chain.&lt;br /&gt;
&amp;lt;br&amp;gt;If you really, really, really need iptables on the guest and you are aware about loosing a big part of VServer isolation and security you could add the NET_ADMIN capability. Consider writing wrappers to manage iptables on the host instead.&lt;br /&gt;
|Signature=_are_}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to prevent guest from bringing down primary ip?&lt;br /&gt;
||Details=Yes. Remove /etc/vservers/&amp;lt;guest&amp;gt;/interfaces/X/dev, and touch /etc/vservers/&amp;lt;guest&amp;gt;/interfaces/X/nodev&lt;br /&gt;
|Signature=Daniel&amp;amp;Serge}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to provide a different MAC address per vServer?&lt;br /&gt;
||Details=Short answer - yes but it's a hassle.&lt;br /&gt;
&lt;br /&gt;
Real answer from '''_are_''':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
When I once needed 'real' seperate MAC-addresses I used TAP-devices and VDE2 ([http://vde.sourceforge.net/ Virtual Distributed Ethernet]).&lt;br /&gt;
Basically vServer is an isolation of existing resources, not a virtualization of 'new' devices.&lt;br /&gt;
Without extra fuss you can't add a 'new' network interface to a vServer, no matter if it is eth* or tap*, you always add it to the host and give the vServer access to it.&lt;br /&gt;
I got the TAP+VDE2 up and running, but I think it is too much trouble for basically the simple adding of IPs to a vServer unless you really need the MAC address separate.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can also utilize MACVLAN ability from kernel.&lt;br /&gt;
I.e. create ''macvlan0'' interface with:&lt;br /&gt;
&amp;lt;pre&amp;gt;ip link add link eth0 address 00:19:d1:29:d2:58 macvlan0 type macvlan&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[http://jim.studt.net/depository/index.php/notes-on-linux-s-macvlan-module Reference]]&lt;br /&gt;
|Signature=bobnormal&amp;amp;swenTjuln&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is it possible to hide packet counters on the host network interface from vServer guests?&lt;br /&gt;
||Details=Yes, see [[Networking_vserver_guests|Networking vServer Guests]]&lt;br /&gt;
|Signature=bobnormal}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Services won't bind to 127.0.0.1 when I configure them to bind to all available IPs / (binding service to * doesn't bind to loopback)?&lt;br /&gt;
||Details=You've configured single public IP and have kernel option &amp;quot;Linux VServer -&amp;gt; Automatic Single IP Special Casing&amp;quot; enabled.&lt;br /&gt;
It means somehow &amp;quot;optimized&amp;quot; :D&lt;br /&gt;
If you don't want this you have 3 possible solutions (quoting Bertl):&lt;br /&gt;
  * disable the auto single IP in the kernel&lt;br /&gt;
  * assign more than one IP to the guest&lt;br /&gt;
  * disable single ip special casing for that guest&lt;br /&gt;
&lt;br /&gt;
The later is done by : echo &amp;quot;~single_ip&amp;quot; &amp;gt;&amp;gt; /etc/vservers/&amp;lt;VSERVER&amp;gt;/nflags&lt;br /&gt;
At runtime to avoid restarting the vserver: nattribute --set --nid &amp;lt;guest&amp;gt; --flag ~single_ip&lt;br /&gt;
|Signature=swenTjuln}}&lt;br /&gt;
&lt;br /&gt;
== Administration tools ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Which guest vservers are running?&lt;br /&gt;
||Details=Use vserver-stat to find out.  Example output:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CTX   PROC    VSZ    RSS  userTIME   sysTIME    UPTIME NAME&lt;br /&gt;
0       77 965.1M 334.6M  14m14s18   2m28s69   1h33m46 root server&lt;br /&gt;
49152    7    14M   5.2M   0m00s40   0m00s30   1h30m15 chiffon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is there a web-based interface for vserver that will allow creation/deletion/configuration etc. of vserver guests?&lt;br /&gt;
||Details=&lt;br /&gt;
* http://OpenVPS.org which is a set of scripts with a web-interface for webhosters/ISPs&lt;br /&gt;
* http://Openvcp.org which is a distributed system (agent!) with a web-interface, with which you can build/remove guests&lt;br /&gt;
* http://vsmon.revolutionlinux.com/ is a distributed monitoring-only solution that allows you to search for a particular vserver in your park.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
== Hosting foreign distributions ==&lt;br /&gt;
 &lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I run a Debian host and want to build an Ubuntu guest. Howto?&lt;br /&gt;
||Details=Simple ;) Assume you want to build a breezy guest on a sid host with IP 192.168.0.2 and hostname vubuntu, then do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver vubuntu build --force -m debootstrap --hostname vubuntu.myvservers.net --netdev eth0 --interface 192.168.0.2/24 \&lt;br /&gt;
--context 42 -- -d breezy -m http://de.archive.ubuntu.com/ubuntu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[UPDATE] Currently there are problems in building breezy under unclear circumstances, which seems to have to do with udev. If the above didnt work, try:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver vubuntu build --force -m debootstrap --hostname vubuntu.myvservers.net --netdev eth0 --interface 192.168.0.2/24 \&lt;br /&gt;
--context 42 -- -d breezy -m http://de.archive.ubuntu.com/ubuntu -- --exclude=udev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In very recent versions of the utils, the problem should not occur anymore (it has to do with the 'secure-mount' if you look in the MLs)&lt;br /&gt;
&lt;br /&gt;
Well, sid's debootstrap knows how to bootstrap Ubuntu linux. Make sure to have a current debootstrap package: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get update&lt;br /&gt;
apt-get install debootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 The knowledge how to build ubuntu 'breezy badger' (which you probably want to be your guest at the time of writing) has been added recently.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want to build a Gentoo guest. Howto?&lt;br /&gt;
||Details=Even simpler ;) See http://www.gentoo.org/proj/en/vps/vserver-howto.xml#doc_chap3 .&lt;br /&gt;
|Signature=gcc}}&lt;br /&gt;
&lt;br /&gt;
== Application level problems ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I did everything right, but the application foo does not start. What's up there?&lt;br /&gt;
||Details=Before asking on the IRC channel, please check out the 'problematic programs' page:&lt;br /&gt;
[[Problematic Programs]]&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to ssh to the guest, I log into the host, even if I installed sshd on the guest. What's wrong here?&lt;br /&gt;
||Details=Look at /etc/ssh/sshd_config of the host:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Port 22&lt;br /&gt;
# Use these options to restrict which interfaces/protocols sshd will bind to&lt;br /&gt;
#ListenAddress ::&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And now change the setting to &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Port 22&lt;br /&gt;
# Use these options to restrict which interfaces/protocols sshd will bind to&lt;br /&gt;
ListenAddress your.hosts.ip.here  # not the guests IP! &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then '/etc/init.d/ssh restart' on the host, after that on the guest (if you did apt-get install ssh on the guest already.)&lt;br /&gt;
Do I have to explain more? If the hosts sshd binds all available IP addresses on port 22 (The hosts 'sees' even all addresses of the guests!). So if the guest starts its sshd, it can't bind to port 22 any more. You need to change that setting only on the host. &lt;br /&gt;
(BTW: A similar approach has to be done for a lot of daemons, e.g. Apache. If the daemon does not support an explicit bind, you may use the chbind command to 'hide' IP addresses from the daemon before starting.)|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Bind9 does not like to start in my guest.&lt;br /&gt;
||Details=Check out the [[Problematic Programs]] page and/or get my [http://linux-vserver.derjohn.de/bind9-packages/bind9-capacheck_9.3.2-2_i386.deb vserver-guest-ready Debian package] for Debian Sid guests and check out the [http://linux-vserver.derjohn.de/bind9-packages/README.txt readme]. (Hint: This is fresh stuff. Please give me feedback)&lt;br /&gt;
 &lt;br /&gt;
[UPDATE] Since VServer Devel 2.1.1-rc18 you do not need to patch the userland tools anymore. The capabilities are masked.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=My mysqld running in a guest behaves strangely and is awfully slow/locks up&lt;br /&gt;
||Details=This can be related to /tmp being too small. mysqld stores temporary tables in /tmp and as such, if a lot of queries happen and /tmp runs full this can cause one query to lock up whilst creating the tmp table and all other queries waiting to acquire the lock. There are two possible solutions to that problem: a.) Modify /etc/vservers/vserver-name/fstab and assign more memory to the tmpfs of /tmp and b.) remove the /tmp entry from /etc/vservers/vserver-name/fstab completly. Especially on database servers with a rather high load the second one might be the preferred method.|Signature=sp}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Pure-FTP does not run inside a VServer?&lt;br /&gt;
||Details=That's because it has capabilities enabled, make sure you rebuild your distro's package passing also the `--without-capabilities` flag to configure.&lt;br /&gt;
|Signature=Pedro Algarvio, aka, s0undt3ch}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why do neither sshd nor crond (vixie-cron) work correctly in my CentOS / Fedora guest? I get 'pam_loginuid(crond:session): set_loginuid failed opening loginuid' and similar lines in my logs.&lt;br /&gt;
||Details=Took me a while to figure this out, and it turned out to be mentioned in the old wiki. Here is the solution on how to solve a common problem with sshd / crond, somehow related to selinux and auditing:&lt;br /&gt;
&lt;br /&gt;
pam authentication (also used with openssh) enables &amp;quot;pam_loginuid.so&amp;quot; in the /etc/pam.d/* files. Comment those out as they are not necessary and will not load within a guest anyway. This probably is also necessary on updates later on, if the configs get changed. You therefore may add the following command line to a cronjob file or your software update script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/bin/sed --in-place -e &amp;quot;s/^session.*required.*pam_loginuid.so/# session\trequired\tpam_loginuid.so/g&amp;quot; /etc/pam.d/*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=patrick}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do i install nagios-plugins on a Gentoo guest?&lt;br /&gt;
||Details=Unfortunately, the nagios-plugins ./configure scripts wants to ping 127.0.0.1 which is not available inside a guest. Therefore you have to build nagios-plugins outside the guest.&lt;br /&gt;
The easiest way to do this from the host (assuming the guest is running) is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;xid&amp;gt; -- chroot /vservers/&amp;lt;name&amp;gt; emerge nagios-plugins -va&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=Hollow}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Somebody runs ntpd in guest and you can't use ntpdate in host?&lt;br /&gt;
||Details=Try to run ntpdate with options -u :&lt;br /&gt;
 ntpdate -u ntp.domain.xy&lt;br /&gt;
or you can use command:&lt;br /&gt;
 chbind --nid 42 --ip 1.2.3.4 -- ntpdate ntp.domain.xy&lt;br /&gt;
where IP will be the IP of host.&lt;br /&gt;
|Signature=Punkie/Bertl}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Start / Stop a VServer ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I make a vserver guest start by default?&lt;br /&gt;
||Details=At least on Debian, I can tell you how to do it with the new-style config. If your guest is called &amp;quot;derjohn&amp;quot; and you want it to be started somewhere at the of your bootstrap process, then do:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;default&amp;quot; &amp;gt; /etc/vservers/derjohn/apps/init/mark&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you want to start it earlier, please read the init script &amp;quot;/etc/init.d/util-vserver&amp;quot; to find out how to do it. In most cases you don't need to change this. On Debian the vservers are started at &amp;quot;20&amp;quot;, so after most other stuff is up (networking etc.).&lt;br /&gt;
&lt;br /&gt;
Besides that I created a small helper script for managing the autostart foo: ((vserver-autostart))|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=My host works, but when I start a guest it says that it has a problem with chbind.&lt;br /&gt;
||Details=You are probably using util-vserver &amp;lt;= 0.30.209, which does use dynamic network contexts internally (With 0.30.210 this fact changed). So if you compiled your kernel without dynamic contexts, you may start guests, but you can't use the network context.The solution is either to switch to .210 util (or Hollow's toolset) or compile the kernel with dynamic network contexts.&lt;br /&gt;
SE Keyword: invalid option `nid' testme.sh&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is old-style and new-style config?&lt;br /&gt;
||Details=Old-style config refers to a single text-file that contains all the configuration settings. With new-style config the configuration is split into several directories and files. You should probably go for new-style config if you are asking.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I reboot/halt guests?&lt;br /&gt;
||Details=It depends. &lt;br /&gt;
For legacy Linux-VServer (i.e. 1.2.x), you have to replace /sbin/halt in the guests with vreboot and start rebootmgr in the host. You also need to have a &amp;lt;guest&amp;gt;.conf file in /etc/vservers for each guest. Please have a look at /etc/init.d/rebootmgr.&lt;br /&gt;
For Linux-VServer 2.0+, sys_reboot has been virtualized to do the right thing. No changes are needed in guests. Please note that some things depend on the init style used by the guest : read [[util-vserver:InitStyles]]&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What is the initial PATH?&lt;br /&gt;
||Details=By default, vserver uses the 'sysv' startup style, which mimics the init process by running the 3rd runlevel through '/etc/init.d/rc 3' (or '/etc/rc.d/rc 3'). Usually this 'rc' script uses a hard-coded PATH. In the case it doesn't, util-vserver also mimics init's default PATH through /etc/vservers/.defaults/apps/init/environment, or if not present /usr/local/lib/util-vserver/defaults/environment. Beware that all those default PATH usually do not include /usr/local.&lt;br /&gt;
|Signature=daniel_hozac&amp;amp;Beuc}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to start a guest i get this message &amp;quot;/proc/uptime can not be accessed. Usually, this is caused by procfs-security. Please read the FAQ for more details&amp;quot;?&lt;br /&gt;
||Details=After a reboot you need to run the vprocunhide script. If running this script causes many errors to print on the screen, try checking the kernel you have booted with (perhaps it does not have the linux-vserver extensions enabled).&lt;br /&gt;
|Signature=mattzerah}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When I try to start a guest i get this message &amp;quot;vsched: vc_set_sched(): Function not implemented&amp;quot;.  &lt;br /&gt;
||Details=After an upgrade of the kernel/tools if you used the old scheduler function you must convert them to cgroup cpu limits. If you do not want limits search and remove/rename /etc/vservers/*/sched/ and the guest will start again.&lt;br /&gt;
|Signature=aqueos}}&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Is SMP Supported?&lt;br /&gt;
||Details=Yes, on all SMP capable kernel architectures.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Do I really need the legacy-interfaces? What are these legacy-interfaces?&lt;br /&gt;
||Details=Since Linux-VServer is an ongoing project, new features might replace old ones, some might require a development version. Legacy-interfaces are available for backward compability (which might be removed someday) with Linux-VServer 1.2.x.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I have a vserver running on a Linux kernel with preemption. Is VServer &amp;quot;preempt&amp;quot; safe?&lt;br /&gt;
||Details=There are no known issues about running vserver on a preemption enabled kernel. I would like to add, that the vserver kernelhackers would probably exclude that option in 'make menuconfig' if there would be an incompatibility. Just my $.02 :)&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=32 vs 64 Bit? What should I take?&lt;br /&gt;
||Details=If you have the choice make the host a 64 bit one. You can run a guest as 32 bit or as 64 bit on a 64 bit host. To run it as 32 bit, you need to compile the x86_64 (a.k.a. AMD64) with the following options:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[*] Kernel support for ELF binaries&lt;br /&gt;
&amp;lt;M&amp;gt; Kernel support for MISC binaries&lt;br /&gt;
[*] IA32 Emulation &amp;lt;---- without that, the entire 32bit API is not present&lt;br /&gt;
&amp;lt;M&amp;gt;   IA32 a.out support  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
You can force the guest to behave like a 32 environment like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo linux_32bit &amp;gt; /etc/vservers/$NAME/personality&lt;br /&gt;
echo i686 &amp;gt; /etc/vservers/$NAME/uts/machine&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(thanks cehteh for the hint!)&lt;br /&gt;
&lt;br /&gt;
But you can force debootstrap to put 32 bit binaries into the guest by 'export ARCH=i386';&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ARCH=i386 ; vserver build .... &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On debian when using the newvserver script &amp;quot;export ARCH=i386&amp;quot; has no effect, just use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
newvserver --arch i386 ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On debian debootstrap can also be gived the arch option:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vserver myguest \&lt;br /&gt;
build -m debootstrap -n myguest \&lt;br /&gt;
--hostname myguest.mydomain.com \&lt;br /&gt;
-- -d squeeze -- \&lt;br /&gt;
--arch=amd64  (or i386 if you want 32bit)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=What does the guest privacy option do in the kernel settings ?&lt;br /&gt;
||Details=&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt;i was wondering about the real thing that guest privacy does. &lt;br /&gt;
#ifdef  CONFIG_VSERVER_PRIVACY&lt;br /&gt;
#define VS_ADMIN_P      (0)&lt;br /&gt;
#define VS_WATCH_P      (0)&lt;br /&gt;
#else&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &amp;gt; Does it just prevent the spectator context ? &lt;br /&gt;
 &lt;br /&gt;
it prevents the spectator context and the admin &lt;br /&gt;
functionality in all cases which are privacy&lt;br /&gt;
sensitive, which includes:&lt;br /&gt;
&lt;br /&gt;
 - ptrace&lt;br /&gt;
 - devmapper&lt;br /&gt;
 - devpts&lt;br /&gt;
 - inode tag permissions&lt;br /&gt;
 - mountinfo&lt;br /&gt;
 - kill/signal&lt;br /&gt;
 - netlink dumps&lt;br /&gt;
 - tun control&lt;br /&gt;
 - iopriority&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &amp;gt; What security do it bring to the system ?&lt;br /&gt;
&lt;br /&gt;
together with the VXF_STATE_ADMIN it can be&lt;br /&gt;
used to secure a guest (to some degree) from&lt;br /&gt;
unwanted access from the host admin, of course,&lt;br /&gt;
as the admin can change the kernel, this is a&lt;br /&gt;
voluntary feature which mostly prevents certain&lt;br /&gt;
kinds of accidential peeking or guest modification&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=ghislain}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Distribution specific questions ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=VServer is included in the stable Debian GNU/Linux for years now. What VS version did they include?&lt;br /&gt;
||Details=At the time of writing, Debian Squeeze is the stable release of Debian and includes a 2.6.32 based kernel-package called 2.6.32-5-vserver-ARCH. This currently contains VServer 2.3.0.36.29.6 with some additional fixes.&lt;br /&gt;
|Signature=scientes}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Were can I get newer versions of VServer as ready made packages for Debian?&lt;br /&gt;
||Details= There are a number of locations&lt;br /&gt;
* http://repo.psand.net/info/ has Debian Lenny, Squeeze and Wheezy repositories. Many kernel versions are present. Currently (Febraury 2013) 3.2 kernels are being maintained for Wheezy. 2.6.36, 3.2 kernels are maintained for Squeeze. Support for Squeeze will be promptly dropped when Wheezy is released. Architecture avialable are i386 and amd64. This repository also contains newer util-vserver builds.&lt;br /&gt;
&lt;br /&gt;
Older unmaintained repositories are here:&lt;br /&gt;
&lt;br /&gt;
* http://linux-vserver.derjohn.de/ - &amp;quot;my kernels are always 'devel' branch&amp;quot; (derjohn). This repo contain kernels up to 2.6.29 for amd64, 2.6.26 for i386.&lt;br /&gt;
* http://backports.debian.org/ contains 2.6.32 backports for Lenny at time of writing (11th May 2010)&lt;br /&gt;
* http://zbla.net/debian/ Unofficial debian vserver packages '''WARNING : i386 packets are compiled for 64bits !''' apt source line: ''deb http://zbla.net/debian/ ./'' (N/A as of 2011/12/27)&lt;br /&gt;
|Signature=Gremble&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Were can I get newer versions of VServer as ready made packages for Ubuntu?&lt;br /&gt;
||Details= There is only one location for &lt;br /&gt;
*http://repo-ubuntu.psand.net/dists/ is the only repository maintained for Ubuntu. It covers Precise (LTS) and the 3.2 kernel series for amd64 and i386.&lt;br /&gt;
|Signature=Gremble&lt;br /&gt;
}}&lt;br /&gt;
== Misc ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Why isn't there a device /dev/xyz within a guest?&lt;br /&gt;
||Details=Device nodes allow userspace to access hardware (or virtual resources). Creating a device node inside the guest's namespace will give access to that device, so for security reasons, the number of 'given' devices is small.&lt;br /&gt;
|Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I want to (re)mount a virtual filesystem (like tmpfs) in a running guest ... but the guest has no rights (capability) to (re)mount?&lt;br /&gt;
||Details=I take as example your /tmp partition within the guest is too small, what will be likely the case if you stay with the 16MB default (vserver build mounts /tmp as 16 MB tmpfs!).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vnamespace -e XID  mount -t tmpfs -o remount,size=256m,mode=1777 none /var/lib/vservers/&amp;lt;guest&amp;gt;/tmp/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(if there's a problem, try expanding the symlinks in the mount path)&lt;br /&gt;
Be warned that the guest will not recognize the change, as the /etc/mtab file is not updated when you mount like this. To permanently change the mount, edit /etc/vserver/&amp;lt;guest&amp;gt;/fstab on the host.&lt;br /&gt;
&lt;br /&gt;
If you get:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount: can't find /var/lib/vservers/&amp;lt;guest&amp;gt;/tmp in /etc/fstab or /etc/mtab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
then try instead:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e builder chroot /var/lib/vservers/&amp;lt;guest&amp;gt;/ mount -o remount,size=64m,mode=1777 /tmp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=derjohn/BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I bind mount a host directory inside a running guest?&lt;br /&gt;
||Details=There are two ways to do this: one is to enter the bind mount in the guest fstab and restart the guest.&lt;br /&gt;
&lt;br /&gt;
To understand the other way, let me explain how mount namespaces work.&lt;br /&gt;
&lt;br /&gt;
Every guest has two mount namespaces associated with it: one &amp;quot;''management namespace''&amp;quot; and one &amp;quot;''operational namespace''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
On starting the guest, first the management namespace is created as a copy of the host namespace (which means that everything that was mounted on the host is mounted in the new namespace as well). This has unwelcome side effects: for example, if you had a cdrom mounted while starting the guest, you wouldn't be able to eject it until you stop the guest even if you umount it on the host, because it's still mounted in the guest. Therefore, the namespace is ''cleaned up'': filesystems that are mounted outside the root of the guest get unmounted in the guest namespace.&lt;br /&gt;
&lt;br /&gt;
Subsequently, the operational namespace of the guest is created as a copy of the management namespace, and the guest's processes are started in it.&lt;br /&gt;
&lt;br /&gt;
To bind mount a host directory in the guest, you must first make that host directory visible in the management namespace of the guest. This is automatically the case if the directory resides inside a mountpoint that exists in the guest namespace as well; however, if the guest config referenced no part of this mountpoint (or it didn't yet exist when you started the guest), then the cleanup mentioned above removed it from the guest's management namespace and you need to re-add it.&lt;br /&gt;
&lt;br /&gt;
Let's assume, as an example, that we want a guest to see a subdirectory, called &amp;lt;tt&amp;gt;foo&amp;lt;/tt&amp;gt;, of the cdrom we just mounted on the host (e.g. under &amp;lt;tt&amp;gt;/media/cdrom&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Let's enter the management namespace of the guest (that's what &amp;lt;tt&amp;gt;-i 0&amp;lt;/tt&amp;gt; is for):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vnamespace -i 0 -e &amp;lt;guest-xid&amp;gt; -- /bin/bash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you have access to all host devices; mount the device that contains your directory wherever you want, but you may prefer to mount it in the same location you used on the host. (Note, though, that it's not even necessary for the device to be mounted in the host namespace at all.)&lt;br /&gt;
&lt;br /&gt;
It's likely best to use &amp;lt;tt&amp;gt;mount -n&amp;lt;/tt&amp;gt; lest your host &amp;lt;tt&amp;gt;/etc/mtab&amp;lt;/tt&amp;gt; get polluted with mounts from other namespaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mount -n /dev/sr0 /media/cdrom&lt;br /&gt;
# exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We're now back in the host namespace. &amp;lt;tt&amp;gt;vmount&amp;lt;/tt&amp;gt; can now be used to bind mount &amp;lt;tt&amp;gt;/media/cdrom/foo&amp;lt;/tt&amp;gt; inside a running guest (in this example, under &amp;lt;tt&amp;gt;/foo&amp;lt;/tt&amp;gt; inside the vserver root):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# vmount guestname -- --bind /media/cdrom/foo /mnt/foo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=[[User:KornAndras|Guy-]] 01:31, 10 January 2012 (UTC)}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I mount a device present on the host under a directory in a running guest?&lt;br /&gt;
||Details=Use something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;guestname&amp;gt; mount -n /dev/&amp;lt;device&amp;gt; /vservers/&amp;lt;guest&amp;gt;/place/you/want/to/mount/it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This device can be unmounted with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vnamespace -e &amp;lt;guestname&amp;gt; umount -n /vservers/&amp;lt;guest&amp;gt;/place/you/want/to/mount/it&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|Signature=derjohn/BenjaminGreen}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Does anyone know how to increase the size of /tmp within a vserver w/o restarting?&lt;br /&gt;
||Details=Use the remount option for mount.&lt;br /&gt;
 # vnamespace -e XID mount -n -t tmpfs -o remount,size=32m tmpfs /&amp;lt;vdir&amp;gt;/&amp;lt;guest&amp;gt;/tmp&lt;br /&gt;
or something like that.  The arguments are needed since mount is not going to be using /etc/fstab for the information and the version of /proc/mounts is best understood by&lt;br /&gt;
 # vnamespace -e XID cat /proc/mounts.&lt;br /&gt;
See [[Frequently_Asked_Questions#I want to (re)mount a partition in a running guest ... but the guest has no rights (capability) to (re)mount?]]&lt;br /&gt;
|Signature=derjohn/dhozac}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=#1 ERROR:  capset(): Operation not permitted&lt;br /&gt;
||Details=capabilities are not enabled in kernel-setup&lt;br /&gt;
please check that CONFIG_SECURITY_CAPABILITIES is loaded or included in the kernel. ( check with &amp;quot;cat /path_to_kernel/.config | grep -i cap &amp;quot;) &lt;br /&gt;
(2.6.11.5-vs-1.9.5 + 0.30-205)&lt;br /&gt;
|Signature=IrcQuestions}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How can I make 'vserver start' mount the root filesystem?&lt;br /&gt;
||Details=Mount it via /etc/vservers/vserver-name/fstab, make sure to set the option 'dev' e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;/dev/drbd0     /       xfs     rw,dev          0 0&amp;lt;/pre&amp;gt;&lt;br /&gt;
|Signature=AdrianReyer}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I deleted a guest's directory without shutting it down. Now I have a &amp;quot;ghost&amp;quot; running. Is there any possibility to get it out of proc without rebooting?&lt;br /&gt;
||Details=&lt;br /&gt;
 vkill --xid &amp;lt;xid&amp;gt; -s 15; sleep 2; vkill --xid &amp;lt;xid&amp;gt; -s 9&lt;br /&gt;
&lt;br /&gt;
You will also need to remove guest's ip, for example with:&lt;br /&gt;
 ip addr del &amp;lt;ip&amp;gt; dev eth0&lt;br /&gt;
|Signature=daniel_hozac &amp;amp; gebura }}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=When using nice and su (for example, in the updatedb cron job), I get: su: Permission denied. What does it mean?&lt;br /&gt;
||Details=A guest cannot lower its nice value - and that's what 'su' does through pam_limits which sets a nice value of 0. You can see it through strace:&lt;br /&gt;
 $ strace nice su nobody&lt;br /&gt;
 [...]&lt;br /&gt;
 setpriority(PRIO_PROCESS, 0, 0)         = -1 EACCES (Permission denied)&lt;br /&gt;
You can use 'su nobody -c nice some_cmd' instead.&lt;br /&gt;
&lt;br /&gt;
The problem is caused by the fact that host system is setting limits for guests (when instructed to do so) and the dropped capability dissallows processess on guest systems to change and increase them later. That means no process on a guest can lower nice value above the limit set by host.&lt;br /&gt;
&lt;br /&gt;
If the pam_limits module is activated on a guest system it will first try to '''reset nice value to 0''' even if &amp;lt;tt&amp;gt;/etc/security/limits.conf&amp;lt;/tt&amp;gt; file is empty or even if there are lower priority limits set in it. The pam_limits module does that since [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=241663 its developers decided] that it should reset some limits to defaults and start from scratch when applying new restrictions. Unfortunately, already limited guest system won't be able to do it since resetting nice value to 0 means increasing the limit which is forbidden. See [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311058 Debian Bug report logs - #311058] for more information about that Debian bug.&lt;br /&gt;
&lt;br /&gt;
See also [[Frequently_Asked_Questions#Cron is not working on my guest system (which is Debian). How can I fix it?|Cron is not working…]]&lt;br /&gt;
&lt;br /&gt;
|Signature=daniel_hozac &amp;amp; Beuc &amp;amp; Paweł Wilk}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Cron is not working on my guest system (which is Debian). How can I fix it?&lt;br /&gt;
||Details=On a guest system the cron daemon may not work properly. When looking into the log file (e.g. &amp;lt;tt&amp;gt;/var/log/syslog&amp;lt;/tt&amp;gt;) the following message may appear repeatedly:&lt;br /&gt;
 CRON[xxxxx]: Permission denied&lt;br /&gt;
&lt;br /&gt;
Similar thing may happen with the &amp;lt;tt&amp;gt;su&amp;lt;/tt&amp;gt; when trying to execute a command as root.&lt;br /&gt;
&lt;br /&gt;
It's not the problem in Cron but in the pam_limits module on a guest system (see [[Frequently_Asked_Questions#When using nice and su (for example, in the updatedb cron job), I get: su: Permission denied. What does it mean?|FAQ:When using nice and su…]] for more information about the cause).&lt;br /&gt;
&lt;br /&gt;
There are 4 ways to solve or work-around this problem:&lt;br /&gt;
&lt;br /&gt;
'''1. Allowing guests to reset resource limits:'''&lt;br /&gt;
&lt;br /&gt;
It's clean solution but you may expect some guest processes increasing their limits because not everything is controlled by PAM. It also breaks centralized resources limiting approach so a guest can do bad things that may cause other guests and host to be overloaded and unresponsive.&lt;br /&gt;
&lt;br /&gt;
To apply it you have to add &amp;lt;tt&amp;gt;CAP_SYS_RESOURCE&amp;lt;/tt&amp;gt; flag to &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/bcapabilities&amp;lt;/tt&amp;gt; (2.6 kernels).&lt;br /&gt;
&lt;br /&gt;
See [[util-vserver:Capabilities_and_Flags|Capabilities and Flags]] for more information.&lt;br /&gt;
&lt;br /&gt;
'''2. Disabling pam_limits on a guest systems:'''&lt;br /&gt;
&lt;br /&gt;
This workaround is easy and works fine when your guest systems aren't really multiuser but rather service boxes. It disables setting of the resource limits by PAM so the limits can only be set globally for the whole guest (using rlimits or cgroups on a host) but never increased inside of the guest system.&lt;br /&gt;
&lt;br /&gt;
To apply it just enter the guest and edit the files listed below, commenting out any line containing &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 /etc/pam.d/su&lt;br /&gt;
 /etc/pam.d/sudo&lt;br /&gt;
 /etc/pam.d/cron&lt;br /&gt;
&lt;br /&gt;
You can also use this one-liner on a guest:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/bin/sed --in-place -e &amp;quot;s/^\s\?session.*pam_limits.so.*/\#\0/g&amp;quot; /etc/pam.d/{su,sudo,cron}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''3. Allowing guest's pam_limits to set limits when possible:'''&lt;br /&gt;
&lt;br /&gt;
This workaround allows you to have working &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt; inside a guest system and global limits set by a host system. What's the catch? The problematic PAM module won't fully work for the root user on a guest system as expected and there might appear some PAM's warnings in guest's &amp;lt;tt&amp;gt;auth.log&amp;lt;/tt&amp;gt;. Since using pam_limits to limit regular user processes is far more frequent than using it to limit root processes, this solution may be a good compromise. It is about setting a proper limits in pam_limits configuration and about setting this PAM module in a way that its function is optional (instead of required). The last change makes PAM to continue with session even if pam_limits encounters some error during setting limits (it usually applies to superuser sessions).&lt;br /&gt;
&lt;br /&gt;
The not so nice news is that there might be a need of keeping guest's limits configuration up to date according to limits globally set for a guest. The limits set in pam_limits configuration file(s) shouldn't be higher (lower in case of nice value) than global guest's limits.&lt;br /&gt;
&lt;br /&gt;
To apply it enter the guest and edit the files listed below, replacing occurences of &amp;lt;tt&amp;gt;required&amp;lt;/tt&amp;gt; by &amp;lt;tt&amp;gt;optional&amp;lt;/tt&amp;gt; in the lines containing &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 /etc/pam.d/su&lt;br /&gt;
 /etc/pam.d/sudo&lt;br /&gt;
 /etc/pam.d/cron&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # Sets up user limits, please define limits for cron tasks&lt;br /&gt;
 # through /etc/security/limits.conf&lt;br /&gt;
 session       optional        pam_limits.so&lt;br /&gt;
&lt;br /&gt;
Then on a guest system create the file &amp;lt;tt&amp;gt;/etc/security/limits.d/01-fixpam.conf&amp;lt;/tt&amp;gt; containing:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
*         -        priority        X   # replace X with your guest's nice value &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can automate this process to happen automagically for any guest by creating the startup script named &amp;lt;tt&amp;gt;/etc/vservers/.defaults/scripts/post-start.d/01-pamfix&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
# This script tries to fix pam_limits entries&lt;br /&gt;
# to make it possible for PAM in a guest system to&lt;br /&gt;
# set its own limits.&lt;br /&gt;
&lt;br /&gt;
PAM_DIR=&amp;quot;etc/pam.d&amp;quot;&lt;br /&gt;
PAM_SERVICES=&amp;quot;su sudo cron&amp;quot;&lt;br /&gt;
LIMITS_FILE=&amp;quot;etc/security/limits.d/01-pamfix.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
vname=&amp;quot;$2&amp;quot;&lt;br /&gt;
[ -z &amp;quot;$vname&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
&lt;br /&gt;
vcfg=$( /usr/sbin/vserver-info &amp;quot;$vname&amp;quot; CFGDIR )&lt;br /&gt;
[ ! -d &amp;quot;$vcfg&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
&lt;br /&gt;
for s in $PAM_SERVICES&lt;br /&gt;
do&lt;br /&gt;
        pamfile=&amp;quot;${PAM_DIR#\/}/$s&amp;quot;&lt;br /&gt;
        [ -f &amp;quot;$pamfile&amp;quot; ] &amp;amp;&amp;amp; /bin/sed --in-place -e &amp;quot;s/\(^\s\?session.*\)required\(.*pam_limits.so.*\)/\1optional\2/g&amp;quot; &amp;quot;$pamfile&amp;quot;&lt;br /&gt;
done&lt;br /&gt;
&lt;br /&gt;
[ ! -f &amp;quot;${vcfg}/nice&amp;quot; ] &amp;amp;&amp;amp; exit 0&lt;br /&gt;
nval=$( /usr/bin/head -1 &amp;quot;${vcfg}/nice&amp;quot; )&lt;br /&gt;
[ -n &amp;quot;$nval&amp;quot; ] &amp;amp;&amp;amp; echo &amp;quot;* - priority $nval # (added by vserver startup script)&amp;quot; &amp;gt; &amp;quot;${LIMITS_FILE#\/}&amp;quot;&lt;br /&gt;
&lt;br /&gt;
exit 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''4. Disabling resource limits for a guest:'''&lt;br /&gt;
&lt;br /&gt;
It easy, clean and… unsafe solution. You just have to not set resource limits (e.g. priority, nice value) for a guest or set the nice value limit to 0 on a host system. Resetting it later by guest's &amp;lt;tt&amp;gt;pam_limits&amp;lt;/tt&amp;gt; will not generate an error.&lt;br /&gt;
&lt;br /&gt;
|Signature=Paweł Wilk}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I handle NFS mounts within in a guest?&lt;br /&gt;
||Details=There are at least four ways.&lt;br /&gt;
&lt;br /&gt;
In any case, you probably want to force the nfs version to 3 or lower to avoid id mapping issues (one symptom of having an id mapping issue is that &amp;lt;tt&amp;gt;no_root_squash&amp;lt;/tt&amp;gt; appears to be ignored). You can check whether the mount uses nfsv4 by looking at &amp;lt;tt&amp;gt;/proc/mounts&amp;lt;/tt&amp;gt; inside the guest. You can force the protocol version to 3 by passing the mount options &amp;lt;tt&amp;gt;nfsvers=3,mountvers=3&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''1)''' Mount the NFS share from the host OS and let vserver guest access it as part of it's file system.&lt;br /&gt;
&lt;br /&gt;
''mount --bind'' may also be beneficial in this scenario.&lt;br /&gt;
&lt;br /&gt;
'''2)''' Use util-vserver and create a ''fstab.remote'' file in the /etc/vserver/&amp;lt;vserver_name&amp;gt; directory. Populate this with the NFS shares and they will be mounted in the context of the vserver guest.&lt;br /&gt;
&lt;br /&gt;
See http://www.nongnu.org/util-vserver/doc/conf/configuration.html&lt;br /&gt;
&lt;br /&gt;
Note that as of 0.30.216-pre3000 and kernel 3.0.4-vs2.3.1-pre10.1, the mount request will appear to originate from the IP of the host, not the guest. It is unclear (to [[User:KornAndras|Guy-]]) whether this is a bug.&lt;br /&gt;
&lt;br /&gt;
'''3)''' Add capabilities to the vserver guest instance to grant sufficient rights to allow NFS mounts.&lt;br /&gt;
&lt;br /&gt;
Add the following to /etc/vserver/&amp;lt;vserver_name&amp;gt;/bcapabilities&lt;br /&gt;
 SYS_ADMIN&lt;br /&gt;
Add the following to /etc/vserver/&amp;lt;vserver_name&amp;gt;/ccapabilities&lt;br /&gt;
 SECURE_MOUNT&lt;br /&gt;
 BINARY_MOUNT&lt;br /&gt;
&lt;br /&gt;
See [[Capabilities_and_Flags]] for more information about vserver capabilities.&lt;br /&gt;
&lt;br /&gt;
If you want the NFS shares to be mounted when the guest starts, add them to /etc/vserver/&amp;lt;vserver_name&amp;gt;/fstab.&lt;br /&gt;
&lt;br /&gt;
'''4)''' Before starting the guest, make a directory of the host &amp;quot;shared&amp;quot; using &amp;lt;tt&amp;gt;mount --make-shared /path/to/dir&amp;lt;/tt&amp;gt;, then set up autofs to mount nfs shares under &amp;lt;tt&amp;gt;/path/to/dir/sharename&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
rbind mount subdirectories of &amp;lt;tt&amp;gt;/path/to/dir&amp;lt;/tt&amp;gt; in the guest from its fstab.&lt;br /&gt;
&lt;br /&gt;
This setup is good if the nfs shares are not often needed, and especially if they're occasionally needed by more than one guest. (As of September 2011, running autofs inside a vserver guest didn't work for me. --[[User:KornAndras|Guy-]] 01:05, 30 October 2011 (UTC))&lt;br /&gt;
&lt;br /&gt;
||Signature=martindk}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=vserver start/stop/enter fails with something like &amp;quot;vnamespace: execvp(&amp;quot;/usr/sbin/vserver&amp;quot;): No such file or directory&amp;quot; ?&lt;br /&gt;
||Details=Check whether ''/usr'' is mounted in the namespace you are working with.&lt;br /&gt;
&amp;lt;pre&amp;gt;vnamespace -e &amp;lt;guest&amp;gt; cat /proc/mounts&amp;lt;/pre&amp;gt;&lt;br /&gt;
If there is no ''/usr'', you can fix your problem with simply mounting it using the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;vnamespace -e &amp;lt;guest&amp;gt; mount /dev/&amp;lt;device&amp;gt; /usr&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Signature=sim0n}}&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=The command vserver &amp;lt;$server&amp;gt; start gives '/etc/init.d/rc: line 74: /etc/default/rcS: No such file or directory', what do I do? &lt;br /&gt;
||Details=The vserver has not been correctly installed, this has several reasons&lt;br /&gt;
check your install log and it should tell you something about that your server didn't get installed properly&lt;br /&gt;
* use stable distribution of debian as server (debootstrap may be different over the versions)&lt;br /&gt;
* deny_mount, deny_caps and deny_pivot should be off if your running grsec.&lt;br /&gt;
&lt;br /&gt;
||Signature=Dude}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How could I rename a vserver directory?&lt;br /&gt;
||Details=Please note : this procedure renames the '''directory''', not the '''hostname''' !&lt;br /&gt;
#Stop the vserver in question&lt;br /&gt;
#rename the &amp;lt;tt&amp;gt;/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
#rename the &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt; directory&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/run&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/var/run/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/vdir&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/.defaults/vdirbase/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;/cache&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/.defaults/cachebase/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#update link: &amp;lt;tt&amp;gt;/var/run/vservers.rev/&amp;lt;server XID&amp;gt;&amp;lt;/tt&amp;gt; → &amp;lt;tt&amp;gt;/etc/vservers/&amp;lt;server name&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
#Start the vserver in question. It should start properly.&lt;br /&gt;
&lt;br /&gt;
|Signature=FlorianD (from ''hillct'' page in old wiki)}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=what if i see my vserver in vserver-stat but with no name ?&lt;br /&gt;
||Details=the link in /var/run/vservers is missing&lt;br /&gt;
Just do a :  cat /etc/vservers/&amp;lt;guest&amp;gt;/context &amp;gt;  /var/run/vservers/&amp;lt;guest&amp;gt;&lt;br /&gt;
check that the &amp;lt;guest&amp;gt; is the good one by using  vuname --get --xid &amp;lt;context&amp;gt;  with the context you have in the vserver-stat listing.&lt;br /&gt;
|Signature=IrcQuestions}}&lt;br /&gt;
&lt;br /&gt;
== Upgrade from 2.0 to 2.2 ==&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=I now get errors like &amp;quot;ncontext: vc_net_create(): Invalid argument; dynamic contexts disabled.&amp;quot; on startup. Vservers are not started&lt;br /&gt;
||Details=Dynamic context are disabled by default and are deprecated. For example, tagxid and network checks won't be useable with dynamic ids. Now you should manually assign a explicit context to your vservers, like&lt;br /&gt;
 echo 101 &amp;gt; /etc/vservers/myvserv/context&lt;br /&gt;
ADDENDUM: please consider that valid static contexts are between 2 and 49151 ( daniel_hozac on IRC ) otherwise you will end up with unexplainable error &amp;quot;ncontext: vc_net_migrate(): No such process&amp;quot; when trying to start the vserver.&lt;br /&gt;
&lt;br /&gt;
|Signature=daniel_hozac&amp;amp;Beuc}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=How do I assign a static context to an existing vserver?&lt;br /&gt;
||Details=Simple ;) See the answer above. &lt;br /&gt;
|Signature=gcc}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Since upgrading to a newer VS version my guest complains about &amp;quot;vsched: non-numeric value specified for '--priority_bias&amp;quot; at start time. What's wrong?&lt;br /&gt;
||Details=The scheduler paramters changed.You can use this (ugly) script to convert them or do it by hand:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /usr/local/sbin/vserver-convert-schedule-to-scheddir&lt;br /&gt;
#/bin/sh&lt;br /&gt;
mkdir /etc/vservers/$1/sched&lt;br /&gt;
sed -e 1p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/fill-rate&lt;br /&gt;
sed -e 2p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/interval&lt;br /&gt;
sed -e 3p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens&lt;br /&gt;
sed -e 4p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens-min&lt;br /&gt;
sed -e 5p -n /etc/vservers/$1/schedule &amp;gt; /etc/vservers/$1/sched/tokens-max&lt;br /&gt;
&lt;br /&gt;
mv /etc/vservers/$1/schedule /etc/vservers/$1/schedule.converted.see.scheddir&lt;br /&gt;
&lt;br /&gt;
# see: http://oldwiki.linux-vserver.org/Scheduler+Parameters&lt;br /&gt;
# see: http://www.nongnu.org/util-vserver/doc/conf/configuration.html#sched&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
||Signature=derjohn}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Question&lt;br /&gt;
|Question=Since upgrading to a newer VS version my guest doesn't have the amount of shared memory (SHM / SHMMAX / SHMALL ) as it had in the former version. What changed?&lt;br /&gt;
||Details=Every VS version that runs on a kernel &amp;gt;= 2.6.19 offers sysctl values per guest. This has to do with the 'ipc namespace' feature that was added to the mainline kernel in version 2.6.19. Linux-VServer uses that feature to give each guest a separate 'ipc namespace' and thus 'own' sysctl values per guest. Because shmmax is such a sysctl value, you have to set it per guest.&lt;br /&gt;
Here is an example how to do so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# mkdir /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0 -p&lt;br /&gt;
# echo kernel.shmall &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0/setting&lt;br /&gt;
# echo 134217728 &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/0/value&lt;br /&gt;
# mkdir /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1 -p&lt;br /&gt;
# echo kernel.shmmax &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1/setting&lt;br /&gt;
# echo 134217728 &amp;gt; /etc/vservers/&amp;lt;vserver&amp;gt;/sysctl/1/value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It's also explained on the geat flower page:&lt;br /&gt;
# see: http://www.nongnu.org/util-vserver/doc/conf/configuration.html -&amp;gt; Look for &amp;quot;sysctl&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After changing those values, restart your guest, enter it and check if the values are set:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# sysctl -a | grep shm&lt;br /&gt;
...&lt;br /&gt;
kernel.shmall = 134217728&lt;br /&gt;
kernel.shmmax = 134217728&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change a value for a running guest, on the host use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vspace -e CONTEXTID --ipc sysctl -w kernel.shmall=134217728&lt;br /&gt;
 vspace -e CONTEXTID --ipc sysctl -w kernel.shmmax=134217728&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
||Signature=derjohn&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Community]]&lt;br /&gt;
[[Category:Categories]]&lt;/div&gt;</summary>
		<author><name>BenjaminGreen</name></author>	</entry>

	</feed>