<?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=Progfou</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=Progfou"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Progfou"/>
	<updated>2026-06-13T16:32:43Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Debian_template_creation&amp;diff=3105</id>
		<title>Debian template creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Debian_template_creation&amp;diff=3105"/>
		<updated>2007-05-18T19:56:00Z</updated>

		<summary type="html">&lt;p&gt;Progfou: (protect code to escape wiki syntax)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;These are rough instructions of how to manually create basic Debian Etch (4.0) template cache, which can be used to create OpenVZ [[VE]]s based on Debian Etch (4.0).&lt;br /&gt;
&lt;br /&gt;
'''Notes:'''&lt;br /&gt;
* You shouldn't be running as root, but as a user that is permitted to use sudo instead.  It's a dangerous idea, run as root at your peril.&lt;br /&gt;
* Anywhere you see &amp;lt;tt&amp;gt;/vz&amp;lt;/tt&amp;gt;, you might really need to use &amp;lt;tt&amp;gt;/var/lib/vz&amp;lt;/tt&amp;gt; instead, especially on a Debian Etch host.&lt;br /&gt;
* Anywhere you see &amp;lt;tt&amp;gt;http://debian.osuosl.org/debian/&amp;lt;/tt&amp;gt;, you can substitute your favorite Debian mirror.  ([http://www.debian.org/mirror/list List of official Debian Mirrors])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
You need to have a working copy of &amp;lt;tt&amp;gt;debootstrap&amp;lt;/tt&amp;gt; running on your hardware node.&lt;br /&gt;
&lt;br /&gt;
For Debian:&lt;br /&gt;
 sudo apt-get install debootstrap&lt;br /&gt;
&lt;br /&gt;
For Gentoo:&lt;br /&gt;
 sudo emerge debootstrap&lt;br /&gt;
