<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Altraqua</id>
	<title>OpenVZ Virtuozzo Containers Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openvz.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Altraqua"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Altraqua"/>
	<updated>2026-06-13T16:33:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Locales_inside_VE&amp;diff=7149</id>
		<title>Locales inside VE</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Locales_inside_VE&amp;diff=7149"/>
		<updated>2009-03-16T11:21:49Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Fix 4 (tried on Ubuntu 8.04) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem description ==&lt;br /&gt;
&lt;br /&gt;
After creating a VE (e.g. using centos-4-i386-default template)&lt;br /&gt;
running perl (any perl script), results in the warning message:&lt;br /&gt;
&lt;br /&gt;
 perl: warning: Setting locale failed.&lt;br /&gt;
 perl: warning: Please check that your locale settings:&lt;br /&gt;
         LANGUAGE = &amp;quot;en_US:en&amp;quot;,&lt;br /&gt;
         LC_ALL = (unset),&lt;br /&gt;
         LANG = &amp;quot;en_US&amp;quot;&lt;br /&gt;
     are supported and installed on your system.&lt;br /&gt;
 perl: warning: Falling back to the standard locale (&amp;quot;C&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Another common problem is with PostgreSQL, if it won't start up and you see something like this in your &amp;amp;lt;pgsql_data_dir&amp;amp;gt;/serverlog:&lt;br /&gt;
&lt;br /&gt;
 invalid value for parameter &amp;quot;lc_messages&amp;quot;: &amp;quot;en_US.UTF-8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Resolution ==&lt;br /&gt;
&lt;br /&gt;
Some of templates have removed locales inside, since locales take really much space (~20Mb)&lt;br /&gt;
while not needed in most cases (except for the default &amp;quot;C&amp;quot; locale).&lt;br /&gt;
&lt;br /&gt;
So in this example '''/usr/lib/locale/en_US/LC_TIME''' and other files are missing.&lt;br /&gt;
&lt;br /&gt;
== Fix 1 ==&lt;br /&gt;
&lt;br /&gt;
reinstall glibc-common package using the command:&lt;br /&gt;
 # rpm -ihv --force glibc-common.rpm&lt;br /&gt;
&lt;br /&gt;
== Fix 2 ==&lt;br /&gt;
&lt;br /&gt;
Or '''disable''' overriding of LC_* variables in '''/etc/ssh/sshd_config''':&lt;br /&gt;
&lt;br /&gt;
 # Allow client to pass locale environment variables&lt;br /&gt;
 AcceptEnv LANG LC_*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 #AcceptEnv LANG LC_*&lt;br /&gt;
&lt;br /&gt;
so the default LC will be used.&lt;br /&gt;
&lt;br /&gt;
== Fix 3 ==&lt;br /&gt;
&lt;br /&gt;
To fix this permanently for all new vzs you create, edit your '''/vz/templates/&amp;amp;lt;distro&amp;amp;gt;/&amp;amp;lt;version&amp;amp;gt;/&amp;amp;lt;platform&amp;amp;gt;/.rpmmacros''' and change the line &amp;lt;b&amp;gt;%_install_langs C&amp;lt;/b&amp;gt;&lt;br /&gt;
to include the language(s) you want, for example:&lt;br /&gt;
&lt;br /&gt;
 %_install_langs C:pt_PT:pt_PT.UTF-8:en_US:en_US.UTF-8&lt;br /&gt;
&lt;br /&gt;
or simply&lt;br /&gt;
&lt;br /&gt;
 %_install_langs all&lt;br /&gt;
&lt;br /&gt;
After this you will need to rebuild your [[OS template cache]], for example:&lt;br /&gt;
&lt;br /&gt;
 vzpkgcache -r centos-4-i386-vmirth&lt;br /&gt;
 vzpkgcache centos-4-i386-vmirth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Troubleshooting]]&lt;br /&gt;
[[Category: Templates]]&lt;br /&gt;
&lt;br /&gt;
== Fix 4 (working on Ubuntu 8.04) ==&lt;br /&gt;
&lt;br /&gt;
Simply install this package:&lt;br /&gt;
&lt;br /&gt;
 aptitude install language-pack-en-base&lt;br /&gt;
&lt;br /&gt;
[[Category: Troubleshooting]]&lt;br /&gt;
[[Category: Templates]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Locales_inside_VE&amp;diff=7148</id>
		<title>Locales inside VE</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Locales_inside_VE&amp;diff=7148"/>
		<updated>2009-03-16T11:20:47Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: Added fix for ubuntu&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Problem description ==&lt;br /&gt;
&lt;br /&gt;
After creating a VE (e.g. using centos-4-i386-default template)&lt;br /&gt;
running perl (any perl script), results in the warning message:&lt;br /&gt;
&lt;br /&gt;
 perl: warning: Setting locale failed.&lt;br /&gt;
 perl: warning: Please check that your locale settings:&lt;br /&gt;
         LANGUAGE = &amp;quot;en_US:en&amp;quot;,&lt;br /&gt;
         LC_ALL = (unset),&lt;br /&gt;
         LANG = &amp;quot;en_US&amp;quot;&lt;br /&gt;
     are supported and installed on your system.&lt;br /&gt;
 perl: warning: Falling back to the standard locale (&amp;quot;C&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Another common problem is with PostgreSQL, if it won't start up and you see something like this in your &amp;amp;lt;pgsql_data_dir&amp;amp;gt;/serverlog:&lt;br /&gt;
&lt;br /&gt;
 invalid value for parameter &amp;quot;lc_messages&amp;quot;: &amp;quot;en_US.UTF-8&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Resolution ==&lt;br /&gt;
&lt;br /&gt;
Some of templates have removed locales inside, since locales take really much space (~20Mb)&lt;br /&gt;
while not needed in most cases (except for the default &amp;quot;C&amp;quot; locale).&lt;br /&gt;
&lt;br /&gt;
So in this example '''/usr/lib/locale/en_US/LC_TIME''' and other files are missing.&lt;br /&gt;
&lt;br /&gt;
== Fix 1 ==&lt;br /&gt;
&lt;br /&gt;
reinstall glibc-common package using the command:&lt;br /&gt;
 # rpm -ihv --force glibc-common.rpm&lt;br /&gt;
&lt;br /&gt;
== Fix 2 ==&lt;br /&gt;
&lt;br /&gt;
Or '''disable''' overriding of LC_* variables in '''/etc/ssh/sshd_config''':&lt;br /&gt;
&lt;br /&gt;
 # Allow client to pass locale environment variables&lt;br /&gt;
 AcceptEnv LANG LC_*&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 #AcceptEnv LANG LC_*&lt;br /&gt;
&lt;br /&gt;
so the default LC will be used.&lt;br /&gt;
&lt;br /&gt;
== Fix 3 ==&lt;br /&gt;
&lt;br /&gt;
To fix this permanently for all new vzs you create, edit your '''/vz/templates/&amp;amp;lt;distro&amp;amp;gt;/&amp;amp;lt;version&amp;amp;gt;/&amp;amp;lt;platform&amp;amp;gt;/.rpmmacros''' and change the line &amp;lt;b&amp;gt;%_install_langs C&amp;lt;/b&amp;gt;&lt;br /&gt;
to include the language(s) you want, for example:&lt;br /&gt;
&lt;br /&gt;
 %_install_langs C:pt_PT:pt_PT.UTF-8:en_US:en_US.UTF-8&lt;br /&gt;
&lt;br /&gt;
or simply&lt;br /&gt;
&lt;br /&gt;
 %_install_langs all&lt;br /&gt;
&lt;br /&gt;
After this you will need to rebuild your [[OS template cache]], for example:&lt;br /&gt;
&lt;br /&gt;
 vzpkgcache -r centos-4-i386-vmirth&lt;br /&gt;
 vzpkgcache centos-4-i386-vmirth&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Troubleshooting]]&lt;br /&gt;
[[Category: Templates]]&lt;br /&gt;
&lt;br /&gt;
== Fix 4 (tried on Ubuntu 8.04) ==&lt;br /&gt;
&lt;br /&gt;
Simply install this package:&lt;br /&gt;
&lt;br /&gt;
 aptitude install language-pack-en-base&lt;br /&gt;
