<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Glen Lumanau &#187; etch</title>
	<atom:link href="http://lumanau.web.id/tag/etch/feed" rel="self" type="application/rss+xml" />
	<link>http://lumanau.web.id</link>
	<description>About Glen Lumanau</description>
	<lastBuildDate>Fri, 23 Jul 2010 10:08:00 +0000</lastBuildDate>
	<language></language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Installing And Using OpenVZ On Debian Etch</title>
		<link>http://lumanau.web.id/2008/10/07/installing-and-using-openvz-on-debian-etch.html</link>
		<comments>http://lumanau.web.id/2008/10/07/installing-and-using-openvz-on-debian-etch.html#comments</comments>
		<pubDate>Tue, 07 Oct 2008 08:40:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[etch]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[installing]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[virtual]]></category>

		<guid isPermaLink="false">http://www.lumanau.web.id/?p=43</guid>
		<description><![CDATA[Installing OpenVZ In order to install OpenVZ, we need to add the OpenVZ repository to our /etc/apt/sources.list: vi /etc/apt/sources.list deb http://download.openvz.org/debian-systs etch openvz Run wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- &#124; apt-key add &#8211; &#38;&#38; apt-get update The repository contains six OpenVZ kernel from which you must choose one. The ovzkernel packages use the original OpenVZ kernel [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Installing OpenVZ</strong></p>
<p>In order to install OpenVZ, we need to add the OpenVZ repository to our /etc/apt/sources.list:</p>
<p><em>vi /etc/apt/sources.list</em></p>
<blockquote><p>deb http://download.openvz.org/debian-systs etch openvz</p></blockquote>
<p>Run</p>
<p><em>wget -q http://download.openvz.org/debian-systs/dso_archiv_signing_key.asc -O- | apt-key add &#8211; &amp;&amp; apt-get update</em></p>
<p><span id="more-43"></span></p>
<p>The repository contains six OpenVZ kernel from which you must choose one. The ovzkernel packages use the original OpenVZ kernel configuration, the fzakernel packages use the default Debian kernel configuration plus OpenVZ settings:</p>
<ul>
<li>ovzkernel-2.6.18: uniprocessor | up to 4GB of RAM | i386 and amd64</li>
<li>ovzkernel-2.6.18-smp: symmetric multiprocessor | up to 4 GB of RAM | i386 and amd64</li>
<li>ovzkernel-2.6.18-enterprise: SMP + PAE support + 4/4GB split | up to 64 GB of RAM | i386 only</li>
<li>fzakernel-2.6.18-686: uni- and multiprocessor | up to 4GB of RAM | i386</li>
<li>fzakernel-2.6.18-686-bigmem: symmetric multiprocessor | up to 64 GB of RAM | i386</li>
<li>fzakernel-2.6.18-amd64: uni- and multiprocessor | amd64</li>
</ul>
<p>Pick one of them and install it as follows:</p>
<p><em>apt-get install fzakernel-2.6.18-686-bigmem</em></p>
<p>Next update the GRUB boot loader:</p>
<p><em>update-grub</em></p>
<p>Now we install some OpenVZ user tools plus a minimal Debian Etch OS template which we can use to create virtual machines:</p>
<p><em>apt-get install vzctl vzquota vzctl-ostmpl-debian vzprocps vzdump</em></p>
<p>Create a symlink from /var/lib/vz to /vz to provide backward compatibility:</p>
<p><em>ln -s /var/lib/vz /vz</em></p>
<p>Open /etc/sysctl.conf and make sure that you have the following settings in it:</p>
<p><em>vi /etc/sysctl.conf</em></p>
<blockquote><p>net.ipv4.conf.all.rp_filter=1<br />
net.ipv4.icmp_echo_ignore_broadcasts=1<br />
net.ipv4.conf.default.forwarding=1<br />
net.ipv4.conf.default.proxy_arp = 0<br />
net.ipv4.ip_forward=1<br />
kernel.sysrq = 1<br />
net.ipv4.conf.default.send_redirects = 1<br />
net.ipv4.conf.all.send_redirects = 0</p></blockquote>
<p>If you need to modify /etc/sysctl.conf, run</p>
<p><em>sysctl -p</em></p>
<p>Open /etc/vz/vz.conf and set NEIGHBOUR_DEVS to all:</p>
<p><em>vi /etc/vz/vz.conf</em></p>
<blockquote><p>NEIGHBOUR_DEVS=all</p></blockquote>
<p>Finally, reboot the system:</p>
<p><em>reboot</em></p>
<p>If your system reboots without problems, then everything is fine!</p>
<p>Run</p>
<p><em>uname -r</em></p>
<p>and your new OpenVZ kernel should show up:</p>
<p><em>server1:~# uname -r<br />
2.6.18-fza-028stab053.5-686-bigmem<br />
server1:~#</em></p>
<p><strong>Using OpenVZ</strong></p>
<p>To set up a VPS from the default minimal Debian Etch template (you can find it in /var/lib/vz/template/cache), run:</p>
<p><em>vzctl create 101 &#8211;ostemplate debian-4.0-i386-minimal &#8211;config vps.basic</em></p>
<p>The 101 must be a uniqe ID &#8211; each virtual machine must have its own unique ID. You can use the last part of the virtual machine&#8217;s IP address for it. For example, if the virtual machine&#8217;s IP address is 1.2.3.101, you use 101 as the ID.</p>
<p>If you want to have the vm started at boot, run</p>
<p><em>vzctl set 101 &#8211;onboot yes &#8211;save</em></p>
<p>To set a hostname and IP address for the vm, run:</p>
<p><em>vzctl set 101 &#8211;hostname test.example.com &#8211;save<br />
vzctl set 101 &#8211;ipadd 1.2.3.101 &#8211;save</em></p>
<p>Next we set the number of sockets to 120 and assign a few nameservers to the vm:</p>
<p><em>vzctl set 101 &#8211;numothersock 120 &#8211;save<br />
vzctl set 101 &#8211;nameserver 213.133.98.98 &#8211;nameserver 213.133.99.99 &#8211;nameserver 213.133.100.100 &#8211;nameserver 145.253.2.75 &#8211;save</em></p>
<p>(Instead of using the vzctl set commands, you can as well directly edit the vm&#8217;s configuration file which is stored in the /etc/vz/conf directory. If the ID of the vm is 101, then the configuration file is /etc/vz/conf/101.conf.)</p>
<p>To start the vm, run</p>
<p><em>vzctl start 101</em></p>
<p>To set a root password for the vm, execute</p>
<p><em>vzctl exec 101 passwd</em></p>
<p>You can now either connect to the vm via SSH (e.g. with <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a>), or you enter it as follows:</p>
<p><em>vzctl enter 101</em></p>
<p>To leave the vm&#8217;s console, type</p>
<p><em>exit</em></p>
<p>To restart a vm, run</p>
<p><em>vzctl restart 101</em></p>
<p>To delete a vm from the hard drive (it must be stopped before you can do this), run</p>
<p><em>vzctl destroy 101</em></p>
<p>To get a list of your vms and their statuses, run</p>
<p><em>vzlist -a</em></p>
<blockquote><p>server1:~# vzlist -a<br />
VEID      NPROC STATUS  IP_ADDR         HOSTNAME<br />
101          6 running 1.2.3.101       test.example.com<br />
server1:~#</p></blockquote>
<p>To find out about the resources allocated to a vm, run</p>
<p><em>vzctl exec 101 cat /proc/user_beancounters</em></p>
<blockquote><p>server1:~# vzctl exec 101 cat /proc/user_beancounters<br />
Version: 2.5<br />
uid  resource           held    maxheld    barrier      limit    failcnt<br />
101:  kmemsize         500737     517142   11055923   11377049          0<br />
lockedpages           0          0        256        256          0<br />
privvmpages        2315       2337      65536      69632          0<br />
shmpages            640        640      21504      21504          0<br />
dummy                 0          0          0          0          0<br />
numproc               7          7        240        240          0<br />
physpages          1258       1289          0 2147483647          0<br />
vmguarpages           0          0      33792 2147483647          0<br />
oomguarpages       1258       1289      26112 2147483647          0<br />
numtcpsock            2          2        360        360          0<br />
numflock              1          1        188        206          0<br />
numpty                1          1         16         16          0<br />
numsiginfo            0          1        256        256          0<br />
tcpsndbuf         17856      17856    1720320    2703360          0<br />
tcprcvbuf         32768      32768    1720320    2703360          0<br />
othersockbuf       2232       2928    1126080    2097152          0<br />
dgramrcvbuf           0          0     262144     262144          0<br />
numothersock          1          3        120        120          0<br />
dcachesize            0          0    3409920    3624960          0<br />
numfile             189        189       9312       9312          0<br />
dummy                 0          0          0          0          0<br />
dummy                 0          0          0          0          0<br />
dummy                 0          0          0          0          0<br />
numiptent            10         10        128        128          0<br />
server1:~#</p></blockquote>
<p>The failcnt column is very important, it should contain only zeros; if it doesn&#8217;t, this means that the vm needs more resources than are currently allocated to the vm. Open the vm&#8217;s configuration file in /etc/vz/conf and raise the appropriate resource, then restart the vm.</p>
<p>To find out more about the vzctl command, run</p>
<p><em>man vzctl</em></p>
<p><strong>Links</strong></p>
<ol>
<li><a href="http://www.openvz.org">OpenVZ</a></li>
<li><a href="http://www.debian.org">Debian</a></li>
<li><a href="http://www.howtoforge.com/installing-and-using-openvz-on-debian-etch">Howtoforge</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://lumanau.web.id/2008/10/07/installing-and-using-openvz-on-debian-etch.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