&lt;br /&gt;
For other distros you might need to install it from sources, or search for an appropriate package for your distribution.  An RPM is available on the [http://forum.openvz.org/index.php?t=tree&amp;amp;th=142&amp;amp;mid=584 OpenVZ Forum].&lt;br /&gt;
&lt;br /&gt;
== Bootstrapping Debian ==&lt;br /&gt;
This will download Debian Etch to a temporary location on your server.  Specify your architecture instead of &amp;lt;tt&amp;gt;i386&amp;lt;/tt&amp;gt; if you're using something other than i386/x86.  For example, for AMD64/x86_64, use &amp;lt;tt&amp;gt;amd64&amp;lt;/tt&amp;gt; or for ia64, use &amp;lt;tt&amp;gt;ia64&amp;lt;/tt&amp;gt;.  We use VE ID of 777 for this example; surely it can be any other unused ID.&lt;br /&gt;
 sudo debootstrap --arch i386 etch /vz/private/777 http://debian.osuosl.org/debian/&lt;br /&gt;
&lt;br /&gt;
== Preparing and starting the VE ==&lt;br /&gt;
&lt;br /&gt;
=== Setting VE config ===&lt;br /&gt;
First, we need a config for the [[VE]]:&lt;br /&gt;
 sudo vzctl set 777 --applyconfig vps.basic --save&lt;br /&gt;
&lt;br /&gt;
=== Setting VE OSTEMPLATE ===&lt;br /&gt;
Also, we need &amp;lt;tt&amp;gt;OSTEMPLATE&amp;lt;/tt&amp;gt; to be set in VE configuration file, for the [[vzctl]] to work properly.&lt;br /&gt;
&lt;br /&gt;
 sudo sh -c 'echo &amp;quot;OSTEMPLATE=debian-4.0&amp;quot; &amp;gt;&amp;gt; /etc/vz/conf/777.conf'&lt;br /&gt;
&lt;br /&gt;
=== Setting VE IP address ===&lt;br /&gt;
For the [[VE]] to be able to download updates from the Internet, we need a valid IP address for it:&lt;br /&gt;
 sudo vzctl set 777 --ipadd x.x.x.x --save&lt;br /&gt;
&lt;br /&gt;
{{Note|if you use private IP for the VE, you have to set up NAT as described in [[Using NAT for VE with private IPs]].}}&lt;br /&gt;
&lt;br /&gt;
=== Setting DNS server for VE ===&lt;br /&gt;
For the [[VE]] to be able to download updates from the Internet, we also need to specify a DNS for it:&lt;br /&gt;
 sudo vzctl set 777 --nameserver x.x.x.x --save&lt;br /&gt;
&lt;br /&gt;
=== Starting VE ===&lt;br /&gt;
Now start the VE:&lt;br /&gt;
 sudo vzctl start 777&lt;br /&gt;
&lt;br /&gt;
== Customizing the installation ==&lt;br /&gt;
A few things need to be done inside a newly created VE for it to become suitable for OpenVZ.  All those things are done inside the VE, so first command is:&lt;br /&gt;
 sudo vzctl enter 777&lt;br /&gt;
 export PATH=/sbin:/usr/sbin:/bin:/usr/bin&lt;br /&gt;
&lt;br /&gt;
{{Note|'''Warning!'''  Do not run the commands below on the hardware node, they are only to be run within the VE!}}&lt;br /&gt;
&lt;br /&gt;
=== Set Debian repositories ===&lt;br /&gt;
 cat &amp;lt;&amp;lt;EOF &amp;gt; /etc/apt/sources.list&lt;br /&gt;
 deb http://debian.osuosl.org/debian/ etch main contrib&lt;br /&gt;
 deb http://security.debian.org etch/updates main contrib&lt;br /&gt;
 EOF&lt;br /&gt;
&lt;br /&gt;
=== Get new security updates ===&lt;br /&gt;
 apt-get update&lt;br /&gt;
 apt-get upgrade&lt;br /&gt;
&lt;br /&gt;
=== Install some more packages ===&lt;br /&gt;
Installing packages could be an interactive process so the system might ask some questions.  You can install more packages if you'd like.  For example:&lt;br /&gt;
 apt-get install ssh quota&lt;br /&gt;
&lt;br /&gt;
=== Set sane permissions for &amp;lt;tt&amp;gt;/root&amp;lt;/tt&amp;gt; directory ===&lt;br /&gt;
 chmod 700 /root&lt;br /&gt;
&lt;br /&gt;
=== Disable root login ===&lt;br /&gt;
This will disable root login by default.&lt;br /&gt;
 usermod -L root&lt;br /&gt;
&lt;br /&gt;
=== Disable getty ===&lt;br /&gt;
Disable running &amp;lt;tt&amp;gt;getty&amp;lt;/tt&amp;gt;s on terminals as a VE does not have any:&lt;br /&gt;
 sed -i -e '/getty/d' /etc/inittab&lt;br /&gt;
&lt;br /&gt;
=== Disable &amp;lt;tt&amp;gt;sync()&amp;lt;/tt&amp;gt; for syslog ===&lt;br /&gt;
Turn off doing &amp;lt;tt&amp;gt;sync()&amp;lt;/tt&amp;gt; on every write for &amp;lt;tt&amp;gt;syslog&amp;lt;/tt&amp;gt;'s log files, to improve I/O performance:&lt;br /&gt;
 &amp;lt;pre&amp;gt;sed -i -e 's@\([[:space:]]\)\(/var/log/\)@\1-\2@' /etc/syslog.conf&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Fix &amp;lt;tt&amp;gt;/etc/mtab&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
Link &amp;lt;tt&amp;gt;/etc/mtab&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;/proc/mounts&amp;lt;/tt&amp;gt;, so &amp;lt;tt&amp;gt;df&amp;lt;/tt&amp;gt; and friends will work:&lt;br /&gt;
 rm -f /etc/mtab&lt;br /&gt;
 ln -s /proc/mounts /etc/mtab&lt;br /&gt;
&lt;br /&gt;
=== Remove some unneeded packages ===&lt;br /&gt;
If you have any packages you'd like to remove, now's the time for it.  Here's an example:&lt;br /&gt;
 dpkg --purge modutils ppp pppoeconf pppoe pppconfig&lt;br /&gt;
&lt;br /&gt;
=== Disable services ===&lt;br /&gt;
Do not start some services, stick to bare minimum:&lt;br /&gt;
 update-rc.d -f klogd remove&lt;br /&gt;
 update-rc.d -f quotarpc remove&lt;br /&gt;
 update-rc.d -f exim4 remove&lt;br /&gt;
 update-rc.d -f inetd remove&lt;br /&gt;
&lt;br /&gt;
=== Fix SSH host keys ===&lt;br /&gt;
This is only useful if you installed SSH.  Each individual [[VE]] should have its own pair of SSH host keys.  The code below will wipe out the existing SSH keys and instruct the newly-created [[VE]] to create new SSH keys on first boot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- please do not remove &amp;lt;pre&amp;gt;...&amp;lt;/pre&amp;gt; pair of tags below,&lt;br /&gt;
     otherwise quotes after -N (-N '') are not visible --&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rm -f /etc/ssh/ssh_host_*&lt;br /&gt;
cat &amp;lt;&amp;lt; EOF &amp;gt; /etc/rc2.d/S15ssh_gen_host_keys&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N ''&lt;br /&gt;
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N ''&lt;br /&gt;
rm -f \$0&lt;br /&gt;
EOF&lt;br /&gt;
chmod a+x /etc/rc2.d/S15ssh_gen_host_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Clean packages ===&lt;br /&gt;
After installing packages, you'll have some junk packages laying around in your cache.  Since you don't want your template to have those, this command will wipe them out.&lt;br /&gt;
 apt-get clean&lt;br /&gt;
&lt;br /&gt;
Now everything is done.  Exit from the template and go back to the hardware node.&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
== Preparing for and packing template cache ==&lt;br /&gt;
&lt;br /&gt;
We don't need an IP for the VE anymore, and we definitely do not need it in template cache, so remove it:&lt;br /&gt;
 sudo vzctl set 777 --ipdel all --save&lt;br /&gt;
&lt;br /&gt;
Also, remove DNS server and search domain information from ''/etc/resolv.conf'' file '''in VE''':&lt;br /&gt;
 sudo nano /vz/private/777/etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
Stop the VE:&lt;br /&gt;
 sudo vzctl stop 777&lt;br /&gt;
&lt;br /&gt;
Go to the VE directory:&lt;br /&gt;
 cd /vz/private/777&lt;br /&gt;
&lt;br /&gt;
Now create a cached OS tarball.  In the command below, you'll want to replace &amp;lt;tt&amp;gt;i386&amp;lt;/tt&amp;gt; with your architecture (i386, amd64, ia64, etc).&lt;br /&gt;
 sudo tar -zcf /vz/template/cache/debian-4.0-i386-minimal.tar.gz .&lt;br /&gt;
&lt;br /&gt;
Look at the resulting tarball to see its size is sane:&lt;br /&gt;
 # ls -lh /vz/template/cache&lt;br /&gt;
 -rw-r--r--  1 root root  51M Apr 10 03:16 debian-4.0-i386-minimal.tar.gz&lt;br /&gt;
&lt;br /&gt;
== Checking if template cache works ==&lt;br /&gt;
We can now create a VE based on the just-created template cache.  Be sure to change &amp;lt;tt&amp;gt;i386&amp;lt;/tt&amp;gt; to your architecture just like you did when you named the tarball above.&lt;br /&gt;
 sudo vzctl create 123456 --ostemplate debian-4.0-i386-minimal&lt;br /&gt;
&lt;br /&gt;
Now make sure that it works:&lt;br /&gt;
 sudo vzctl start 123456&lt;br /&gt;
 sudo vzctl exec 123456 ps ax&lt;br /&gt;
&lt;br /&gt;
You should see that a few processes are running.&lt;br /&gt;
&lt;br /&gt;
== Final cleanup ==&lt;br /&gt;
Stop and remove the test VE you just created:&lt;br /&gt;
 sudo vzctl stop 123456&lt;br /&gt;
 sudo vzctl destroy 123456&lt;br /&gt;
 sudo rm /etc/vz/conf/123456.conf.destroyed&lt;br /&gt;
&lt;br /&gt;
Finally, let's remove the VE we used for OS template cache creation:&lt;br /&gt;
 sudo vzctl destroy 777&lt;br /&gt;
 sudo rm /etc/vz/conf/777.conf.destroyed&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Templates]]&lt;/div&gt;</summary>
		<author><name>Progfou</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Installation_on_Debian/old&amp;diff=3062</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=3062"/>
		<updated>2007-05-02T06:59:00Z</updated>

		<summary type="html">&lt;p&gt;Progfou: up'ed the title, since it's common to all installations + new way for Debian network options&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Sarge-Dapper (OldStable) =&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;
