<?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=Btgeekboy</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=Btgeekboy"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Btgeekboy"/>
	<updated>2026-05-14T14:56:19Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Migration_from_one_HN_to_another&amp;diff=3787</id>
		<title>Migration from one HN to another</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Migration_from_one_HN_to_another&amp;diff=3787"/>
		<updated>2007-12-21T10:43:51Z</updated>

		<summary type="html">&lt;p&gt;Btgeekboy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The vzmigrate script is used to migrate a Virutal Environment from one Hardware Node to another.&lt;br /&gt;
&lt;br /&gt;
You first have to setup SSH to permit the old HN to be able to login to the new HN without a password prompt.  Run the following on the old HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[root@OpenVZ ~]# ssh-keygen -t rsa&lt;br /&gt;
Generating public/private rsa key pair.&lt;br /&gt;
Enter file in which to save the key (/root/.ssh/id_rsa):&lt;br /&gt;
Created directory '/root/.ssh'.&lt;br /&gt;
Enter passphrase (empty for no passphrase):&lt;br /&gt;
Enter same passphrase again:&lt;br /&gt;
Your identification has been saved in /root/.ssh/id_rsa.&lt;br /&gt;
Your public key has been saved in /root/.ssh/id_rsa.pub.&lt;br /&gt;
The key fingerprint is:&lt;br /&gt;
74:7a:3e:7f:27:2f:42:bb:52:4c:ad:55:31:6f:79:f2 root@OpenVZ.ics.local&lt;br /&gt;
[root@OpenVZ ~]# cd .ssh/&lt;br /&gt;
[root@OpenVZ .ssh]# ls -al&lt;br /&gt;
total 20&lt;br /&gt;
drwx------  2 root root 4096 Aug 11 09:41 .&lt;br /&gt;
drwxr-x---  5 root root 4096 Aug 11 09:40 ..&lt;br /&gt;
-rw-------  1 root root  887 Aug 11 09:41 id_rsa&lt;br /&gt;
-rw-r--r--  1 root root  231 Aug 11 09:41 id_rsa.pub&lt;br /&gt;
[root@OpenVZ .ssh]# scp id_rsa.pub root@10.1.5.6:./id_rsa.pub&lt;br /&gt;
The authenticity of host '10.1.5.6 (10.1.5.6)' can't be established.&lt;br /&gt;
RSA key fingerprint is 3f:2a:26:15:e4:37:e2:06:b8:4d:20:ee:3a:dc:c1:69.&lt;br /&gt;
Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;
Warning: Permanently added '10.1.5.6' (RSA) to the list of known hosts.&lt;br /&gt;
root@10.1.5.6's password:&lt;br /&gt;
id_rsa.pub               100%  231     0.2KB/s   00:00&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following on the new HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[root@Char ~]# cd .ssh/&lt;br /&gt;
[root@Char .ssh]# touch authorized_keys2&lt;br /&gt;
[root@Char .ssh]# chmod 600 authorized_keys2&lt;br /&gt;
[root@Char .ssh]# cat ../id_rsa.pub &amp;gt;&amp;gt; authorized_keys2&lt;br /&gt;
[root@Char .ssh]# rm ../id_rsa.pub&lt;br /&gt;
rm: remove regular file `../id_rsa.pub'? y&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run the following on the old HN.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[root@OpenVZ .ssh]# ssh -2 -v root@10.1.5.6&lt;br /&gt;
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003&lt;br /&gt;
debug1: Reading configuration data /etc/ssh/ssh_config&lt;br /&gt;
debug1: Applying options for *&lt;br /&gt;
debug1: Connecting to 10.1.5.6 [10.1.5.6] port 22.&lt;br /&gt;
debug1: Connection established.&lt;br /&gt;
debug1: permanently_set_uid: 0/0&lt;br /&gt;
debug1: identity file /root/.ssh/id_rsa type 1&lt;br /&gt;
debug1: identity file /root/.ssh/id_dsa type -1&lt;br /&gt;
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3&lt;br /&gt;
debug1: match: OpenSSH_4.3 pat OpenSSH*&lt;br /&gt;
debug1: Enabling compatibility mode for protocol 2.0&lt;br /&gt;
debug1: Local version string SSH-2.0-OpenSSH_3.9p1&lt;br /&gt;
debug1: SSH2_MSG_KEXINIT sent&lt;br /&gt;
debug1: SSH2_MSG_KEXINIT received&lt;br /&gt;
debug1: kex: server-&amp;gt;client aes128-cbc hmac-md5 none&lt;br /&gt;
debug1: kex: client-&amp;gt;server aes128-cbc hmac-md5 none&lt;br /&gt;
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024&amp;lt;1024&amp;lt;8192) sent&lt;br /&gt;
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP&lt;br /&gt;
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent&lt;br /&gt;
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY&lt;br /&gt;
debug1: Host '10.1.5.6' is known and matches the RSA host key.&lt;br /&gt;
debug1: Found key in /root/.ssh/known_hosts:1&lt;br /&gt;
debug1: ssh_rsa_verify: signature correct&lt;br /&gt;
debug1: SSH2_MSG_NEWKEYS sent&lt;br /&gt;
debug1: expecting SSH2_MSG_NEWKEYS&lt;br /&gt;
debug1: SSH2_MSG_NEWKEYS received&lt;br /&gt;
debug1: SSH2_MSG_SERVICE_REQUEST sent&lt;br /&gt;
debug1: SSH2_MSG_SERVICE_ACCEPT received&lt;br /&gt;
debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;
debug1: Next authentication method: gssapi-with-mic&lt;br /&gt;
debug1: An invalid name was supplied&lt;br /&gt;
Cannot determine realm for numeric host address&lt;br /&gt;
&lt;br /&gt;
debug1: An invalid name was supplied&lt;br /&gt;
Cannot determine realm for numeric host address&lt;br /&gt;
&lt;br /&gt;
debug1: Next authentication method: publickey&lt;br /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;br /&gt;
debug1: Authentications that can continue: publickey,gssapi-with-mic,password&lt;br /&gt;
debug1: Offering public key: /root/.ssh/id_rsa&lt;br /&gt;
debug1: Server accepts key: pkalg ssh-rsa blen 149&lt;br /&gt;
debug1: read PEM private key done: type RSA&lt;br /&gt;
debug1: Authentication succeeded (publickey).&lt;br /&gt;
debug1: channel 0: new [client-session]&lt;br /&gt;
debug1: Entering interactive session.&lt;br /&gt;
Last login: Thu Aug  9 16:41:30 2007 from 10.1.5.20&lt;br /&gt;
[root@Char ~]# exit&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that the vzmigrate script will function, a little bit on vzmigrate.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;This program is used for VE migration to another node&lt;br /&gt;
Usage:&lt;br /&gt;
vzmigrate [-r yes|no] [--ssh=&amp;lt;options&amp;gt;] [--keep-dst] [--online] [-v]&lt;br /&gt;
        destination_address &amp;lt;VEID&amp;gt;&lt;br /&gt;
Options:&lt;br /&gt;
-r, --remove-area yes|no&lt;br /&gt;
        Whether to remove VE on source HN for successfully migrated VE.&lt;br /&gt;
--ssh=&amp;lt;ssh options&amp;gt;&lt;br /&gt;
        Additional options that will be passed to ssh while establishing&lt;br /&gt;
        connection to destination HN. Please be careful with options&lt;br /&gt;
        passed, DO NOT pass destination hostname.&lt;br /&gt;
--keep-dst&lt;br /&gt;
        Do not clean synced destination VE private area in case of some&lt;br /&gt;
        error. It makes sense to use this option on big VE migration to&lt;br /&gt;
        avoid syncing VE private area again in case some error&lt;br /&gt;
        (on VE stop for example) occurs during first migration attempt.&lt;br /&gt;
--online&lt;br /&gt;
        Perform online (zero-downtime) migration: during the migration the&lt;br /&gt;
        VE hangs for a while and after the migration it continues working&lt;br /&gt;
        as though nothing has happened.&lt;br /&gt;
-v&lt;br /&gt;
        Verbose mode. Causes vzmigrate to print debugging messages about&lt;br /&gt;
        its progress (including some time statistics).&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is an example of migrating VE 101 from the current HN to one at 10.1.5.6:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;[root@OpenVZ .ssh]# vzmigrate 10.1.5.6 101&lt;br /&gt;
OPT:10.1.5.6&lt;br /&gt;
Starting migration of VE 101 on 10.1.5.6&lt;br /&gt;
Preparing remote node&lt;br /&gt;
Initializing remote quota&lt;br /&gt;
Syncing private&lt;br /&gt;
Syncing 2nd level quota&lt;br /&gt;
Turning quota off&lt;br /&gt;
Cleanup&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here's a simple shell script that will migrate each VPS one after another.  Just pass the destination host node as the single argument to the script.  Feel free to add the -v flag to the vzmigrate flags if you'd like to see it execute with the verbose option:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
vzlist | tail -n +2 | awk 'BEGIN { } /.*/ { print $1 }' | xargs -n1 vzmigrate --remove-area no --keep-dst $1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Btgeekboy</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=UBC_failcnt_reset&amp;diff=3786</id>
		<title>UBC failcnt reset</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=UBC_failcnt_reset&amp;diff=3786"/>
		<updated>2007-12-21T10:40:49Z</updated>

		<summary type="html">&lt;p&gt;Btgeekboy: Grammar, misc cleanup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One of the frequently asked question is '''How do I reset failcnt in /proc/user_beancounters?''' While it's not suggested, it is possible.&lt;br /&gt;
&lt;br /&gt;
== What is failcnt? ==&lt;br /&gt;
There are a number of resource limits (called [[User Beancounters]], or UBC for short) set for a VE. If one of those resources hit its limit, the appropriate fail counter (last column of &amp;lt;code&amp;gt;/proc/user_beancounters&amp;lt;/code&amp;gt;) increases. See [[Resource shortage]] for more info.&lt;br /&gt;
&lt;br /&gt;
== How to clear failcnt? ==&lt;br /&gt;
You do not need to, and this would be an incorrect thing to do.&lt;br /&gt;
&lt;br /&gt;
There can be many applications that read &amp;lt;code&amp;gt;/proc/user_beancounters&amp;lt;/code&amp;gt;, and thus if you will reset it, you may have problems with those other apps. Consider what happens if you reset your sent/received packets/bytes statistics on a network interface — programs which track it may not function properly. &lt;br /&gt;
&lt;br /&gt;
Therefore, the proper usage of failcnt is not to check whether it is zero or not, but to check whether it is increased since the previous readout. In other words, check the difference, not the absolute value. It is easy to write a simple script to do just that.&lt;br /&gt;
&lt;br /&gt;
== OK, I understand, but I still want to clear failcnt! ==&lt;br /&gt;
&lt;br /&gt;
UBC failcnts are stored for the duration of the uptime of your VE. Thus, restarting the VE resets the counts.&lt;br /&gt;
&lt;br /&gt;
The problem here is tcp time wait buckets can still there after a VE is stopped. You can check that by seeing the &amp;lt;code&amp;gt;held&amp;lt;/code&amp;gt; column for &amp;lt;code&amp;gt;kmemsize&amp;lt;/code&amp;gt; parameter. If it is not zero, that means you have to wait about 5 minutes in order to time wait buckets to expire, and the corresponding beancounter to be uncharged.&lt;br /&gt;
&lt;br /&gt;
If you still see failcnt not reset to 0 after more than 5 minutes after VE is stopped, your kernel was likely compiled with CONFIG_UBC_KEEP_UNUSED=y, and in that case you'll have to switch off this option if you want to reset beancounters when VE is restarted. &lt;br /&gt;
&lt;br /&gt;
If you're sure your kernel was NOT compiled with the above option and it's not resetting failcnt after 5 minutes, it means there is a bug in UBC code. Please file a detailed [[bug report]] to [http://bugzilla.openvz.org bugzilla.openvz.org]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* {{Forum|361}}&lt;br /&gt;
* {{Forum|497}}&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:UBC]]&lt;/div&gt;</summary>
		<author><name>Btgeekboy</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=UBC_failcnt_reset&amp;diff=3785</id>
		<title>UBC failcnt reset</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=UBC_failcnt_reset&amp;diff=3785"/>
		<updated>2007-12-21T10:38:01Z</updated>

		<summary type="html">&lt;p&gt;Btgeekboy: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;One of the frequently asked question is '''How do I reset failcnt in /proc/user_beancounters?''' While it's not suggested, it is possible.&lt;br /&gt;
&lt;br /&gt;
== What is failcnt? ==&lt;br /&gt;
There are a number of resource limits (called [[User Beancounters]], or UBC for short) set for a VE. If one of those resources hit its limit, the appropriate fail counter (last column of &amp;lt;code&amp;gt;/proc/user_beancounters&amp;lt;/code&amp;gt;) increases. See [[Resource shortage]] for more info.&lt;br /&gt;
&lt;br /&gt;
== How to clear failcnt? ==&lt;br /&gt;
You do not need to, and this would be an incorrect thing to do.&lt;br /&gt;
&lt;br /&gt;
There can be many application who reads &amp;lt;code&amp;gt;/proc/user_beancounters&amp;lt;/code&amp;gt;, and thus if you will reset it you gonna have problems with those other apps. Consider what happens if you will reset you sent/received packets/bytes statistics on the network interface — programs which reads will be screwed up. &lt;br /&gt;
&lt;br /&gt;
So, the proper procedure of checking failcnt is not to check whether it is zero or not, but to check whether it is increased since the previous readout. In other words, check the difference, not the absolute value. It is easy to write a simple script to do just that.&lt;br /&gt;
&lt;br /&gt;
== OK, I understand, but I still want to clear failcnt! ==&lt;br /&gt;
&lt;br /&gt;
OK, you can do so by restarting your VE. Since fail counters are for VE lifetime, they will be cleared after VE stop.&lt;br /&gt;
&lt;br /&gt;
The problem here is tcp time wait buckets can still there after a VE is stopped. You can check that by seeing the &amp;lt;code&amp;gt;held&amp;lt;/code&amp;gt; column for &amp;lt;code&amp;gt;kmemsize&amp;lt;/code&amp;gt; parameter. If it is not zero, that means you have to wait about 5 minutes in order to time wait buckets to expire, and the corresponding beancounter to be uncharged.&lt;br /&gt;
&lt;br /&gt;
If you still see failcnt not reset to 0 after more than 5 minutes after VE is stopped, your kernel was likely compiled with CONFIG_UBC_KEEP_UNUSED=y, and in that case you'll have to switch off this option if you want to reset beancounters when VE is restarted. &lt;br /&gt;
&lt;br /&gt;
If you're sure your kernel was NOT compiled with the above option and it's not resetting failcnt after 5 minutes, it means there is a bug in UBC code. Please file a detailed [[bug report]] to [http://bugzilla.openvz.org bugzilla.openvz.org]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* {{Forum|361}}&lt;br /&gt;
* {{Forum|497}}&lt;br /&gt;
&lt;br /&gt;
[[Category:FAQ]]&lt;br /&gt;
[[Category:UBC]]&lt;/div&gt;</summary>
		<author><name>Btgeekboy</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Quick_installation_(legacy)&amp;diff=3729</id>
		<title>Quick installation (legacy)</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Quick_installation_(legacy)&amp;diff=3729"/>
		<updated>2007-12-07T08:28:24Z</updated>

		<summary type="html">&lt;p&gt;Btgeekboy: Added link to helpful info for x86_64 users.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document briefly describes the steps needed to install OpenVZ on your (RPM based) machine. For '''Debian''' based systems see [[Installation on Debian]].&lt;br /&gt;
&lt;br /&gt;
This document is also available in the following languages: [http://forum.openvz.org/index.php?t=tree&amp;amp;amp;goto=35&amp;amp;amp;#msg_35 French],  [http://forum.openvz.org/index.php?t=tree&amp;amp;amp;goto=1805&amp;amp;amp;#msg_1805 German],&lt;br /&gt;
[http://wiki.openvz.jp Japanese],&lt;br /&gt;
[[Quick_installation_(Spanish)|Spanish]].&lt;br /&gt;
&lt;br /&gt;
OpenVZ consists of a kernel, user-level tools, and VE templates. This guide tells how to install the kernel and the tools.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
This guide assumes you are running recent release of Fedora Core (like FC5) or RHEL/CentOS 4. Currently, OpenVZ kernel tries to support the same hardware that Red Hat kernels support. For full hardware compatibility list, see [http://www.swsoft.com/en/products/virtuozzo/hcl/ Virtuozzo HCL].&lt;br /&gt;
&lt;br /&gt;
=== Filesystems ===&lt;br /&gt;
It is recommended to use a separate partition for VEs private directories (by default /vz/private/&amp;lt;veid&amp;gt;). The reason why you should do so is that if you wish to use OpenVZ per-VE disk quota, you won't be able to use usual Linux disk quotas on the same partition. Bear in mind, that per-VE quota in this context includes not only pure per-VE quota, but also usual Linux disk quota used in VE, not on [[HN]].&lt;br /&gt;
&lt;br /&gt;
At least try to avoid using root partition for VEs, because the root user of VE will be able to overcome 5% disk space barrier in some situations. This way HN root partition can be completely filled and it will break the system.&lt;br /&gt;
&lt;br /&gt;
OpenVZ per-VE disk quota is supported only for ext2/ext3 filesystems. So use one of these filesystems (ext3 is recommended) if you need per-VE disk quota.&lt;br /&gt;
&lt;br /&gt;
=== rpm or yum? ===&lt;br /&gt;
&lt;br /&gt;
In case you have yum utility available on your system, you may want to use it effectively to install and update OpenVZ packages. In case you don't have yum, or don't want to use it, you can use plain old rpm. Instructions for both rpm and yum are provided below.&lt;br /&gt;
&lt;br /&gt;
=== yum pre-setup ===&lt;br /&gt;
If you want to use yum, you should set up OpenVZ yum repository first.&lt;br /&gt;
&lt;br /&gt;
Download [http://download.openvz.org/openvz.repo openvz.repo] file and put it to your &amp;lt;code&amp;gt;/etc/yum.repos.d/&amp;lt;/code&amp;gt; repository. This can be achieved by the following commands, as root:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /etc/yum.repos.d&lt;br /&gt;
# wget http://download.openvz.org/openvz.repo&lt;br /&gt;
# rpm --import  http://download.openvz.org/RPM-GPG-Key-OpenVZ&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In case you can not cd to /etc/yum.repos.d, it means either yum is not installed on your system, or yum version is too old. In that case, just stick to rpm installation method.&lt;br /&gt;
&lt;br /&gt;
== Kernel installation ==&lt;br /&gt;
&lt;br /&gt;
{{Note|In case you want to recompile the kernel yourself rather than use the one provided by OpenVZ, see [[kernel build]].}}&lt;br /&gt;
&lt;br /&gt;
First, you need to choose what “flavor” of the kernel you want to install. Please refer to [[Kernel flavors]] for more information.&lt;br /&gt;
&lt;br /&gt;
=== Using yum ===&lt;br /&gt;
Run the following command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install ovzkernel[-flavor]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;[-flavor]&amp;lt;/code&amp;gt; is optional, and can be &amp;lt;code&amp;gt;-smp&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-enterprise&amp;lt;/code&amp;gt;. Refer to [[kernel flavors]] for more info.&lt;br /&gt;
&lt;br /&gt;
=== Using rpm ===&lt;br /&gt;
Get the kernel binary RPM from the [http://openvz.org/download/kernel/ Download » Kernel] page, or directly from [http://download.openvz.org/kernel/ download.openvz.org/kernel], or from one of its [[Download mirrors|mirrors]]. You need only one kernel RPM so please [[Kernel flavors|choose the appropriate one]] depending on your hardware.&lt;br /&gt;
&lt;br /&gt;
Next, install the kernel RPM you chose:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# rpm -ihv ovzkernel[-flavor]*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;code&amp;gt;[-flavor]&amp;lt;/code&amp;gt; is optional, and can be &amp;lt;code&amp;gt;-smp&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;-enterprise&amp;lt;/code&amp;gt;. Refer to [[kernel flavors]] for more info.&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;lt;tt&amp;gt;rpm -U&amp;lt;/tt&amp;gt; (where &amp;lt;tt&amp;gt;-U&amp;lt;/tt&amp;gt; stands for ''upgrade'') should '''not''' be used, otherwise all currently installed kernels will be uninstalled.}}&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: lines similar to these will be added to the &amp;lt;tt&amp;gt;/boot/grub/grub.conf&amp;lt;/tt&amp;gt; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
title Fedora Core (2.6.8-022stab029.1)&lt;br /&gt;
       root (hd0,0)&lt;br /&gt;
       kernel /vmlinuz-2.6.8-022stab029.1 ro root=/dev/sda5 quiet rhgb vga=0x31B&lt;br /&gt;
       initrd /initrd-2.6.8-022stab029.1.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Change &amp;lt;tt&amp;gt;Fedora Core&amp;lt;/tt&amp;gt; to &amp;lt;tt&amp;gt;OpenVZ&amp;lt;/tt&amp;gt; (just for clarity reasons, so the OpenVZ kernels will not be mixed up with non-OpenVZ ones). Remove extra arguments from the kernel line, leaving only the &amp;lt;tt&amp;gt;root=...&amp;lt;/tt&amp;gt; parameter. The modifed portion of &amp;lt;tt&amp;gt;/etc/grub.conf&amp;lt;/tt&amp;gt; should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
title OpenVZ (2.6.8-022stab029.1)&lt;br /&gt;
        root (hd0,0)&lt;br /&gt;
        kernel /vmlinuz-2.6.8-022stab029.1 ro root=/dev/sda5&lt;br /&gt;
        initrd /initrd-2.6.8-022stab029.1.img&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring ==&lt;br /&gt;
&lt;br /&gt;
Please make sure the following steps are performed before rebooting into OpenVZ kernel.&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;
&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;
# Enables source route verification&lt;br /&gt;
net.ipv4.conf.all.rp_filter = 1&lt;br /&gt;
# Enables the magic-sysrq key&lt;br /&gt;
kernel.sysrq = 1&lt;br /&gt;
# TCP Explict Congestion Notification&lt;br /&gt;
#net.ipv4.tcp_ecn = 0&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;
=== SELinux ===&lt;br /&gt;
&lt;br /&gt;
SELinux should be disabled. To that effect, put the following line to &amp;lt;code&amp;gt;/etc/sysconfig/selinux&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SELINUX=disabled&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Conntracks ===&lt;br /&gt;
&lt;br /&gt;
In the stable OpenVZ kernels (those that are 2.6.8-based) netfilter connection tracking for [[VE0]] is disabled by default. If you have a stateful firewall enabled on the host node (it is there by default) you should either disable it, or enable connection tracking for [[VE0]].&lt;br /&gt;
&lt;br /&gt;
To enable conntracks for VE0, add the following line to &amp;lt;code&amp;gt;/etc/modprobe.conf&amp;lt;/code&amp;gt; file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
options ip_conntrack ip_conntrack_enable_ve0=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In kernels later than 2.6.8, connection tracking is enabled by default.}}&lt;br /&gt;
&lt;br /&gt;
== Rebooting into OpenVZ kernel ==&lt;br /&gt;
&lt;br /&gt;
Now reboot the machine and choose &amp;quot;OpenVZ&amp;quot; on the boot loader menu. If the OpenVZ kernel has been booted successfully, proceed to installing the user-level tools for OpenVZ. If you are installing on x86_64 CentOS or Fedora system, you may want to continue the setup process using the [[Install_OpenVZ_on_a_x86_64_system_Centos-Fedora|x86_64 guide]].&lt;br /&gt;
&lt;br /&gt;
== Installing the utilities ==&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 VPSs (create, destroy, start, stop, set parameters etc.)&lt;br /&gt;
; vzquota&lt;br /&gt;
:    A utility to manage quotas for VPSs. Mostly used indirectly (by vzctl).&lt;br /&gt;
&lt;br /&gt;
=== Using yum ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install vzctl vzquota&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Using rpm ===&lt;br /&gt;
&lt;br /&gt;
Download the binary RPMs of these utilities from [http://openvz.org/download/utils/ Download » Utils], or directly from [http://download.openvz.org/utils/ download.openvz.org/utils], or from one of its [[Download mirrors|mirrors]]. Install them:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# rpm -Uhv vzctl*.rpm vzquota*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If rpm complains about unresolved dependencies, you'll have to satisfy them first, then repeat the installation.&lt;br /&gt;
&lt;br /&gt;
When all the tools are installed, start the OpenVZ subsystem.&lt;br /&gt;
&lt;br /&gt;
== Starting OpenVZ ==&lt;br /&gt;
&lt;br /&gt;
As root, execute the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# /sbin/service vz start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will load all the needed OpenVZ kernel modules. This script should also start all the VPSs marked to be auto-started on machine boot (there aren't any yet).&lt;br /&gt;
&lt;br /&gt;
During the next reboot, this script should be executed automatically.&lt;br /&gt;
&lt;br /&gt;
== Next steps ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ is now set up on your machine. To load OpenVZ kernel by default, edit the default line in the /boot/grub/grub.conf file to point to the OpenVZ kernel. For example, if the OpenVZ kernel is the first kernel mentioned in the file, put it as default 0. See man grub.conf for more details.&lt;br /&gt;
&lt;br /&gt;
The next step is to prepare the [[OS template]]: please continue to [[OS template cache preparation]] document.&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;/div&gt;</summary>
		<author><name>Btgeekboy</name></author>
		
	</entry>
</feed>