&lt;br /&gt;
[[Category: Troubleshooting]]&lt;br /&gt;
[[Category: Templates]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5860</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5860"/>
		<updated>2008-05-04T11:20:34Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Repository setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenVZ consists of a kernel, user-level tools, and container templates.&lt;br /&gt;
&lt;br /&gt;
This guide tells how to install the kernel and the tools on [http://www.debian.org Debian] stable. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Filesystems ===&lt;br /&gt;
It is recommended to use a separate partition for container private&lt;br /&gt;
directories (by default &amp;lt;code&amp;gt;/var/lib/vz/private/&amp;lt;CTID&amp;gt;&amp;lt;/code&amp;gt;). The reason why you should do so is that if you wish to use OpenVZ per-container disk quota, you won't be able to use usual Linux disk quotas on the same partition. Bear in mind that per-container quota in this context includes not only pure per-container quota but also usual Linux disk quota used in container, not on [[HN]].&lt;br /&gt;
&lt;br /&gt;
At least try to avoid using root partition for containers because the root user of container will be able to overcome the 5% disk space barrier in some situations. If the HN root partition is completely filled, it will break the system.&lt;br /&gt;
&lt;br /&gt;
OpenVZ per-container disk quota is supported only for ext2/ext3 filesystems so use one of these filesystems (ext3 is recommended) if you need per-container disk quota.&lt;br /&gt;
&lt;br /&gt;
=== Repository setup ===&lt;br /&gt;
&lt;br /&gt;
At the moment two different repositories are online at http://download.openvz.org:&lt;br /&gt;
&lt;br /&gt;
; by Ola Lundqvist &amp;lt;opal@debian.org&amp;gt;&lt;br /&gt;
: (OpenVZ kernels only)&lt;br /&gt;
: apt-uri http://download.openvz.org/debian&lt;br /&gt;
&lt;br /&gt;
; by Thorsten Schifferdecker &amp;lt;tsd@debian.systs.org&amp;gt;&lt;br /&gt;
: apt-uri http://download.openvz.org/debian-systs&lt;br /&gt;
: (Mirror of OpenVZ Repository from http://debian.systs.org/)&lt;br /&gt;
&lt;br /&gt;
{{Note|The next steps used the Repository at http://download.openvz.org/debian-systs, the actually OpenVZ Tools for Debian are exist only in unstable, see http://packages.debian.org/vzctl}}&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on Ubuntu system, root task are done with [https://help.ubuntu.com/community/RootSudo sudo]}}&lt;br /&gt;
&lt;br /&gt;
This can be achieved by the following commands, as root or as privileged &amp;quot;sudo&amp;quot; user&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://download.openvz.org/debian-systs etch openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is even an '''experimental''' repository with kernel 2.6.24. '''Use it at your own risk!'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://debian.systs.org/debian gitty openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://debian.systs.org/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you want to recompile the OpenVZ kernel yourself on Debian, see [[Compiling the OpenVZ kernel (the Debian way)]].}}&lt;br /&gt;
&lt;br /&gt;
First, you need to choose what kernel you want to install.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with kernel config from http://download.openvz.org'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386 only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with official Debian kernel config and OpenVZ Settings'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686-bigmem&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-amd64&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| &lt;br /&gt;
| amd64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install &amp;lt;kernel&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the bootloader ===&lt;br /&gt;
&lt;br /&gt;
In case GRUB is used as the boot loader, it will be configured automatically, or execute update-grub; lines similar to these will be added to the &amp;lt;tt&amp;gt;/boot/grub/menu.lst&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
  title           Debian GNU/Linux, kernel 2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  kernel          /vmlinuz-2.6.18-ovz-028stab051.1-686 root=/dev/sda5 ro vga=791&lt;br /&gt;
  initrd          /initrd.img-2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  savedefault&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on debian/ubuntu, a 2.6.22 kernel will boot before a 2.6.18, please check manually the grub boot order. See man update-grub for more details}}&lt;br /&gt;
&lt;br /&gt;
=== Rebooting into OpenVZ kernel ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.}}&lt;br /&gt;
&lt;br /&gt;
Now reboot the machine and choose the OpenVZ Linux Kernel on the boot loader menu. If the OpenVZ kernel has been booted successfully, proceed to installing the user-level tools for OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Installing the user-level tools ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ needs some user-level tools installed. Those are:&lt;br /&gt;
&lt;br /&gt;
; vzctl&lt;br /&gt;
: A utility to control OpenVZ containers (create, destroy, start, stop, set parameters etc.)&lt;br /&gt;
; vzquota&lt;br /&gt;
: A utility to manage quotas for containers. Mostly used indirectly (by vzctl).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # [sudo] apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
&lt;br /&gt;
=== sysctl ===&lt;br /&gt;
&lt;br /&gt;
There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; file. Here is the relevant part of the file; please edit it accordingly.&lt;br /&gt;
&lt;br /&gt;
{{Note|vzctl version from debian-systs, automate changing sysctl options for openvz}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# On Hardware Node we generally need&lt;br /&gt;
# packet forwarding enabled and proxy arp disabled&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.default.forwarding=1&lt;br /&gt;
net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
# Enables source route verification&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
# Enables the magic-sysrq key&lt;br /&gt;
kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
# TCP Explict Congestion Notification&lt;br /&gt;
#net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
# we do not want all our interfaces to send redirects&lt;br /&gt;
net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # [sudo] sysctl -p&lt;br /&gt;
&lt;br /&gt;
{{Note|You can make a symlink from /var/lib/vz to /vz as backward&lt;br /&gt;
compatibility to OpenVZ as installed in other distributions&lt;br /&gt;
(Debian vz root directory is /var/lib/vz to be FHS-compliant.}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] ln -s /var/lib/vz /vz &lt;br /&gt;
&lt;br /&gt;
=== OS templates ===&lt;br /&gt;
&lt;br /&gt;
To install a container, you need OS template(s).&lt;br /&gt;
&lt;br /&gt;
Precreated templates can be found [http://download.openvz.org/contrib/template/precreated/ here].&lt;br /&gt;
&lt;br /&gt;
You can create your own templates, see &lt;br /&gt;
[[Debian template creation]], [[Ubuntu Gutsy template creation] and [[Category:Templates]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Setup your prefered standard OS Template : edit the /etc/vz/vz.conf}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
== Additional User Tools ==&lt;br /&gt;
&lt;br /&gt;
; vzprocps&lt;br /&gt;
:    A set of utilities to provide system information (vzps and vztop)&lt;br /&gt;
&lt;br /&gt;
; [[vzdump]]&lt;br /&gt;
:    A utility to backup and restore container. &lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzprocps vzdump&lt;br /&gt;
&lt;br /&gt;
== Use it! ==&lt;br /&gt;
&lt;br /&gt;
After installing the OpenVZ kernel, user tools and a minimal OS template&lt;br /&gt;
to create a first container and do some&lt;br /&gt;
[[basic operations in OpenVZ environment]]. Read the [[download:doc/OpenVZ-Users-Guide.pdf]], browse this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5859</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5859"/>
		<updated>2008-05-04T11:15:20Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Repository setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenVZ consists of a kernel, user-level tools, and container templates.&lt;br /&gt;
&lt;br /&gt;
This guide tells how to install the kernel and the tools on [http://www.debian.org Debian] stable. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Filesystems ===&lt;br /&gt;
It is recommended to use a separate partition for container private&lt;br /&gt;
directories (by default &amp;lt;code&amp;gt;/var/lib/vz/private/&amp;lt;CTID&amp;gt;&amp;lt;/code&amp;gt;). The reason why you should do so is that if you wish to use OpenVZ per-container disk quota, you won't be able to use usual Linux disk quotas on the same partition. Bear in mind that per-container quota in this context includes not only pure per-container quota but also usual Linux disk quota used in container, not on [[HN]].&lt;br /&gt;
&lt;br /&gt;
At least try to avoid using root partition for containers because the root user of container will be able to overcome the 5% disk space barrier in some situations. If the HN root partition is completely filled, it will break the system.&lt;br /&gt;
&lt;br /&gt;
OpenVZ per-container disk quota is supported only for ext2/ext3 filesystems so use one of these filesystems (ext3 is recommended) if you need per-container disk quota.&lt;br /&gt;
&lt;br /&gt;
=== Repository setup ===&lt;br /&gt;
&lt;br /&gt;
At the moment two different repositories are online at http://download.openvz.org:&lt;br /&gt;
&lt;br /&gt;
; by Ola Lundqvist &amp;lt;opal@debian.org&amp;gt;&lt;br /&gt;
: (OpenVZ kernels only)&lt;br /&gt;
: apt-uri http://download.openvz.org/debian&lt;br /&gt;
&lt;br /&gt;
; by Thorsten Schifferdecker &amp;lt;tsd@debian.systs.org&amp;gt;&lt;br /&gt;
: apt-uri http://download.openvz.org/debian-systs&lt;br /&gt;
: (Mirror of OpenVZ Repository from http://debian.systs.org/)&lt;br /&gt;
&lt;br /&gt;
{{Note|The next steps used the Repository at http://download.openvz.org/debian-systs, the actually OpenVZ Tools for Debian are exist only in unstable, see http://packages.debian.org/vzctl}}&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on Ubuntu system, root task are done with [https://help.ubuntu.com/community/RootSudo sudo]}}&lt;br /&gt;
&lt;br /&gt;
This can be achieved by the following commands, as root or as privileged &amp;quot;sudo&amp;quot; user&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://download.openvz.org/debian-systs etch openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also an '''experimental''' repository with kernel 2.6.24. '''Use at you own risk!'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://debian.systs.org/debian gitty openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://debian.systs.org/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you want to recompile the OpenVZ kernel yourself on Debian, see [[Compiling the OpenVZ kernel (the Debian way)]].}}&lt;br /&gt;
&lt;br /&gt;
First, you need to choose what kernel you want to install.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with kernel config from http://download.openvz.org'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386 only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with official Debian kernel config and OpenVZ Settings'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686-bigmem&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-amd64&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| &lt;br /&gt;
| amd64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install &amp;lt;kernel&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the bootloader ===&lt;br /&gt;
&lt;br /&gt;
In case GRUB is used as the boot loader, it will be configured automatically, or execute update-grub; lines similar to these will be added to the &amp;lt;tt&amp;gt;/boot/grub/menu.lst&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
  title           Debian GNU/Linux, kernel 2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  kernel          /vmlinuz-2.6.18-ovz-028stab051.1-686 root=/dev/sda5 ro vga=791&lt;br /&gt;
  initrd          /initrd.img-2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  savedefault&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on debian/ubuntu, a 2.6.22 kernel will boot before a 2.6.18, please check manually the grub boot order. See man update-grub for more details}}&lt;br /&gt;
&lt;br /&gt;
=== Rebooting into OpenVZ kernel ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.}}&lt;br /&gt;
&lt;br /&gt;
Now reboot the machine and choose the OpenVZ Linux Kernel on the boot loader menu. If the OpenVZ kernel has been booted successfully, proceed to installing the user-level tools for OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Installing the user-level tools ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ needs some user-level tools installed. Those are:&lt;br /&gt;
&lt;br /&gt;
; vzctl&lt;br /&gt;
: A utility to control OpenVZ containers (create, destroy, start, stop, set parameters etc.)&lt;br /&gt;
; vzquota&lt;br /&gt;
: A utility to manage quotas for containers. Mostly used indirectly (by vzctl).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # [sudo] apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
&lt;br /&gt;
=== sysctl ===&lt;br /&gt;
&lt;br /&gt;
There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; file. Here is the relevant part of the file; please edit it accordingly.&lt;br /&gt;
&lt;br /&gt;
{{Note|vzctl version from debian-systs, automate changing sysctl options for openvz}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# On Hardware Node we generally need&lt;br /&gt;
# packet forwarding enabled and proxy arp disabled&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.default.forwarding=1&lt;br /&gt;
net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
# Enables source route verification&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
# Enables the magic-sysrq key&lt;br /&gt;
kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
# TCP Explict Congestion Notification&lt;br /&gt;
#net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
# we do not want all our interfaces to send redirects&lt;br /&gt;
net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # [sudo] sysctl -p&lt;br /&gt;
&lt;br /&gt;
{{Note|You can make a symlink from /var/lib/vz to /vz as backward&lt;br /&gt;
compatibility to OpenVZ as installed in other distributions&lt;br /&gt;
(Debian vz root directory is /var/lib/vz to be FHS-compliant.}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] ln -s /var/lib/vz /vz &lt;br /&gt;
&lt;br /&gt;
=== OS templates ===&lt;br /&gt;
&lt;br /&gt;
To install a container, you need OS template(s).&lt;br /&gt;
&lt;br /&gt;
Precreated templates can be found [http://download.openvz.org/contrib/template/precreated/ here].&lt;br /&gt;
&lt;br /&gt;
You can create your own templates, see &lt;br /&gt;
[[Debian template creation]], [[Ubuntu Gutsy template creation] and [[Category:Templates]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Setup your prefered standard OS Template : edit the /etc/vz/vz.conf}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
== Additional User Tools ==&lt;br /&gt;
&lt;br /&gt;
; vzprocps&lt;br /&gt;
:    A set of utilities to provide system information (vzps and vztop)&lt;br /&gt;
&lt;br /&gt;
; [[vzdump]]&lt;br /&gt;
:    A utility to backup and restore container. &lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzprocps vzdump&lt;br /&gt;
&lt;br /&gt;
== Use it! ==&lt;br /&gt;
&lt;br /&gt;
After installing the OpenVZ kernel, user tools and a minimal OS template&lt;br /&gt;
to create a first container and do some&lt;br /&gt;
[[basic operations in OpenVZ environment]]. Read the [[download:doc/OpenVZ-Users-Guide.pdf]], browse this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5858</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5858"/>
		<updated>2008-05-04T11:08:13Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Repository setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenVZ consists of a kernel, user-level tools, and container templates.&lt;br /&gt;
&lt;br /&gt;
This guide tells how to install the kernel and the tools on [http://www.debian.org Debian] stable. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Filesystems ===&lt;br /&gt;
It is recommended to use a separate partition for container private&lt;br /&gt;
directories (by default &amp;lt;code&amp;gt;/var/lib/vz/private/&amp;lt;CTID&amp;gt;&amp;lt;/code&amp;gt;). The reason why you should do so is that if you wish to use OpenVZ per-container disk quota, you won't be able to use usual Linux disk quotas on the same partition. Bear in mind that per-container quota in this context includes not only pure per-container quota but also usual Linux disk quota used in container, not on [[HN]].&lt;br /&gt;
&lt;br /&gt;
At least try to avoid using root partition for containers because the root user of container will be able to overcome the 5% disk space barrier in some situations. If the HN root partition is completely filled, it will break the system.&lt;br /&gt;
&lt;br /&gt;
OpenVZ per-container disk quota is supported only for ext2/ext3 filesystems so use one of these filesystems (ext3 is recommended) if you need per-container disk quota.&lt;br /&gt;
&lt;br /&gt;
=== Repository setup ===&lt;br /&gt;
&lt;br /&gt;
At the moment two different repositories are online at http://download.openvz.org:&lt;br /&gt;
&lt;br /&gt;
; by Ola Lundqvist &amp;lt;opal@debian.org&amp;gt;&lt;br /&gt;
: (OpenVZ kernels only)&lt;br /&gt;
: apt-uri http://download.openvz.org/debian&lt;br /&gt;
&lt;br /&gt;
; by Thorsten Schifferdecker &amp;lt;tsd@debian.systs.org&amp;gt;&lt;br /&gt;
: apt-uri http://download.openvz.org/debian-systs&lt;br /&gt;
: (Mirror of OpenVZ Repository from http://debian.systs.org/)&lt;br /&gt;
&lt;br /&gt;
{{Note|The next steps used the Repository at http://download.openvz.org/debian-systs, the actually OpenVZ Tools for Debian are exist only in unstable, see http://packages.debian.org/vzctl}}&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on Ubuntu system, root task are done with [https://help.ubuntu.com/community/RootSudo sudo]}}&lt;br /&gt;
&lt;br /&gt;
This can be achieved by the following commands, as root or as privileged &amp;quot;sudo&amp;quot; user&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://download.openvz.org/debian-systs etch openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also an '''experimental''' repository with kernel 2.6.24. '''Use at you own risk!'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://debian.systs.org/debian gitty openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you want to recompile the OpenVZ kernel yourself on Debian, see [[Compiling the OpenVZ kernel (the Debian way)]].}}&lt;br /&gt;
&lt;br /&gt;
First, you need to choose what kernel you want to install.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with kernel config from http://download.openvz.org'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386 only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with official Debian kernel config and OpenVZ Settings'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686-bigmem&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-amd64&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| &lt;br /&gt;
| amd64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install &amp;lt;kernel&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the bootloader ===&lt;br /&gt;
&lt;br /&gt;
In case GRUB is used as the boot loader, it will be configured automatically, or execute update-grub; lines similar to these will be added to the &amp;lt;tt&amp;gt;/boot/grub/menu.lst&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
  title           Debian GNU/Linux, kernel 2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  kernel          /vmlinuz-2.6.18-ovz-028stab051.1-686 root=/dev/sda5 ro vga=791&lt;br /&gt;
  initrd          /initrd.img-2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  savedefault&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on debian/ubuntu, a 2.6.22 kernel will boot before a 2.6.18, please check manually the grub boot order. See man update-grub for more details}}&lt;br /&gt;
&lt;br /&gt;
=== Rebooting into OpenVZ kernel ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.}}&lt;br /&gt;
&lt;br /&gt;
Now reboot the machine and choose the OpenVZ Linux Kernel on the boot loader menu. If the OpenVZ kernel has been booted successfully, proceed to installing the user-level tools for OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Installing the user-level tools ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ needs some user-level tools installed. Those are:&lt;br /&gt;
&lt;br /&gt;
; vzctl&lt;br /&gt;
: A utility to control OpenVZ containers (create, destroy, start, stop, set parameters etc.)&lt;br /&gt;
; vzquota&lt;br /&gt;
: A utility to manage quotas for containers. Mostly used indirectly (by vzctl).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # [sudo] apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
&lt;br /&gt;
=== sysctl ===&lt;br /&gt;
&lt;br /&gt;
There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; file. Here is the relevant part of the file; please edit it accordingly.&lt;br /&gt;
&lt;br /&gt;
{{Note|vzctl version from debian-systs, automate changing sysctl options for openvz}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# On Hardware Node we generally need&lt;br /&gt;
# packet forwarding enabled and proxy arp disabled&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.default.forwarding=1&lt;br /&gt;
net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
# Enables source route verification&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
# Enables the magic-sysrq key&lt;br /&gt;
kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
# TCP Explict Congestion Notification&lt;br /&gt;
#net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
# we do not want all our interfaces to send redirects&lt;br /&gt;
net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # [sudo] sysctl -p&lt;br /&gt;
&lt;br /&gt;
{{Note|You can make a symlink from /var/lib/vz to /vz as backward&lt;br /&gt;
compatibility to OpenVZ as installed in other distributions&lt;br /&gt;
(Debian vz root directory is /var/lib/vz to be FHS-compliant.}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] ln -s /var/lib/vz /vz &lt;br /&gt;
&lt;br /&gt;
=== OS templates ===&lt;br /&gt;
&lt;br /&gt;
To install a container, you need OS template(s).&lt;br /&gt;
&lt;br /&gt;
Precreated templates can be found [http://download.openvz.org/contrib/template/precreated/ here].&lt;br /&gt;
&lt;br /&gt;
You can create your own templates, see &lt;br /&gt;
[[Debian template creation]], [[Ubuntu Gutsy template creation] and [[Category:Templates]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Setup your prefered standard OS Template : edit the /etc/vz/vz.conf}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
== Additional User Tools ==&lt;br /&gt;
&lt;br /&gt;
; vzprocps&lt;br /&gt;
:    A set of utilities to provide system information (vzps and vztop)&lt;br /&gt;
&lt;br /&gt;
; [[vzdump]]&lt;br /&gt;
:    A utility to backup and restore container. &lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzprocps vzdump&lt;br /&gt;
&lt;br /&gt;
== Use it! ==&lt;br /&gt;
&lt;br /&gt;
After installing the OpenVZ kernel, user tools and a minimal OS template&lt;br /&gt;
to create a first container and do some&lt;br /&gt;
[[basic operations in OpenVZ environment]]. Read the [[download:doc/OpenVZ-Users-Guide.pdf]], browse this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5857</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5857"/>
		<updated>2008-05-04T11:04:00Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Repository setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenVZ consists of a kernel, user-level tools, and container templates.&lt;br /&gt;
&lt;br /&gt;
This guide tells how to install the kernel and the tools on [http://www.debian.org Debian] stable. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Filesystems ===&lt;br /&gt;
It is recommended to use a separate partition for container private&lt;br /&gt;
directories (by default &amp;lt;code&amp;gt;/var/lib/vz/private/&amp;lt;CTID&amp;gt;&amp;lt;/code&amp;gt;). The reason why you should do so is that if you wish to use OpenVZ per-container disk quota, you won't be able to use usual Linux disk quotas on the same partition. Bear in mind that per-container quota in this context includes not only pure per-container quota but also usual Linux disk quota used in container, not on [[HN]].&lt;br /&gt;
&lt;br /&gt;
At least try to avoid using root partition for containers because the root user of container will be able to overcome the 5% disk space barrier in some situations. If the HN root partition is completely filled, it will break the system.&lt;br /&gt;
&lt;br /&gt;
OpenVZ per-container disk quota is supported only for ext2/ext3 filesystems so use one of these filesystems (ext3 is recommended) if you need per-container disk quota.&lt;br /&gt;
&lt;br /&gt;
=== Repository setup ===&lt;br /&gt;
&lt;br /&gt;
At the moment two different repositories are online at http://download.openvz.org:&lt;br /&gt;
&lt;br /&gt;
; by Ola Lundqvist &amp;lt;opal@debian.org&amp;gt;&lt;br /&gt;
: (OpenVZ kernels only)&lt;br /&gt;
: apt-uri http://download.openvz.org/debian&lt;br /&gt;
&lt;br /&gt;
; by Thorsten Schifferdecker &amp;lt;tsd@debian.systs.org&amp;gt;&lt;br /&gt;
: apt-uri http://download.openvz.org/debian-systs&lt;br /&gt;
: (Mirror of OpenVZ Repository from http://debian.systs.org/)&lt;br /&gt;
&lt;br /&gt;
{{Note|The next steps used the Repository at http://download.openvz.org/debian-systs, the actually OpenVZ Tools for Debian are exist only in unstable, see http://packages.debian.org/vzctl}}&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on Ubuntu system, root task are done with [https://help.ubuntu.com/community/RootSudo sudo]}}&lt;br /&gt;
&lt;br /&gt;
This can be achieved by the following commands, as root or as privileged &amp;quot;sudo&amp;quot; user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://download.openvz.org/debian-systs etch openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also an '''experimental''' repository with kernel 2.6.24. '''Use at you own risk!'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://debian.systs.org/debian gitty openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you want to recompile the OpenVZ kernel yourself on Debian, see [[Compiling the OpenVZ kernel (the Debian way)]].}}&lt;br /&gt;
&lt;br /&gt;
First, you need to choose what kernel you want to install.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with kernel config from http://download.openvz.org'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386 only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with official Debian kernel config and OpenVZ Settings'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686-bigmem&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-amd64&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| &lt;br /&gt;
| amd64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install &amp;lt;kernel&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the bootloader ===&lt;br /&gt;
&lt;br /&gt;
In case GRUB is used as the boot loader, it will be configured automatically, or execute update-grub; lines similar to these will be added to the &amp;lt;tt&amp;gt;/boot/grub/menu.lst&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
  title           Debian GNU/Linux, kernel 2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  kernel          /vmlinuz-2.6.18-ovz-028stab051.1-686 root=/dev/sda5 ro vga=791&lt;br /&gt;
  initrd          /initrd.img-2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  savedefault&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on debian/ubuntu, a 2.6.22 kernel will boot before a 2.6.18, please check manually the grub boot order. See man update-grub for more details}}&lt;br /&gt;
&lt;br /&gt;
=== Rebooting into OpenVZ kernel ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.}}&lt;br /&gt;
&lt;br /&gt;
Now reboot the machine and choose the OpenVZ Linux Kernel on the boot loader menu. If the OpenVZ kernel has been booted successfully, proceed to installing the user-level tools for OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Installing the user-level tools ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ needs some user-level tools installed. Those are:&lt;br /&gt;
&lt;br /&gt;
; vzctl&lt;br /&gt;
: A utility to control OpenVZ containers (create, destroy, start, stop, set parameters etc.)&lt;br /&gt;
; vzquota&lt;br /&gt;
: A utility to manage quotas for containers. Mostly used indirectly (by vzctl).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # [sudo] apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
&lt;br /&gt;
=== sysctl ===&lt;br /&gt;
&lt;br /&gt;
There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; file. Here is the relevant part of the file; please edit it accordingly.&lt;br /&gt;
&lt;br /&gt;
{{Note|vzctl version from debian-systs, automate changing sysctl options for openvz}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# On Hardware Node we generally need&lt;br /&gt;
# packet forwarding enabled and proxy arp disabled&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.default.forwarding=1&lt;br /&gt;
net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
# Enables source route verification&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
# Enables the magic-sysrq key&lt;br /&gt;
kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
# TCP Explict Congestion Notification&lt;br /&gt;
#net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
# we do not want all our interfaces to send redirects&lt;br /&gt;
net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # [sudo] sysctl -p&lt;br /&gt;
&lt;br /&gt;
{{Note|You can make a symlink from /var/lib/vz to /vz as backward&lt;br /&gt;
compatibility to OpenVZ as installed in other distributions&lt;br /&gt;
(Debian vz root directory is /var/lib/vz to be FHS-compliant.}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] ln -s /var/lib/vz /vz &lt;br /&gt;
&lt;br /&gt;
=== OS templates ===&lt;br /&gt;
&lt;br /&gt;
To install a container, you need OS template(s).&lt;br /&gt;
&lt;br /&gt;
Precreated templates can be found [http://download.openvz.org/contrib/template/precreated/ here].&lt;br /&gt;
&lt;br /&gt;
You can create your own templates, see &lt;br /&gt;
[[Debian template creation]], [[Ubuntu Gutsy template creation] and [[Category:Templates]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Setup your prefered standard OS Template : edit the /etc/vz/vz.conf}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
== Additional User Tools ==&lt;br /&gt;
&lt;br /&gt;
; vzprocps&lt;br /&gt;
:    A set of utilities to provide system information (vzps and vztop)&lt;br /&gt;
&lt;br /&gt;
; [[vzdump]]&lt;br /&gt;
:    A utility to backup and restore container. &lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzprocps vzdump&lt;br /&gt;
&lt;br /&gt;
== Use it! ==&lt;br /&gt;
&lt;br /&gt;
After installing the OpenVZ kernel, user tools and a minimal OS template&lt;br /&gt;
to create a first container and do some&lt;br /&gt;
[[basic operations in OpenVZ environment]]. Read the [[download:doc/OpenVZ-Users-Guide.pdf]], browse this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5298</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5298"/>
		<updated>2008-03-26T15:28:02Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Repository setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenVZ consists of a kernel, user-level tools, and container templates.&lt;br /&gt;
&lt;br /&gt;
This guide tells how to install the kernel and the tools on [http://www.debian.org Debian] Stable. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Filesystems ===&lt;br /&gt;
It is recommended to use a separate partition for container private directories (by default /var/lib/vz/private/&amp;lt;veid&amp;gt;). The reason why you should do so is that if you wish to use OpenVZ per-container disk quota, you won't be able to use usual Linux disk quotas on the same partition. Bear in mind that per-container quota in this context includes not only pure per-container quota but also usual Linux disk quota used in container, not on [[HN]].&lt;br /&gt;
&lt;br /&gt;
At least try to avoid using root partition for containers because the root user of container will be able to overcome the 5% disk space barrier in some situations. If the HN root partition is completely filled, it will break the system.&lt;br /&gt;
&lt;br /&gt;
OpenVZ per-container disk quota is supported only for ext2/ext3 filesystems so use one of these filesystems (ext3 is recommended) if you need per-container disk quota.&lt;br /&gt;
&lt;br /&gt;
=== Repository setup ===&lt;br /&gt;
&lt;br /&gt;
At the moment two different repositories are online at http://download.openvz.org:&lt;br /&gt;
&lt;br /&gt;
* by Ola Lundqvist &amp;lt;opal@debian.org&amp;gt;&lt;br /&gt;
: (OpenVZ Kernels only)&lt;br /&gt;
: apt-uri http://download.openvz.org/debian&lt;br /&gt;
&lt;br /&gt;
* by Thorsten Schifferdecker &amp;lt;tsd@debian.systs.org&amp;gt;&lt;br /&gt;
: apt-uri http://download.openvz.org/debian-systs&lt;br /&gt;
: (Mirror of OpenVZ Repository from http://debian.systs.org/)&lt;br /&gt;
&lt;br /&gt;
{{Note|The next steps used the Repository at http://download.openvz.org/debian-systs, the actually OpenVZ Tools for Debian are exist only in unstable, see http://packages.debian.org/vzctl}}&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on Ubuntu system, root task are done with [https://help.ubuntu.com/community/RootSudo sudo]}}&lt;br /&gt;
&lt;br /&gt;
This can be achieved by the following commands, as root or as privileged &amp;quot;sudo&amp;quot; user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo -e &amp;quot;\ndeb http://download.openvz.org/debian-systs etch openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you want to recompile the OpenVZ kernel yourself on Debian, see [[Compiling the OpenVZ Kernel (the debian way)]].}}&lt;br /&gt;
&lt;br /&gt;
First, you need to choose what kernel you want to install.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with kernel config from http://download.openvz.org'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386 only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with official Debian kernel config and OpenVZ Settings'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686-bigmem&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-amd64&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| &lt;br /&gt;
| amd64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install &amp;lt;kernel&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the bootloader ===&lt;br /&gt;
&lt;br /&gt;
In case GRUB is used as the boot loader, it will be configured automatically, or execute update-grub; lines similar to these will be added to the &amp;lt;tt&amp;gt;/boot/grub/menu.lst&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
  title           Debian GNU/Linux, kernel 2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  kernel          /vmlinuz-2.6.18-ovz-028stab051.1-686 root=/dev/sda5 ro vga=791&lt;br /&gt;
  initrd          /initrd.img-2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  savedefault&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on debian/ubuntu, a 2.6.22 kernel will boot before a 2.6.18, please check manually the grub boot order. See man update-grub for more details}}&lt;br /&gt;
&lt;br /&gt;
=== Rebooting into OpenVZ kernel ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.}}&lt;br /&gt;
&lt;br /&gt;
Now reboot the machine and choose the OpenVZ Linux Kernel on the boot loader menu. If the OpenVZ kernel has been booted successfully, proceed to installing the user-level tools for OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Installing the user-level tools ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ needs some user-level tools installed. Those are:&lt;br /&gt;
&lt;br /&gt;
; vzctl&lt;br /&gt;
: A utility to control OpenVZ containers (create, destroy, start, stop, set parameters etc.)&lt;br /&gt;
; vzquota&lt;br /&gt;
: A utility to manage quotas for containers. Mostly used indirectly (by vzctl).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # [sudo] apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
&lt;br /&gt;
=== sysctl ===&lt;br /&gt;
&lt;br /&gt;
There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; file. Here is the relevant part of the file; please edit it accordingly.&lt;br /&gt;
&lt;br /&gt;
{{Note|vzctl version from debian-systs, automate changing sysctl options for openvz}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# On Hardware Node we generally need&lt;br /&gt;
# packet forwarding enabled and proxy arp disabled&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.default.forwarding=1&lt;br /&gt;
net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
# Enables source route verification&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
# Enables the magic-sysrq key&lt;br /&gt;
kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
# TCP Explict Congestion Notification&lt;br /&gt;
#net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
# we do not want all our interfaces to send redirects&lt;br /&gt;
net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # [sudo] sysctl -p&lt;br /&gt;
&lt;br /&gt;
{{Note|You can make a symlink from /var/lib/vz to /vz as backward&lt;br /&gt;
compatibility to OpenVZ as installed in other distributions&lt;br /&gt;
(Debian vz root directory is /var/lib/vz to be FHS-compliant.}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] ln -s /var/lib/vz /vz &lt;br /&gt;
&lt;br /&gt;
=== OS templates ===&lt;br /&gt;
&lt;br /&gt;
To install a container, you need OS template(s).&lt;br /&gt;
&lt;br /&gt;
Precreated templates can be found [http://download.openvz.org/contrib/template/precreated/ here].&lt;br /&gt;
&lt;br /&gt;
You can create your own templates, see &lt;br /&gt;
[[Debian template creation]], [[Ubuntu Gutsy template creation] and [[Category:Templates]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Setup your prefered standard OS Template : edit the /etc/vz/vz.conf}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
== Additional User Tools ==&lt;br /&gt;
&lt;br /&gt;
; vzprocps&lt;br /&gt;
:    A set of utilities to provide system information (vzps and vztop)&lt;br /&gt;
&lt;br /&gt;
; [[Backup_of_a_running_container_with_vzdump vzdump]]&lt;br /&gt;
:    A utility to backup and restore container. &lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzprocps vzdump&lt;br /&gt;
&lt;br /&gt;
== Use it! ==&lt;br /&gt;
&lt;br /&gt;
After installing the OpenVZ kernel, user tools and a minimal OS template&lt;br /&gt;
to create a first container and do some&lt;br /&gt;
[[basic operations in OpenVZ environment]]. Read the [[download:doc/OpenVZ-Users-Guide.pdf]], browse this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5297</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5297"/>
		<updated>2008-03-26T15:23:34Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Repository setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenVZ consists of a kernel, user-level tools, and container templates.&lt;br /&gt;
&lt;br /&gt;
This guide tells how to install the kernel and the tools on [http://www.debian.org Debian] Stable. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Filesystems ===&lt;br /&gt;
It is recommended to use a separate partition for container private directories (by default /var/lib/vz/private/&amp;lt;veid&amp;gt;). The reason why you should do so is that if you wish to use OpenVZ per-container disk quota, you won't be able to use usual Linux disk quotas on the same partition. Bear in mind that per-container quota in this context includes not only pure per-container quota but also usual Linux disk quota used in container, not on [[HN]].&lt;br /&gt;
&lt;br /&gt;
At least try to avoid using root partition for containers because the root user of container will be able to overcome the 5% disk space barrier in some situations. If the HN root partition is completely filled, it will break the system.&lt;br /&gt;
&lt;br /&gt;
OpenVZ per-container disk quota is supported only for ext2/ext3 filesystems so use one of these filesystems (ext3 is recommended) if you need per-container disk quota.&lt;br /&gt;
&lt;br /&gt;
=== Repository setup ===&lt;br /&gt;
&lt;br /&gt;
At the moment two different repositories are online at http://download.openvz.org:&lt;br /&gt;
&lt;br /&gt;
* by Ola Lundqvist &amp;lt;opal@debian.org&amp;gt;&lt;br /&gt;
: (OpenVZ Kernels only)&lt;br /&gt;
: apt-uri http://download.openvz.org/debian&lt;br /&gt;
&lt;br /&gt;
* by Thorsten Schifferdecker &amp;lt;tsd@debian.systs.org&amp;gt;&lt;br /&gt;
: apt-uri http://download.openvz.org/debian-systs&lt;br /&gt;
: (Mirror of OpenVZ Repository from http://debian.systs.org/)&lt;br /&gt;
&lt;br /&gt;
{{Note|The next steps used the Repository at http://download.openvz.org/debian-systs, the actually OpenVZ Tools for Debian are exist only in unstable, see http://packages.debian.org/vzctl}}&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on Ubuntu system, root task are done with [https://help.ubuntu.com/community/RootSudo sudo]}}&lt;br /&gt;
&lt;br /&gt;
This can be achieved by the following commands, as root or as privileged &amp;quot;sudo&amp;quot; user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# echo &amp;quot;deb http://download.openvz.org/debian-systs etch openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you want to recompile the OpenVZ kernel yourself on Debian, see [[Compiling the OpenVZ Kernel (the debian way)]].}}&lt;br /&gt;
&lt;br /&gt;
First, you need to choose what kernel you want to install.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with kernel config from http://download.openvz.org'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386 only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with official Debian kernel config and OpenVZ Settings'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686-bigmem&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-amd64&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| &lt;br /&gt;
| amd64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install &amp;lt;kernel&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the bootloader ===&lt;br /&gt;
&lt;br /&gt;
In case GRUB is used as the boot loader, it will be configured automatically, or execute update-grub; lines similar to these will be added to the &amp;lt;tt&amp;gt;/boot/grub/menu.lst&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
  title           Debian GNU/Linux, kernel 2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  kernel          /vmlinuz-2.6.18-ovz-028stab051.1-686 root=/dev/sda5 ro vga=791&lt;br /&gt;
  initrd          /initrd.img-2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  savedefault&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on debian/ubuntu, a 2.6.22 kernel will boot before a 2.6.18, please check manually the grub boot order. See man update-grub for more details}}&lt;br /&gt;
&lt;br /&gt;
=== Rebooting into OpenVZ kernel ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.}}&lt;br /&gt;
&lt;br /&gt;
Now reboot the machine and choose the OpenVZ Linux Kernel on the boot loader menu. If the OpenVZ kernel has been booted successfully, proceed to installing the user-level tools for OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Installing the user-level tools ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ needs some user-level tools installed. Those are:&lt;br /&gt;
&lt;br /&gt;
; vzctl&lt;br /&gt;
: A utility to control OpenVZ containers (create, destroy, start, stop, set parameters etc.)&lt;br /&gt;
; vzquota&lt;br /&gt;
: A utility to manage quotas for containers. Mostly used indirectly (by vzctl).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # [sudo] apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
&lt;br /&gt;
=== sysctl ===&lt;br /&gt;
&lt;br /&gt;
There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; file. Here is the relevant part of the file; please edit it accordingly.&lt;br /&gt;
&lt;br /&gt;
{{Note|vzctl version from debian-systs, automate changing sysctl options for openvz}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# On Hardware Node we generally need&lt;br /&gt;
# packet forwarding enabled and proxy arp disabled&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.default.forwarding=1&lt;br /&gt;
net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
# Enables source route verification&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
# Enables the magic-sysrq key&lt;br /&gt;
kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
# TCP Explict Congestion Notification&lt;br /&gt;
#net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
# we do not want all our interfaces to send redirects&lt;br /&gt;
net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # [sudo] sysctl -p&lt;br /&gt;
&lt;br /&gt;
{{Note|You can make a symlink from /var/lib/vz to /vz as backward&lt;br /&gt;
compatibility to OpenVZ as installed in other distributions&lt;br /&gt;
(Debian vz root directory is /var/lib/vz to be FHS-compliant.}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] ln -s /var/lib/vz /vz &lt;br /&gt;
&lt;br /&gt;
=== OS templates ===&lt;br /&gt;
&lt;br /&gt;
To install a container, you need OS template(s).&lt;br /&gt;
&lt;br /&gt;
Precreated templates can be found [http://download.openvz.org/contrib/template/precreated/ here].&lt;br /&gt;
&lt;br /&gt;
You can create your own templates, see &lt;br /&gt;
[[Debian template creation]], [[Ubuntu Gutsy template creation] and [[Category:Templates]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Setup your prefered standard OS Template : edit the /etc/vz/vz.conf}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
== Additional User Tools ==&lt;br /&gt;
&lt;br /&gt;
; vzprocps&lt;br /&gt;
:    A set of utilities to provide system information (vzps and vztop)&lt;br /&gt;
&lt;br /&gt;
; [[Backup_of_a_running_container_with_vzdump vzdump]]&lt;br /&gt;
:    A utility to backup and restore container. &lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzprocps vzdump&lt;br /&gt;
&lt;br /&gt;
== Use it! ==&lt;br /&gt;
&lt;br /&gt;
After installing the OpenVZ kernel, user tools and a minimal OS template&lt;br /&gt;
to create a first container and do some&lt;br /&gt;
[[basic operations in OpenVZ environment]]. Read the [[download:doc/OpenVZ-Users-Guide.pdf]], browse this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5296</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=5296"/>
		<updated>2008-03-26T15:23:08Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Repository setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;OpenVZ consists of a kernel, user-level tools, and container templates.&lt;br /&gt;
&lt;br /&gt;
This guide tells how to install the kernel and the tools on [http://www.debian.org Debian] Stable. &lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
=== Filesystems ===&lt;br /&gt;
It is recommended to use a separate partition for container private directories (by default /var/lib/vz/private/&amp;lt;veid&amp;gt;). The reason why you should do so is that if you wish to use OpenVZ per-container disk quota, you won't be able to use usual Linux disk quotas on the same partition. Bear in mind that per-container quota in this context includes not only pure per-container quota but also usual Linux disk quota used in container, not on [[HN]].&lt;br /&gt;
&lt;br /&gt;
At least try to avoid using root partition for containers because the root user of container will be able to overcome the 5% disk space barrier in some situations. If the HN root partition is completely filled, it will break the system.&lt;br /&gt;
&lt;br /&gt;
OpenVZ per-container disk quota is supported only for ext2/ext3 filesystems so use one of these filesystems (ext3 is recommended) if you need per-container disk quota.&lt;br /&gt;
&lt;br /&gt;
=== Repository setup ===&lt;br /&gt;
&lt;br /&gt;
At the moment two different repositories are online at http://download.openvz.org:&lt;br /&gt;
&lt;br /&gt;
* by Ola Lundqvist &amp;lt;opal@debian.org&amp;gt;&lt;br /&gt;
: (OpenVZ Kernels only)&lt;br /&gt;
: apt-uri http://download.openvz.org/debian&lt;br /&gt;
&lt;br /&gt;
* by Thorsten Schifferdecker &amp;lt;tsd@debian.systs.org&amp;gt;&lt;br /&gt;
: apt-uri http://download.openvz.org/debian-systs&lt;br /&gt;
: (Mirror of OpenVZ Repository from http://debian.systs.org/)&lt;br /&gt;
&lt;br /&gt;
{{Note|The next steps used the Repository at http://download.openvz.org/debian-systs, the actually OpenVZ Tools for Debian are exist only in unstable, see http://packages.debian.org/vzctl}}&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on Ubuntu system, root task are done with [https://help.ubuntu.com/community/RootSudo sudo]}}&lt;br /&gt;
&lt;br /&gt;
This can be achieved by the following commands, as root or as privileged &amp;quot;sudo&amp;quot; user&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# [sudo] echo &amp;quot;deb http://download.openvz.org/debian-systs etch openvz&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list&lt;br /&gt;
# wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add - &amp;amp;&amp;amp; apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Kernel installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you want to recompile the OpenVZ kernel yourself on Debian, see [[Compiling the OpenVZ Kernel (the debian way)]].}}&lt;br /&gt;
&lt;br /&gt;
First, you need to choose what kernel you want to install.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with kernel config from http://download.openvz.org'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| i386 and amd64&lt;br /&gt;
|-&lt;br /&gt;
! ovzkernel-2.6.18-enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386 only&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''OpenVZ Kernel list built with official Debian kernel config and OpenVZ Settings'''&lt;br /&gt;
! Kernel !! Description !! Hardware !! Debian Architecture&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-686-bigmem&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| i386&lt;br /&gt;
|-&lt;br /&gt;
! fzakernel-2.6.18-amd64&lt;br /&gt;
| uni- and multiprocessor&lt;br /&gt;
| &lt;br /&gt;
| amd64&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install &amp;lt;kernel&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the bootloader ===&lt;br /&gt;
&lt;br /&gt;
In case GRUB is used as the boot loader, it will be configured automatically, or execute update-grub; lines similar to these will be added to the &amp;lt;tt&amp;gt;/boot/grub/menu.lst&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
  title           Debian GNU/Linux, kernel 2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  root            (hd0,1)&lt;br /&gt;
  kernel          /vmlinuz-2.6.18-ovz-028stab051.1-686 root=/dev/sda5 ro vga=791&lt;br /&gt;
  initrd          /initrd.img-2.6.18-ovz-028stab051.1-686&lt;br /&gt;
  savedefault&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|per default on debian/ubuntu, a 2.6.22 kernel will boot before a 2.6.18, please check manually the grub boot order. See man update-grub for more details}}&lt;br /&gt;
&lt;br /&gt;
=== Rebooting into OpenVZ kernel ===&lt;br /&gt;
&lt;br /&gt;
{{Warning|Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.}}&lt;br /&gt;
&lt;br /&gt;
Now reboot the machine and choose the OpenVZ Linux Kernel on the boot loader menu. If the OpenVZ kernel has been booted successfully, proceed to installing the user-level tools for OpenVZ.&lt;br /&gt;
&lt;br /&gt;
== Installing the user-level tools ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ needs some user-level tools installed. Those are:&lt;br /&gt;
&lt;br /&gt;
; vzctl&lt;br /&gt;
: A utility to control OpenVZ containers (create, destroy, start, stop, set parameters etc.)&lt;br /&gt;
; vzquota&lt;br /&gt;
: A utility to manage quotas for containers. Mostly used indirectly (by vzctl).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # [sudo] apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
&lt;br /&gt;
=== sysctl ===&lt;br /&gt;
&lt;br /&gt;
There are a number of kernel parameters that should be set for OpenVZ to work correctly. These parameters are stored in &amp;lt;tt&amp;gt;/etc/sysctl.conf&amp;lt;/tt&amp;gt; file. Here is the relevant part of the file; please edit it accordingly.&lt;br /&gt;
&lt;br /&gt;
{{Note|vzctl version from debian-systs, automate changing sysctl options for openvz}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&lt;br /&gt;
# On Hardware Node we generally need&lt;br /&gt;
# packet forwarding enabled and proxy arp disabled&lt;br /&gt;
&lt;br /&gt;
net.ipv4.conf.default.forwarding=1&lt;br /&gt;
net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
net.ipv4.ip_forward=1&lt;br /&gt;
&lt;br /&gt;
# Enables source route verification&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
# Enables the magic-sysrq key&lt;br /&gt;
kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
# TCP Explict Congestion Notification&lt;br /&gt;
#net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
# we do not want all our interfaces to send redirects&lt;br /&gt;
net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
net.ipv4.conf.all.send_redirects = 0&lt;br /&gt;
&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  # [sudo] sysctl -p&lt;br /&gt;
&lt;br /&gt;
{{Note|You can make a symlink from /var/lib/vz to /vz as backward&lt;br /&gt;
compatibility to OpenVZ as installed in other distributions&lt;br /&gt;
(Debian vz root directory is /var/lib/vz to be FHS-compliant.}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] ln -s /var/lib/vz /vz &lt;br /&gt;
&lt;br /&gt;
=== OS templates ===&lt;br /&gt;
&lt;br /&gt;
To install a container, you need OS template(s).&lt;br /&gt;
&lt;br /&gt;
Precreated templates can be found [http://download.openvz.org/contrib/template/precreated/ here].&lt;br /&gt;
&lt;br /&gt;
You can create your own templates, see &lt;br /&gt;
[[Debian template creation]], [[Ubuntu Gutsy template creation] and [[Category:Templates]].&lt;br /&gt;
&lt;br /&gt;
{{Note|Setup your prefered standard OS Template : edit the /etc/vz/vz.conf}}&lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
== Additional User Tools ==&lt;br /&gt;
&lt;br /&gt;
; vzprocps&lt;br /&gt;
:    A set of utilities to provide system information (vzps and vztop)&lt;br /&gt;
&lt;br /&gt;
; [[Backup_of_a_running_container_with_vzdump vzdump]]&lt;br /&gt;
:    A utility to backup and restore container. &lt;br /&gt;
&lt;br /&gt;
  # [sudo] apt-get install vzprocps vzdump&lt;br /&gt;
&lt;br /&gt;
== Use it! ==&lt;br /&gt;
&lt;br /&gt;
After installing the OpenVZ kernel, user tools and a minimal OS template&lt;br /&gt;
to create a first container and do some&lt;br /&gt;
[[basic operations in OpenVZ environment]]. Read the [[download:doc/OpenVZ-Users-Guide.pdf]], browse this wiki.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2947</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2947"/>
		<updated>2007-04-02T22:37:19Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* use precomiled kernel images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sarge-Dapper (Stable) =&lt;br /&gt;
The OpenVZ packages at http://debian.systs.org/ aimed to install OpenVZ in a easy way, some task are done on install process!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== edit apt source settings ==&lt;br /&gt;
Add to your &amp;quot;/etc/apt/sources.list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 deb http://debian.systs.org/ sarge openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and get the new package lists&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== precompiled kernel images at debian.systs.org (dso) ==&lt;br /&gt;
The kernel-images on debian.systs.org (dso) use the same kernel-config taken from OpenVZ.&lt;br /&gt;
(most kernel-modules are built-in!)&lt;br /&gt;
&lt;br /&gt;
If there is more than one CPU available (or a CPU with hyperthreading), use the kernel-smp RPM.&lt;br /&gt;
If there is more than 4 Gb of RAM available, use the kernel-enterprise RPM.&lt;br /&gt;
Otherwise, use the plain kernel RPM (kernel).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''Kernel flavors list'''&lt;br /&gt;
! Kernel type !! Description !! Hardware !! Use case&lt;br /&gt;
|-&lt;br /&gt;
! -&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! -smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| 10-20 VPSs&lt;br /&gt;
|-&lt;br /&gt;
! -entnosplit&lt;br /&gt;
| SMP + PAE support&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| 10-30 VPSs&lt;br /&gt;
|-&lt;br /&gt;
! -enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| &amp;gt;20-30 VPSs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
kernel(s) for i368 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.9&lt;br /&gt;
 ovzkernel-2.6.9-enterprise&lt;br /&gt;
 ovzkernel-2.6.9-entnosplit&lt;br /&gt;
 ovzkernel-2.6.9-smp&lt;br /&gt;
&lt;br /&gt;
 ovzkernel-2.6.18&lt;br /&gt;
 ovzkernel-2.6.18-enterprise&lt;br /&gt;
 ovzkernel-2.6.18-smp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i386 only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.18-enterprise    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenVZ tool(s) for i386 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl&lt;br /&gt;
 vzquota&lt;br /&gt;
 vzprocps&lt;br /&gt;
 vzdump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template(s) for i368 and amd64 : Debian 3.1 Minimal&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl-ostmpl-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== installing the kernel-images, toolset and debian-os-template ==&lt;br /&gt;
Example: install the stable OpenVZ kernel, tools and Debian OS Template&lt;br /&gt;
&lt;br /&gt;
 # aptitude install ovzkernel-2.6.9 vzctl vzquota vzdump vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maybe you need to update your &amp;quot;linux-loader&amp;quot; (can be configured at /etc/kernel-img.conf)&lt;br /&gt;
&lt;br /&gt;
for the &amp;quot;GRUB&amp;quot;: &lt;br /&gt;
&lt;br /&gt;
 # /sbin/grub-update &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot in your new Debian Stable OpenVZ System&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all :-)&lt;br /&gt;
&lt;br /&gt;
Now it's time to setup your VE's with the minimal Debian-3.1 Template, create new one or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
= Etch (Testing) =&lt;br /&gt;
OpenVZ is now a part of Debian Etch (a.k.a. &amp;quot;testing&amp;quot;) repository.&lt;br /&gt;
&lt;br /&gt;
== install the kernel-image ==&lt;br /&gt;
&lt;br /&gt;
=== Use precompiled kernel images ===&lt;br /&gt;
Can be found at http://download.openvz.org/kernel/debian/etch/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
List of precompiled kernel-images&lt;br /&gt;
&lt;br /&gt;
 linux-image-2.6.18-openvz-486_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-amd64_01_amd64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-ia64_01_ia64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-k7_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64-smp_01_sparc.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64_01_sparc.deb       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Installing an OpenVZ precompiled Debian Kernel-Image for an i686:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/debian/etch/linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 # dpkg -i linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== or build your own kernel-image (debian way) ===&lt;br /&gt;
&lt;br /&gt;
To install the kernel-source and the OpenVZ kernel patch, run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unpack the kernel-source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # tar xjf linux-source-2.6.18.tar.bz2&lt;br /&gt;
 # cd linux-source-2.6.18&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need a kernel config.&lt;br /&gt;
You can use the config of the debian-kernel:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cp /boot/config-2.6.18-3-686 .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or get a 2.6.18 kernel config from http://download.openvz.org/kernel/devel/current/configs/ &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/devel/current/configs/kernel-2.6.18-028test010-i686.config.ovz -O .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can apply openvz kernel patch and modify your kernel-config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # ../kernel-patches/all/apply/openvz&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need following OpenVZ kernel config settings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(taken from a OpenVZ Kernel 2.6.18-028test010.1 on 686)&lt;br /&gt;
&lt;br /&gt;
Filesystem&lt;br /&gt;
\_ [*] Second extended fs support (CONFIG_EXT2_FS)&lt;br /&gt;
\_ [*] Ext3 journalling file system support (CONFIG_EXT3_FS)&lt;br /&gt;
\_ [*] Quota Support (CONFIG_QUOTA)&lt;br /&gt;
	\_ [*] Compatibility with older quotactl interface (CONFIG_QUOTA_COMPAT)&lt;br /&gt;
	\_ [*]Quota format v2 support (CONFIG_QFMT_V2)&lt;br /&gt;
\_ [*] VPS filesystem (CONFIG_SIM_FS)&lt;br /&gt;
\_ [*] Virtuozzo Disk Quota support	(CONFIG_VZ_QUOTA)&lt;br /&gt;
	\-&amp;gt; [*] Per-user and per-group quota in Virtuozzo quota partitions (VZ_QUOTA_UGID)&lt;br /&gt;
&lt;br /&gt;
OpenVZ ... (what else :-)&lt;br /&gt;
\_[*] Virtual Environment support (CONFIG_VE)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE calls interface (CONFIG_VE_CALLS)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE networking (CONFIG_VE_NETDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Virtual ethernet device (CONFIG_VE_ETHDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE device (CONFIG_VZ_DEV)&lt;br /&gt;
	\_ [*] VE netfiltering (CONFIG_VE_IPTABLES)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE watchdog module (CONFIG_VZ_WDOG)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Checkpointing &amp;amp; restoring Virtual Environments (CONFIG_VZ_CHECKPOINT)&lt;br /&gt;
&lt;br /&gt;
User resources ... (User Beancounters)&lt;br /&gt;
\_ [*] Enable user resource accounting (CONFIG_USER_RESOURCE)&lt;br /&gt;
\_ [*] Account physical memory usage ( CONFIG_USER_RSS_ACCOUNTING)&lt;br /&gt;
\_ [*] Account disk IO (CONFIG_UBC_IO_ACCT)&lt;br /&gt;
\_ [*] Account swap usage (CONFIG_USER_SWAP_ACCOUNTING)&lt;br /&gt;
\_ [*] Report resource usage in /proc (CONFIG_USER_RESOURCE_PROC)&lt;br /&gt;
\_ [*] User resources debug features (CONFIG_UBC_DEBUG)&lt;br /&gt;
\_ [*] Debug kmemsize with cache counters (CONFIG_UBC_DEBUG_KMEM)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Better to build the kernel-headers as well, so afterward other kernel-modules can &lt;br /&gt;
       built without whole kernel tree (e.g.  drbd -&amp;gt; drbd0.7-module-source)&lt;br /&gt;
       See also :&lt;br /&gt;
       # make-kpkg --targets&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile your Kernel (as user root, or you need the --rootcmd!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd binary-arch&lt;br /&gt;
 &lt;br /&gt;
   or all above with one step &lt;br /&gt;
&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd --config menuconfig binary-arch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the kernel and update initramfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # dpkg -i ../linux-image-2.6.18-1-openvz_1_i386.deb&lt;br /&gt;
 # update-initramfs -c -k 2.6.18-1-openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: update-initramfs is done, when make-kpkg is use with --initrd option&lt;br /&gt;
 INFO: update-grub can be configured by /etc/kernel-img.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (when not done above)&lt;br /&gt;
&lt;br /&gt;
GRUB :&lt;br /&gt;
&lt;br /&gt;
 # /usr/sbin/update-grub&lt;br /&gt;
&lt;br /&gt;
 INFO: since the Debian ETCH-release the location of update-grub is moved from /sbin/update-grub to /usr/sbin/update-grub !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== install the toolset ==&lt;br /&gt;
&lt;br /&gt;
You need the toolset for manage-ing OpenVZ Virtual Enviromennt (VE)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== modify needed settings ==&lt;br /&gt;
&lt;br /&gt;
a Debian Way: &lt;br /&gt;
&lt;br /&gt;
If you want network access for the virtual server then you need to enable IP forwarding. Set &amp;quot;ip_forward&amp;quot; to yes in /etc/network/option.&lt;br /&gt;
&lt;br /&gt;
 # editor /etc/network/options&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to enable proxy_arp for the network devices that you want your virtual hosts to be accessible on.&lt;br /&gt;
You can add this to a specific interface in the network configuration (/etc/network/interfaces) by the following lines, replace %DEV% with your device name (ie. eth0).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
# device: %DEV%&lt;br /&gt;
iface %DEV% inet static&lt;br /&gt;
        address 192.168.0.2&lt;br /&gt;
        netmask 255.255.255.0&lt;br /&gt;
        network 192.168.2.0&lt;br /&gt;
        broadcast 192.168.2.255&lt;br /&gt;
        gateway 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
        up sysctl -w net.ipv4.conf.%DEV%.proxy_arp=0&lt;br /&gt;
        pre-down sysctl -w net.ipv4.conf.%DEV%.proxy_arp=1&lt;br /&gt;
 [...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or use the /etc/network/if-up/ and /etc/network/if-down.d/ directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: # man 5 interfaces (to read more about debian's network interface configuration for ifup and ifdown)&lt;br /&gt;
 INFO: Please add to use the magic-sysrq key, to your /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a (plain) OpenVZ Linux Way:&lt;br /&gt;
&lt;br /&gt;
Add settings to &amp;quot;/etc/sysctl.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # On Hardware Node we generally need&lt;br /&gt;
 # packet forwarding enabled and proxy arp disabled&lt;br /&gt;
 net.ipv4.ip_forward = 1&lt;br /&gt;
 net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
&lt;br /&gt;
 # Enables source route verification&lt;br /&gt;
 net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
 # Enables the magic-sysrq key&lt;br /&gt;
 kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
 # TCP Explict Congestion Notification&lt;br /&gt;
 # net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
 # we do not want all our interfaces to send redirects&lt;br /&gt;
 net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
 net.ipv4.conf.all.send_redirects = 0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Suggestion: Please make a symlink from /var/lib/vz to /vz as backward compability to Main OpenVZ&lt;br /&gt;
 (Debian vz root directory is installed FHS-like to /var/lib/vz)&lt;br /&gt;
&lt;br /&gt;
 # ln -s /var/lib/vz /vz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all!&lt;br /&gt;
&lt;br /&gt;
Now it's time to create a OS Template or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INFO: Suggestions: Setup your default OS Template in /etc/vz/vz.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2946</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2946"/>
		<updated>2007-04-02T22:35:55Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* precompiled kernel images at debian.systs.org (dso) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sarge-Dapper (Stable) =&lt;br /&gt;
The OpenVZ packages at http://debian.systs.org/ aimed to install OpenVZ in a easy way, some task are done on install process!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== edit apt source settings ==&lt;br /&gt;
Add to your &amp;quot;/etc/apt/sources.list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 deb http://debian.systs.org/ sarge openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and get the new package lists&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== precompiled kernel images at debian.systs.org (dso) ==&lt;br /&gt;
The kernel-images on debian.systs.org (dso) use the same kernel-config taken from OpenVZ.&lt;br /&gt;
(most kernel-modules are built-in!)&lt;br /&gt;
&lt;br /&gt;
If there is more than one CPU available (or a CPU with hyperthreading), use the kernel-smp RPM.&lt;br /&gt;
If there is more than 4 Gb of RAM available, use the kernel-enterprise RPM.&lt;br /&gt;
Otherwise, use the plain kernel RPM (kernel).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+'''Kernel flavors list'''&lt;br /&gt;
! Kernel type !! Description !! Hardware !! Use case&lt;br /&gt;
|-&lt;br /&gt;
! -&lt;br /&gt;
| uniprocessor&lt;br /&gt;
| up to 4GB of RAM&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! -smp&lt;br /&gt;
| symmetric multiprocessor&lt;br /&gt;
| up to 4 GB of RAM&lt;br /&gt;
| 10-20 VPSs&lt;br /&gt;
|-&lt;br /&gt;
! -entnosplit&lt;br /&gt;
| SMP + PAE support&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| 10-30 VPSs&lt;br /&gt;
|-&lt;br /&gt;
! -enterprise&lt;br /&gt;
| SMP + PAE support + 4/4GB split&lt;br /&gt;
| up to 64 GB of RAM&lt;br /&gt;
| &amp;gt;20-30 VPSs&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
kernel(s) for i368 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.9&lt;br /&gt;
 ovzkernel-2.6.9-enterprise&lt;br /&gt;
 ovzkernel-2.6.9-entnosplit&lt;br /&gt;
 ovzkernel-2.6.9-smp&lt;br /&gt;
&lt;br /&gt;
 ovzkernel-2.6.18&lt;br /&gt;
 ovzkernel-2.6.18-enterprise&lt;br /&gt;
 ovzkernel-2.6.18-smp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i386 only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.18-enterprise    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenVZ tool(s) for i386 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl&lt;br /&gt;
 vzquota&lt;br /&gt;
 vzprocps&lt;br /&gt;
 vzdump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template(s) for i368 and amd64 : Debian 3.1 Minimal&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl-ostmpl-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== installing the kernel-images, toolset and debian-os-template ==&lt;br /&gt;
Example: install the stable OpenVZ kernel, tools and Debian OS Template&lt;br /&gt;
&lt;br /&gt;
 # aptitude install ovzkernel-2.6.9 vzctl vzquota vzdump vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maybe you need to update your &amp;quot;linux-loader&amp;quot; (can be configured at /etc/kernel-img.conf)&lt;br /&gt;
&lt;br /&gt;
for the &amp;quot;GRUB&amp;quot;: &lt;br /&gt;
&lt;br /&gt;
 # /sbin/grub-update &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot in your new Debian Stable OpenVZ System&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all :-)&lt;br /&gt;
&lt;br /&gt;
Now it's time to setup your VE's with the minimal Debian-3.1 Template, create new one or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
= Etch (Testing) =&lt;br /&gt;
OpenVZ is now a part of Debian Etch (a.k.a. &amp;quot;testing&amp;quot;) repository.&lt;br /&gt;
&lt;br /&gt;
== install the kernel-image ==&lt;br /&gt;
&lt;br /&gt;
=== use precomiled kernel images ===&lt;br /&gt;
Can be found at http://download.openvz.org/kernel/debian/etch/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
List of precompiled kernel-images&lt;br /&gt;
&lt;br /&gt;
 linux-image-2.6.18-openvz-486_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-amd64_01_amd64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-ia64_01_ia64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-k7_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64-smp_01_sparc.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64_01_sparc.deb       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Installing an OpenVZ precompiled Debian Kernel-Image for an i686:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/debian/etch/linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 # dpkg -i linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== or build your own kernel-image (debian way) ===&lt;br /&gt;
&lt;br /&gt;
To install the kernel-source and the OpenVZ kernel patch, run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unpack the kernel-source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # tar xjf linux-source-2.6.18.tar.bz2&lt;br /&gt;
 # cd linux-source-2.6.18&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need a kernel config.&lt;br /&gt;
You can use the config of the debian-kernel:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cp /boot/config-2.6.18-3-686 .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or get a 2.6.18 kernel config from http://download.openvz.org/kernel/devel/current/configs/ &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/devel/current/configs/kernel-2.6.18-028test010-i686.config.ovz -O .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can apply openvz kernel patch and modify your kernel-config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # ../kernel-patches/all/apply/openvz&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need following OpenVZ kernel config settings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(taken from a OpenVZ Kernel 2.6.18-028test010.1 on 686)&lt;br /&gt;
&lt;br /&gt;
Filesystem&lt;br /&gt;
\_ [*] Second extended fs support (CONFIG_EXT2_FS)&lt;br /&gt;
\_ [*] Ext3 journalling file system support (CONFIG_EXT3_FS)&lt;br /&gt;
\_ [*] Quota Support (CONFIG_QUOTA)&lt;br /&gt;
	\_ [*] Compatibility with older quotactl interface (CONFIG_QUOTA_COMPAT)&lt;br /&gt;
	\_ [*]Quota format v2 support (CONFIG_QFMT_V2)&lt;br /&gt;
\_ [*] VPS filesystem (CONFIG_SIM_FS)&lt;br /&gt;
\_ [*] Virtuozzo Disk Quota support	(CONFIG_VZ_QUOTA)&lt;br /&gt;
	\-&amp;gt; [*] Per-user and per-group quota in Virtuozzo quota partitions (VZ_QUOTA_UGID)&lt;br /&gt;
&lt;br /&gt;
OpenVZ ... (what else :-)&lt;br /&gt;
\_[*] Virtual Environment support (CONFIG_VE)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE calls interface (CONFIG_VE_CALLS)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE networking (CONFIG_VE_NETDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Virtual ethernet device (CONFIG_VE_ETHDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE device (CONFIG_VZ_DEV)&lt;br /&gt;
	\_ [*] VE netfiltering (CONFIG_VE_IPTABLES)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE watchdog module (CONFIG_VZ_WDOG)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Checkpointing &amp;amp; restoring Virtual Environments (CONFIG_VZ_CHECKPOINT)&lt;br /&gt;
&lt;br /&gt;
User resources ... (User Beancounters)&lt;br /&gt;
\_ [*] Enable user resource accounting (CONFIG_USER_RESOURCE)&lt;br /&gt;
\_ [*] Account physical memory usage ( CONFIG_USER_RSS_ACCOUNTING)&lt;br /&gt;
\_ [*] Account disk IO (CONFIG_UBC_IO_ACCT)&lt;br /&gt;
\_ [*] Account swap usage (CONFIG_USER_SWAP_ACCOUNTING)&lt;br /&gt;
\_ [*] Report resource usage in /proc (CONFIG_USER_RESOURCE_PROC)&lt;br /&gt;
\_ [*] User resources debug features (CONFIG_UBC_DEBUG)&lt;br /&gt;
\_ [*] Debug kmemsize with cache counters (CONFIG_UBC_DEBUG_KMEM)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Better to build the kernel-headers as well, so afterward other kernel-modules can &lt;br /&gt;
       built without whole kernel tree (e.g.  drbd -&amp;gt; drbd0.7-module-source)&lt;br /&gt;
       See also :&lt;br /&gt;
       # make-kpkg --targets&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile your Kernel (as user root, or you need the --rootcmd!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd binary-arch&lt;br /&gt;
 &lt;br /&gt;
   or all above with one step &lt;br /&gt;
&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd --config menuconfig binary-arch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the kernel and update initramfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # dpkg -i ../linux-image-2.6.18-1-openvz_1_i386.deb&lt;br /&gt;
 # update-initramfs -c -k 2.6.18-1-openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: update-initramfs is done, when make-kpkg is use with --initrd option&lt;br /&gt;
 INFO: update-grub can be configured by /etc/kernel-img.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (when not done above)&lt;br /&gt;
&lt;br /&gt;
GRUB :&lt;br /&gt;
&lt;br /&gt;
 # /usr/sbin/update-grub&lt;br /&gt;
&lt;br /&gt;
 INFO: since the Debian ETCH-release the location of update-grub is moved from /sbin/update-grub to /usr/sbin/update-grub !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== install the toolset ==&lt;br /&gt;
&lt;br /&gt;
You need the toolset for manage-ing OpenVZ Virtual Enviromennt (VE)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== modify needed settings ==&lt;br /&gt;
&lt;br /&gt;
a Debian Way: &lt;br /&gt;
&lt;br /&gt;
If you want network access for the virtual server then you need to enable IP forwarding. Set &amp;quot;ip_forward&amp;quot; to yes in /etc/network/option.&lt;br /&gt;
&lt;br /&gt;
 # editor /etc/network/options&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to enable proxy_arp for the network devices that you want your virtual hosts to be accessible on.&lt;br /&gt;
You can add this to a specific interface in the network configuration (/etc/network/interfaces) by the following lines, replace %DEV% with your device name (ie. eth0).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
# device: %DEV%&lt;br /&gt;
iface %DEV% inet static&lt;br /&gt;
        address 192.168.0.2&lt;br /&gt;
        netmask 255.255.255.0&lt;br /&gt;
        network 192.168.2.0&lt;br /&gt;
        broadcast 192.168.2.255&lt;br /&gt;
        gateway 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
        up sysctl -w net.ipv4.conf.%DEV%.proxy_arp=0&lt;br /&gt;
        pre-down sysctl -w net.ipv4.conf.%DEV%.proxy_arp=1&lt;br /&gt;
 [...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or use the /etc/network/if-up/ and /etc/network/if-down.d/ directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: # man 5 interfaces (to read more about debian's network interface configuration for ifup and ifdown)&lt;br /&gt;
 INFO: Please add to use the magic-sysrq key, to your /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a (plain) OpenVZ Linux Way:&lt;br /&gt;
&lt;br /&gt;
Add settings to &amp;quot;/etc/sysctl.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # On Hardware Node we generally need&lt;br /&gt;
 # packet forwarding enabled and proxy arp disabled&lt;br /&gt;
 net.ipv4.ip_forward = 1&lt;br /&gt;
 net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
&lt;br /&gt;
 # Enables source route verification&lt;br /&gt;
 net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
 # Enables the magic-sysrq key&lt;br /&gt;
 kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
 # TCP Explict Congestion Notification&lt;br /&gt;
 # net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
 # we do not want all our interfaces to send redirects&lt;br /&gt;
 net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
 net.ipv4.conf.all.send_redirects = 0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Suggestion: Please make a symlink from /var/lib/vz to /vz as backward compability to Main OpenVZ&lt;br /&gt;
 (Debian vz root directory is installed FHS-like to /var/lib/vz)&lt;br /&gt;
&lt;br /&gt;
 # ln -s /var/lib/vz /vz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all!&lt;br /&gt;
&lt;br /&gt;
Now it's time to create a OS Template or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INFO: Suggestions: Setup your default OS Template in /etc/vz/vz.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2945</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2945"/>
		<updated>2007-04-02T22:26:29Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* installing the kernel-images, toolset and debian-os-template */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sarge-Dapper (Stable) =&lt;br /&gt;
The OpenVZ packages at http://debian.systs.org/ aimed to install OpenVZ in a easy way, some task are done on install process!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== edit apt source settings ==&lt;br /&gt;
Add to your &amp;quot;/etc/apt/sources.list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 deb http://debian.systs.org/ sarge openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and get the new package lists&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== precompiled kernel images at debian.systs.org (dso) ==&lt;br /&gt;
The kernel-images on debian.systs.org (dso) use the same kernel-config taken from OpenVZ.&lt;br /&gt;
(most kernel-modules are built-in!)&lt;br /&gt;
&lt;br /&gt;
kernel(s) for i368 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.9      &lt;br /&gt;
 ovzkernel-2.6.9-smp&lt;br /&gt;
&lt;br /&gt;
 ovzkernel-2.6.18      &lt;br /&gt;
 ovzkernel-2.6.18-smp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i386 only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.18-enterprise    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenVZ tool(s) for i386 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl&lt;br /&gt;
 vzquota&lt;br /&gt;
 vzprocps&lt;br /&gt;
 vzdump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template(s) for i368 and amd64 : Debian 3.1 Minimal&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl-ostmpl-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== installing the kernel-images, toolset and debian-os-template ==&lt;br /&gt;
Example: install the stable OpenVZ kernel, tools and Debian OS Template&lt;br /&gt;
&lt;br /&gt;
 # aptitude install ovzkernel-2.6.9 vzctl vzquota vzdump vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maybe you need to update your &amp;quot;linux-loader&amp;quot; (can be configured at /etc/kernel-img.conf)&lt;br /&gt;
&lt;br /&gt;
for the &amp;quot;GRUB&amp;quot;: &lt;br /&gt;
&lt;br /&gt;
 # /sbin/grub-update &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot in your new Debian Stable OpenVZ System&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all :-)&lt;br /&gt;
&lt;br /&gt;
Now it's time to setup your VE's with the minimal Debian-3.1 Template, create new one or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
= Etch (Testing) =&lt;br /&gt;
OpenVZ is now a part of Debian Etch (a.k.a. &amp;quot;testing&amp;quot;) repository.&lt;br /&gt;
&lt;br /&gt;
== install the kernel-image ==&lt;br /&gt;
&lt;br /&gt;
=== use precomiled kernel images ===&lt;br /&gt;
Can be found at http://download.openvz.org/kernel/debian/etch/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
List of precompiled kernel-images&lt;br /&gt;
&lt;br /&gt;
 linux-image-2.6.18-openvz-486_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-amd64_01_amd64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-ia64_01_ia64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-k7_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64-smp_01_sparc.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64_01_sparc.deb       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Installing an OpenVZ precompiled Debian Kernel-Image for an i686:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/debian/etch/linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 # dpkg -i linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== or build your own kernel-image (debian way) ===&lt;br /&gt;
&lt;br /&gt;
To install the kernel-source and the OpenVZ kernel patch, run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unpack the kernel-source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # tar xjf linux-source-2.6.18.tar.bz2&lt;br /&gt;
 # cd linux-source-2.6.18&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need a kernel config.&lt;br /&gt;
You can use the config of the debian-kernel:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cp /boot/config-2.6.18-3-686 .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or get a 2.6.18 kernel config from http://download.openvz.org/kernel/devel/current/configs/ &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/devel/current/configs/kernel-2.6.18-028test010-i686.config.ovz -O .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can apply openvz kernel patch and modify your kernel-config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # ../kernel-patches/all/apply/openvz&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need following OpenVZ kernel config settings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(taken from a OpenVZ Kernel 2.6.18-028test010.1 on 686)&lt;br /&gt;
&lt;br /&gt;
Filesystem&lt;br /&gt;
\_ [*] Second extended fs support (CONFIG_EXT2_FS)&lt;br /&gt;
\_ [*] Ext3 journalling file system support (CONFIG_EXT3_FS)&lt;br /&gt;
\_ [*] Quota Support (CONFIG_QUOTA)&lt;br /&gt;
	\_ [*] Compatibility with older quotactl interface (CONFIG_QUOTA_COMPAT)&lt;br /&gt;
	\_ [*]Quota format v2 support (CONFIG_QFMT_V2)&lt;br /&gt;
\_ [*] VPS filesystem (CONFIG_SIM_FS)&lt;br /&gt;
\_ [*] Virtuozzo Disk Quota support	(CONFIG_VZ_QUOTA)&lt;br /&gt;
	\-&amp;gt; [*] Per-user and per-group quota in Virtuozzo quota partitions (VZ_QUOTA_UGID)&lt;br /&gt;
&lt;br /&gt;
OpenVZ ... (what else :-)&lt;br /&gt;
\_[*] Virtual Environment support (CONFIG_VE)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE calls interface (CONFIG_VE_CALLS)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE networking (CONFIG_VE_NETDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Virtual ethernet device (CONFIG_VE_ETHDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE device (CONFIG_VZ_DEV)&lt;br /&gt;
	\_ [*] VE netfiltering (CONFIG_VE_IPTABLES)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE watchdog module (CONFIG_VZ_WDOG)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Checkpointing &amp;amp; restoring Virtual Environments (CONFIG_VZ_CHECKPOINT)&lt;br /&gt;
&lt;br /&gt;
User resources ... (User Beancounters)&lt;br /&gt;
\_ [*] Enable user resource accounting (CONFIG_USER_RESOURCE)&lt;br /&gt;
\_ [*] Account physical memory usage ( CONFIG_USER_RSS_ACCOUNTING)&lt;br /&gt;
\_ [*] Account disk IO (CONFIG_UBC_IO_ACCT)&lt;br /&gt;
\_ [*] Account swap usage (CONFIG_USER_SWAP_ACCOUNTING)&lt;br /&gt;
\_ [*] Report resource usage in /proc (CONFIG_USER_RESOURCE_PROC)&lt;br /&gt;
\_ [*] User resources debug features (CONFIG_UBC_DEBUG)&lt;br /&gt;
\_ [*] Debug kmemsize with cache counters (CONFIG_UBC_DEBUG_KMEM)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Better to build the kernel-headers as well, so afterward other kernel-modules can &lt;br /&gt;
       built without whole kernel tree (e.g.  drbd -&amp;gt; drbd0.7-module-source)&lt;br /&gt;
       See also :&lt;br /&gt;
       # make-kpkg --targets&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile your Kernel (as user root, or you need the --rootcmd!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd binary-arch&lt;br /&gt;
 &lt;br /&gt;
   or all above with one step &lt;br /&gt;
&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd --config menuconfig binary-arch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the kernel and update initramfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # dpkg -i ../linux-image-2.6.18-1-openvz_1_i386.deb&lt;br /&gt;
 # update-initramfs -c -k 2.6.18-1-openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: update-initramfs is done, when make-kpkg is use with --initrd option&lt;br /&gt;
 INFO: update-grub can be configured by /etc/kernel-img.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (when not done above)&lt;br /&gt;
&lt;br /&gt;
GRUB :&lt;br /&gt;
&lt;br /&gt;
 # /usr/sbin/update-grub&lt;br /&gt;
&lt;br /&gt;
 INFO: since the Debian ETCH-release the location of update-grub is moved from /sbin/update-grub to /usr/sbin/update-grub !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== install the toolset ==&lt;br /&gt;
&lt;br /&gt;
You need the toolset for manage-ing OpenVZ Virtual Enviromennt (VE)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== modify needed settings ==&lt;br /&gt;
&lt;br /&gt;
a Debian Way: &lt;br /&gt;
&lt;br /&gt;
If you want network access for the virtual server then you need to enable IP forwarding. Set &amp;quot;ip_forward&amp;quot; to yes in /etc/network/option.&lt;br /&gt;
&lt;br /&gt;
 # editor /etc/network/options&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to enable proxy_arp for the network devices that you want your virtual hosts to be accessible on.&lt;br /&gt;
You can add this to a specific interface in the network configuration (/etc/network/interfaces) by the following lines, replace %DEV% with your device name (ie. eth0).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
# device: %DEV%&lt;br /&gt;
iface %DEV% inet static&lt;br /&gt;
        address 192.168.0.2&lt;br /&gt;
        netmask 255.255.255.0&lt;br /&gt;
        network 192.168.2.0&lt;br /&gt;
        broadcast 192.168.2.255&lt;br /&gt;
        gateway 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
        up sysctl -w net.ipv4.conf.%DEV%.proxy_arp=0&lt;br /&gt;
        pre-down sysctl -w net.ipv4.conf.%DEV%.proxy_arp=1&lt;br /&gt;
 [...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or use the /etc/network/if-up/ and /etc/network/if-down.d/ directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: # man 5 interfaces (to read more about debian's network interface configuration for ifup and ifdown)&lt;br /&gt;
 INFO: Please add to use the magic-sysrq key, to your /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a (plain) OpenVZ Linux Way:&lt;br /&gt;
&lt;br /&gt;
Add settings to &amp;quot;/etc/sysctl.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # On Hardware Node we generally need&lt;br /&gt;
 # packet forwarding enabled and proxy arp disabled&lt;br /&gt;
 net.ipv4.ip_forward = 1&lt;br /&gt;
 net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
&lt;br /&gt;
 # Enables source route verification&lt;br /&gt;
 net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
 # Enables the magic-sysrq key&lt;br /&gt;
 kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
 # TCP Explict Congestion Notification&lt;br /&gt;
 # net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
 # we do not want all our interfaces to send redirects&lt;br /&gt;
 net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
 net.ipv4.conf.all.send_redirects = 0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Suggestion: Please make a symlink from /var/lib/vz to /vz as backward compability to Main OpenVZ&lt;br /&gt;
 (Debian vz root directory is installed FHS-like to /var/lib/vz)&lt;br /&gt;
&lt;br /&gt;
 # ln -s /var/lib/vz /vz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all!&lt;br /&gt;
&lt;br /&gt;
Now it's time to create a OS Template or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INFO: Suggestions: Setup your default OS Template in /etc/vz/vz.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2944</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2944"/>
		<updated>2007-04-02T22:25:31Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* precompiled kernel images at debian.systs.org (dso) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sarge-Dapper (Stable) =&lt;br /&gt;
The OpenVZ packages at http://debian.systs.org/ aimed to install OpenVZ in a easy way, some task are done on install process!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== edit apt source settings ==&lt;br /&gt;
Add to your &amp;quot;/etc/apt/sources.list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 deb http://debian.systs.org/ sarge openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and get the new package lists&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== precompiled kernel images at debian.systs.org (dso) ==&lt;br /&gt;
The kernel-images on debian.systs.org (dso) use the same kernel-config taken from OpenVZ.&lt;br /&gt;
(most kernel-modules are built-in!)&lt;br /&gt;
&lt;br /&gt;
kernel(s) for i368 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.9      &lt;br /&gt;
 ovzkernel-2.6.9-smp&lt;br /&gt;
&lt;br /&gt;
 ovzkernel-2.6.18      &lt;br /&gt;
 ovzkernel-2.6.18-smp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i386 only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.18-enterprise    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenVZ tool(s) for i386 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl&lt;br /&gt;
 vzquota&lt;br /&gt;
 vzprocps&lt;br /&gt;
 vzdump&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template(s) for i368 and amd64 : Debian 3.1 Minimal&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl-ostmpl-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== installing the kernel-images, toolset and debian-os-template ==&lt;br /&gt;
Example: install the stable OpenVZ kernel, tools and Debian OS Template&lt;br /&gt;
&lt;br /&gt;
 # aptitude install ovzkernel-2.6.9 vzctl vzquota vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maybe you need to update your &amp;quot;linux-loader&amp;quot; (can be configured at /etc/kernel-img.conf)&lt;br /&gt;
&lt;br /&gt;
for the &amp;quot;GRUB&amp;quot;: &lt;br /&gt;
&lt;br /&gt;
 # /sbin/grub-update &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot in your new Debian Stable OpenVZ System&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all :-)&lt;br /&gt;
&lt;br /&gt;
Now it's time to setup your VE's with the minimal Debian-3.1 Template, create new one or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
= Etch (Testing) =&lt;br /&gt;
OpenVZ is now a part of Debian Etch (a.k.a. &amp;quot;testing&amp;quot;) repository.&lt;br /&gt;
&lt;br /&gt;
== install the kernel-image ==&lt;br /&gt;
&lt;br /&gt;
=== use precomiled kernel images ===&lt;br /&gt;
Can be found at http://download.openvz.org/kernel/debian/etch/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
List of precompiled kernel-images&lt;br /&gt;
&lt;br /&gt;
 linux-image-2.6.18-openvz-486_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-amd64_01_amd64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-ia64_01_ia64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-k7_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64-smp_01_sparc.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64_01_sparc.deb       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Installing an OpenVZ precompiled Debian Kernel-Image for an i686:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/debian/etch/linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 # dpkg -i linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== or build your own kernel-image (debian way) ===&lt;br /&gt;
&lt;br /&gt;
To install the kernel-source and the OpenVZ kernel patch, run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unpack the kernel-source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # tar xjf linux-source-2.6.18.tar.bz2&lt;br /&gt;
 # cd linux-source-2.6.18&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need a kernel config.&lt;br /&gt;
You can use the config of the debian-kernel:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cp /boot/config-2.6.18-3-686 .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or get a 2.6.18 kernel config from http://download.openvz.org/kernel/devel/current/configs/ &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/devel/current/configs/kernel-2.6.18-028test010-i686.config.ovz -O .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can apply openvz kernel patch and modify your kernel-config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # ../kernel-patches/all/apply/openvz&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need following OpenVZ kernel config settings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(taken from a OpenVZ Kernel 2.6.18-028test010.1 on 686)&lt;br /&gt;
&lt;br /&gt;
Filesystem&lt;br /&gt;
\_ [*] Second extended fs support (CONFIG_EXT2_FS)&lt;br /&gt;
\_ [*] Ext3 journalling file system support (CONFIG_EXT3_FS)&lt;br /&gt;
\_ [*] Quota Support (CONFIG_QUOTA)&lt;br /&gt;
	\_ [*] Compatibility with older quotactl interface (CONFIG_QUOTA_COMPAT)&lt;br /&gt;
	\_ [*]Quota format v2 support (CONFIG_QFMT_V2)&lt;br /&gt;
\_ [*] VPS filesystem (CONFIG_SIM_FS)&lt;br /&gt;
\_ [*] Virtuozzo Disk Quota support	(CONFIG_VZ_QUOTA)&lt;br /&gt;
	\-&amp;gt; [*] Per-user and per-group quota in Virtuozzo quota partitions (VZ_QUOTA_UGID)&lt;br /&gt;
&lt;br /&gt;
OpenVZ ... (what else :-)&lt;br /&gt;
\_[*] Virtual Environment support (CONFIG_VE)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE calls interface (CONFIG_VE_CALLS)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE networking (CONFIG_VE_NETDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Virtual ethernet device (CONFIG_VE_ETHDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE device (CONFIG_VZ_DEV)&lt;br /&gt;
	\_ [*] VE netfiltering (CONFIG_VE_IPTABLES)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE watchdog module (CONFIG_VZ_WDOG)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Checkpointing &amp;amp; restoring Virtual Environments (CONFIG_VZ_CHECKPOINT)&lt;br /&gt;
&lt;br /&gt;
User resources ... (User Beancounters)&lt;br /&gt;
\_ [*] Enable user resource accounting (CONFIG_USER_RESOURCE)&lt;br /&gt;
\_ [*] Account physical memory usage ( CONFIG_USER_RSS_ACCOUNTING)&lt;br /&gt;
\_ [*] Account disk IO (CONFIG_UBC_IO_ACCT)&lt;br /&gt;
\_ [*] Account swap usage (CONFIG_USER_SWAP_ACCOUNTING)&lt;br /&gt;
\_ [*] Report resource usage in /proc (CONFIG_USER_RESOURCE_PROC)&lt;br /&gt;
\_ [*] User resources debug features (CONFIG_UBC_DEBUG)&lt;br /&gt;
\_ [*] Debug kmemsize with cache counters (CONFIG_UBC_DEBUG_KMEM)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Better to build the kernel-headers as well, so afterward other kernel-modules can &lt;br /&gt;
       built without whole kernel tree (e.g.  drbd -&amp;gt; drbd0.7-module-source)&lt;br /&gt;
       See also :&lt;br /&gt;
       # make-kpkg --targets&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile your Kernel (as user root, or you need the --rootcmd!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd binary-arch&lt;br /&gt;
 &lt;br /&gt;
   or all above with one step &lt;br /&gt;
&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd --config menuconfig binary-arch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the kernel and update initramfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # dpkg -i ../linux-image-2.6.18-1-openvz_1_i386.deb&lt;br /&gt;
 # update-initramfs -c -k 2.6.18-1-openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: update-initramfs is done, when make-kpkg is use with --initrd option&lt;br /&gt;
 INFO: update-grub can be configured by /etc/kernel-img.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (when not done above)&lt;br /&gt;
&lt;br /&gt;
GRUB :&lt;br /&gt;
&lt;br /&gt;
 # /usr/sbin/update-grub&lt;br /&gt;
&lt;br /&gt;
 INFO: since the Debian ETCH-release the location of update-grub is moved from /sbin/update-grub to /usr/sbin/update-grub !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== install the toolset ==&lt;br /&gt;
&lt;br /&gt;
You need the toolset for manage-ing OpenVZ Virtual Enviromennt (VE)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== modify needed settings ==&lt;br /&gt;
&lt;br /&gt;
a Debian Way: &lt;br /&gt;
&lt;br /&gt;
If you want network access for the virtual server then you need to enable IP forwarding. Set &amp;quot;ip_forward&amp;quot; to yes in /etc/network/option.&lt;br /&gt;
&lt;br /&gt;
 # editor /etc/network/options&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to enable proxy_arp for the network devices that you want your virtual hosts to be accessible on.&lt;br /&gt;
You can add this to a specific interface in the network configuration (/etc/network/interfaces) by the following lines, replace %DEV% with your device name (ie. eth0).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
# device: %DEV%&lt;br /&gt;
iface %DEV% inet static&lt;br /&gt;
        address 192.168.0.2&lt;br /&gt;
        netmask 255.255.255.0&lt;br /&gt;
        network 192.168.2.0&lt;br /&gt;
        broadcast 192.168.2.255&lt;br /&gt;
        gateway 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
        up sysctl -w net.ipv4.conf.%DEV%.proxy_arp=0&lt;br /&gt;
        pre-down sysctl -w net.ipv4.conf.%DEV%.proxy_arp=1&lt;br /&gt;
 [...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or use the /etc/network/if-up/ and /etc/network/if-down.d/ directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: # man 5 interfaces (to read more about debian's network interface configuration for ifup and ifdown)&lt;br /&gt;
 INFO: Please add to use the magic-sysrq key, to your /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a (plain) OpenVZ Linux Way:&lt;br /&gt;
&lt;br /&gt;
Add settings to &amp;quot;/etc/sysctl.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # On Hardware Node we generally need&lt;br /&gt;
 # packet forwarding enabled and proxy arp disabled&lt;br /&gt;
 net.ipv4.ip_forward = 1&lt;br /&gt;
 net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
&lt;br /&gt;
 # Enables source route verification&lt;br /&gt;
 net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
 # Enables the magic-sysrq key&lt;br /&gt;
 kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
 # TCP Explict Congestion Notification&lt;br /&gt;
 # net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
 # we do not want all our interfaces to send redirects&lt;br /&gt;
 net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
 net.ipv4.conf.all.send_redirects = 0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Suggestion: Please make a symlink from /var/lib/vz to /vz as backward compability to Main OpenVZ&lt;br /&gt;
 (Debian vz root directory is installed FHS-like to /var/lib/vz)&lt;br /&gt;
&lt;br /&gt;
 # ln -s /var/lib/vz /vz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all!&lt;br /&gt;
&lt;br /&gt;
Now it's time to create a OS Template or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INFO: Suggestions: Setup your default OS Template in /etc/vz/vz.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2943</id>
		<title>Installation on Debian/old</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=2943"/>
		<updated>2007-04-02T22:01:56Z</updated>

		<summary type="html">&lt;p&gt;Altraqua: /* Sarge (Stable) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sarge-Dapper (Stable) =&lt;br /&gt;
The OpenVZ packages at http://debian.systs.org/ aimed to install OpenVZ in a easy way, some task are done on install process!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== edit apt source settings ==&lt;br /&gt;
Add to your &amp;quot;/etc/apt/sources.list&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 deb http://debian.systs.org/ sarge openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and get the new package lists&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# apt-get update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== precompiled kernel images at debian.systs.org (dso) ==&lt;br /&gt;
The kernel-images on debian.systs.org (dso) use the same kernel-config taken from OpenVZ.&lt;br /&gt;
(most kernel-modules are built-in!)&lt;br /&gt;
&lt;br /&gt;
kernel(s) for i368 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.9      &lt;br /&gt;
 ovzkernel-2.6.9-smp&lt;br /&gt;
&lt;br /&gt;
 ovzkernel-2.6.18      &lt;br /&gt;
 ovzkernel-2.6.18-smp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i386 only:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.18-enterprise    &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OpenVZ tool(s) for i386 and amd64&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl&lt;br /&gt;
 vzquota&lt;br /&gt;
 vzprocps&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
template(s) for i368 and amd64 : Debian 3.1 Minimal&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 vzctl-ostmpl-debian&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== installing the kernel-images, toolset and debian-os-template ==&lt;br /&gt;
Example: install the stable OpenVZ kernel, tools and Debian OS Template&lt;br /&gt;
&lt;br /&gt;
 # aptitude install ovzkernel-2.6.9 vzctl vzquota vzctl-ostmpl-debian&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Maybe you need to update your &amp;quot;linux-loader&amp;quot; (can be configured at /etc/kernel-img.conf)&lt;br /&gt;
&lt;br /&gt;
for the &amp;quot;GRUB&amp;quot;: &lt;br /&gt;
&lt;br /&gt;
 # /sbin/grub-update &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reboot in your new Debian Stable OpenVZ System&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all :-)&lt;br /&gt;
&lt;br /&gt;
Now it's time to setup your VE's with the minimal Debian-3.1 Template, create new one or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
= Etch (Testing) =&lt;br /&gt;
OpenVZ is now a part of Debian Etch (a.k.a. &amp;quot;testing&amp;quot;) repository.&lt;br /&gt;
&lt;br /&gt;
== install the kernel-image ==&lt;br /&gt;
&lt;br /&gt;
=== use precomiled kernel images ===&lt;br /&gt;
Can be found at http://download.openvz.org/kernel/debian/etch/&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
List of precompiled kernel-images&lt;br /&gt;
&lt;br /&gt;
 linux-image-2.6.18-openvz-486_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-amd64_01_amd64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-ia64_01_ia64.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-k7_02_i386.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64-smp_01_sparc.deb&lt;br /&gt;
 linux-image-2.6.18-openvz-sparc64_01_sparc.deb       &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example: Installing an OpenVZ precompiled Debian Kernel-Image for an i686:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/debian/etch/linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
 # dpkg -i linux-image-2.6.18-openvz-686_02_i386.deb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== or build your own kernel-image (debian way) ===&lt;br /&gt;
&lt;br /&gt;
To install the kernel-source and the OpenVZ kernel patch, run:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install kernel-package linux-source-2.6.18 kernel-patch-openvz libncurses5-dev&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unpack the kernel-source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /usr/src&lt;br /&gt;
 # tar xjf linux-source-2.6.18.tar.bz2&lt;br /&gt;
 # cd linux-source-2.6.18&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need a kernel config.&lt;br /&gt;
You can use the config of the debian-kernel:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cp /boot/config-2.6.18-3-686 .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Or get a 2.6.18 kernel config from http://download.openvz.org/kernel/devel/current/configs/ &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://download.openvz.org/kernel/devel/current/configs/kernel-2.6.18-028test010-i686.config.ovz -O .config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can apply openvz kernel patch and modify your kernel-config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # ../kernel-patches/all/apply/openvz&lt;br /&gt;
 # make menuconfig&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need following OpenVZ kernel config settings:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
(taken from a OpenVZ Kernel 2.6.18-028test010.1 on 686)&lt;br /&gt;
&lt;br /&gt;
Filesystem&lt;br /&gt;
\_ [*] Second extended fs support (CONFIG_EXT2_FS)&lt;br /&gt;
\_ [*] Ext3 journalling file system support (CONFIG_EXT3_FS)&lt;br /&gt;
\_ [*] Quota Support (CONFIG_QUOTA)&lt;br /&gt;
	\_ [*] Compatibility with older quotactl interface (CONFIG_QUOTA_COMPAT)&lt;br /&gt;
	\_ [*]Quota format v2 support (CONFIG_QFMT_V2)&lt;br /&gt;
\_ [*] VPS filesystem (CONFIG_SIM_FS)&lt;br /&gt;
\_ [*] Virtuozzo Disk Quota support	(CONFIG_VZ_QUOTA)&lt;br /&gt;
	\-&amp;gt; [*] Per-user and per-group quota in Virtuozzo quota partitions (VZ_QUOTA_UGID)&lt;br /&gt;
&lt;br /&gt;
OpenVZ ... (what else :-)&lt;br /&gt;
\_[*] Virtual Environment support (CONFIG_VE)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE calls interface (CONFIG_VE_CALLS)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE networking (CONFIG_VE_NETDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Virtual ethernet device (CONFIG_VE_ETHDEV)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE device (CONFIG_VZ_DEV)&lt;br /&gt;
	\_ [*] VE netfiltering (CONFIG_VE_IPTABLES)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; VE watchdog module (CONFIG_VZ_WDOG)&lt;br /&gt;
	\_ &amp;lt;M&amp;gt; Checkpointing &amp;amp; restoring Virtual Environments (CONFIG_VZ_CHECKPOINT)&lt;br /&gt;
&lt;br /&gt;
User resources ... (User Beancounters)&lt;br /&gt;
\_ [*] Enable user resource accounting (CONFIG_USER_RESOURCE)&lt;br /&gt;
\_ [*] Account physical memory usage ( CONFIG_USER_RSS_ACCOUNTING)&lt;br /&gt;
\_ [*] Account disk IO (CONFIG_UBC_IO_ACCT)&lt;br /&gt;
\_ [*] Account swap usage (CONFIG_USER_SWAP_ACCOUNTING)&lt;br /&gt;
\_ [*] Report resource usage in /proc (CONFIG_USER_RESOURCE_PROC)&lt;br /&gt;
\_ [*] User resources debug features (CONFIG_UBC_DEBUG)&lt;br /&gt;
\_ [*] Debug kmemsize with cache counters (CONFIG_UBC_DEBUG_KMEM)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Better to build the kernel-headers as well, so afterward other kernel-modules can &lt;br /&gt;
       built without whole kernel tree (e.g.  drbd -&amp;gt; drbd0.7-module-source)&lt;br /&gt;
       See also :&lt;br /&gt;
       # make-kpkg --targets&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compile your Kernel (as user root, or you need the --rootcmd!)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd binary-arch&lt;br /&gt;
 &lt;br /&gt;
   or all above with one step &lt;br /&gt;
&lt;br /&gt;
 # make-kpkg --append_to_version=-1-openvz --added_patches=openvz --revision=1 --initrd --config menuconfig binary-arch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install the kernel and update initramfs:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # dpkg -i ../linux-image-2.6.18-1-openvz_1_i386.deb&lt;br /&gt;
 # update-initramfs -c -k 2.6.18-1-openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: update-initramfs is done, when make-kpkg is use with --initrd option&lt;br /&gt;
 INFO: update-grub can be configured by /etc/kernel-img.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Update the bootloader (when not done above)&lt;br /&gt;
&lt;br /&gt;
GRUB :&lt;br /&gt;
&lt;br /&gt;
 # /usr/sbin/update-grub&lt;br /&gt;
&lt;br /&gt;
 INFO: since the Debian ETCH-release the location of update-grub is moved from /sbin/update-grub to /usr/sbin/update-grub !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== install the toolset ==&lt;br /&gt;
&lt;br /&gt;
You need the toolset for manage-ing OpenVZ Virtual Enviromennt (VE)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # apt-get install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== modify needed settings ==&lt;br /&gt;
&lt;br /&gt;
a Debian Way: &lt;br /&gt;
&lt;br /&gt;
If you want network access for the virtual server then you need to enable IP forwarding. Set &amp;quot;ip_forward&amp;quot; to yes in /etc/network/option.&lt;br /&gt;
&lt;br /&gt;
 # editor /etc/network/options&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases you may need to enable proxy_arp for the network devices that you want your virtual hosts to be accessible on.&lt;br /&gt;
You can add this to a specific interface in the network configuration (/etc/network/interfaces) by the following lines, replace %DEV% with your device name (ie. eth0).&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
# device: %DEV%&lt;br /&gt;
iface %DEV% inet static&lt;br /&gt;
        address 192.168.0.2&lt;br /&gt;
        netmask 255.255.255.0&lt;br /&gt;
        network 192.168.2.0&lt;br /&gt;
        broadcast 192.168.2.255&lt;br /&gt;
        gateway 192.168.2.1&lt;br /&gt;
&lt;br /&gt;
        up sysctl -w net.ipv4.conf.%DEV%.proxy_arp=0&lt;br /&gt;
        pre-down sysctl -w net.ipv4.conf.%DEV%.proxy_arp=1&lt;br /&gt;
 [...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or use the /etc/network/if-up/ and /etc/network/if-down.d/ directories.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: # man 5 interfaces (to read more about debian's network interface configuration for ifup and ifdown)&lt;br /&gt;
 INFO: Please add to use the magic-sysrq key, to your /etc/sysctl.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
a (plain) OpenVZ Linux Way:&lt;br /&gt;
&lt;br /&gt;
Add settings to &amp;quot;/etc/sysctl.conf&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # On Hardware Node we generally need&lt;br /&gt;
 # packet forwarding enabled and proxy arp disabled&lt;br /&gt;
 net.ipv4.ip_forward = 1&lt;br /&gt;
 net.ipv4.conf.default.proxy_arp = 0&lt;br /&gt;
&lt;br /&gt;
 # Enables source route verification&lt;br /&gt;
 net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
&lt;br /&gt;
 # Enables the magic-sysrq key&lt;br /&gt;
 kernel.sysrq = 1&lt;br /&gt;
&lt;br /&gt;
 # TCP Explict Congestion Notification&lt;br /&gt;
 # net.ipv4.tcp_ecn = 0&lt;br /&gt;
&lt;br /&gt;
 # we do not want all our interfaces to send redirects&lt;br /&gt;
 net.ipv4.conf.default.send_redirects = 1&lt;br /&gt;
 net.ipv4.conf.all.send_redirects = 0 &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 INFO: Suggestion: Please make a symlink from /var/lib/vz to /vz as backward compability to Main OpenVZ&lt;br /&gt;
 (Debian vz root directory is installed FHS-like to /var/lib/vz)&lt;br /&gt;
&lt;br /&gt;
 # ln -s /var/lib/vz /vz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Before you restart your Server, keep in mind, that your system has all needed modules enabled; booting from your harddisk (e.g. hardware modules, raid system(s), lvm2 etc). May you need a INITRD (initramdisk) or compile needed kernel modules statically in.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 # reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's all!&lt;br /&gt;
&lt;br /&gt;
Now it's time to create a OS Template or download another precreated OS-Template.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 INFO: Suggestions: Setup your default OS Template in /etc/vz/vz.conf&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Installation]]&lt;/div&gt;</summary>
		<author><name>Altraqua</name></author>
		
	</entry>
</feed>