== 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 deb.&lt;br /&gt;
If there is more than 4 Gb of RAM available, use the kernel-enterprise deb.&lt;br /&gt;
Otherwise, use the plain kernel deb (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-image: 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 (Stable) =&lt;br /&gt;
OpenVZ is now a part of Debian Etch repository.&lt;br /&gt;
&lt;br /&gt;
== install the kernel-image ==&lt;br /&gt;
&lt;br /&gt;
=== precompiled kernel images at download.openvz.org ===&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;
=== precompiled kernel images at debian.systs.org ===&lt;br /&gt;
&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/ etch openvz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the signing key of debian.systs.org (dso) apt-keyring, (need root permissions)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 # wget http://debian.systs.org/dso_archiv_signing_key.asc -q -O - | apt-key add -&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;
linux-image (version 028stab023.1):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ovzkernel-2.6.18 (i386 and amd64)&lt;br /&gt;
 ovzkernel-2.6.18-smp (i386 and amd64)&lt;br /&gt;
 ovzkernel-2.6.18-enterprise only (i386)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # apt-get install &amp;lt;linux-image&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;
Security&lt;br /&gt;
	\-&amp;gt;[ ] Enable different security models&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;
If you want network access for the virtual server then you need to enable IP forwarding.&lt;br /&gt;
&lt;br /&gt;
An old (before Etch) Debian Way: 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;
The new (from Etch) standard way is to use sysctl for this (see below).&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: It is recommanded to add 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>Progfou</name></author>
		
	</entry>
</feed>