Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Creating a CentOS 5.0 Template

466 bytes added, 19:41, 2 November 2007
no edit summary
<div style="font-size: 14pt"><strong>Creating a CentOS 5.0 Template for OpenVZ</strong></div><ol>1. <li>Install a system (virtual or physical) with the default CentOS installation that you wish to package. This could be a minimal distro or the default distro or even something custom.</li>2. <li>Once the OS has been installed, you need to tar the contents of the OS.a. <ol style="list-style-type: lower-alpha"> <li>First, create a file called /tmp/exclude and add the following lines to it:<br />  <code>.bash_history<br />lost+found<br />/dev/*<br />/mnt/*<br />/tmp/*<br /> /proc/*<br />/sys/*<br />/usr/src/*<br /></code></li> b. <li>Now, tar the OS file up by typing: <code>tar –czvf /tmp/centos-5.0-<&lt;ARCH>&gt;-<&lt;DISTRO>&gt;-image.tar.gz / –X /tmp/exclude </code> where <strong>&lt;ARCH&gt;</strong> represents the system architecture (such as <strong>i386 </strong> or <strong>x86_64</strong>) and <strong>&lt;DISTRO&gt;</strong> represents the distribution (<strong>default</strong>, <strong>minimal</strong>, etc.).</li>c. <li>Now transfer the file over to the OpenVZ server into the <strong>/vz/template/cache </strong> folder.</li> </ol></li>3. <li>On the OpenVZ server create a “dummy” VPS by creating a folder called <strong>/vz/private/50 </strong> and copying the <strong>/etc/vz/conf/ve-vps.basic.conf-sample </strong> to <strong>/etc/vz/conf/50.conf</strong>.</ol>
NOTE:
5
edits