Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Gentoo template creation

206 bytes removed, 15:53, 27 December 2011
a few cosmetic fixes and improvements here and there ;)
== Download stage3 ==
We will make the template from a stage3 file. An OpenVZ OS template should be an archive (.tar.gz) of the root of a working system, but without the kernel and some files. You can download stage3 from the nearest mirror here: from http://www.gentoo.org/main/en/mirrors.xml.or here [directly from http://distfiles.gentoo.org/releases/x86/current-stage3/]
== Create directory for the new container and unarchive stage3 ==
== Edit CT Config ==
Add the following First, you need to <code>/etc/vz/conf/1001.conf</code>let vzctl know that this CT is using Gentoo:<pre> echo 'OSTEMPLATE="gentoo"' >>/etc/vz/conf/1001.conf</pre>
Creation of container at end of this HowTo obeys quota limits and might exceed
those limits set in <code>vps.basic</code> by default (at least encountered with Gentoo
10.1 release). Thus it might be required to increase limits now. The following
values are providing 2 GiByte GB soft limit with 2.5 GiByte GB hard limit:<pre>DISKSPACE="2097152:2621440"</pre>
But if you using Gentoo 11.2 release and future you can skip the increasing the disk space limits, by deafult you have 2 GiByte soft limit and DISKSPACE="2G:2.3 GiByte hard limit.5G"
After that you copy that configuration file turning it into a sample configuration for later use:
<pre> # cp /etc/vz/conf/1001.conf /etc/vz/conf/ve-gentoo.conf-sample</pre>
== Make /etc/mtab a symlink to /proc/mounts ==