<?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=Dim</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=Dim"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Dim"/>
	<updated>2026-04-11T12:27:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=C%2B%2B_Code_Style_Guide&amp;diff=23375</id>
		<title>C++ Code Style Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=C%2B%2B_Code_Style_Guide&amp;diff=23375"/>
		<updated>2021-01-28T09:45:17Z</updated>

		<summary type="html">&lt;p&gt;Dim: /* Taboos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;We have legacy and new code. fixes of the legacy, which are small patches actually, adhere to the enclosing style.&lt;br /&gt;
For new code, see below.&lt;br /&gt;
&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
# Names should be readable, better to do not use abbreviations&lt;br /&gt;
# [https://en.wikipedia.org/wiki/CamelCase CamelCase] for names. Class, namespace, enum names should start with uppercase (for example, Audit). Other names should start with lowercase (Audit-&amp;gt;getValue())&lt;br /&gt;
# Typedefs should have &amp;quot;_t&amp;quot; or &amp;quot;_type&amp;quot; suffix (myFavoriteType_t)&lt;br /&gt;
# Member value should have &amp;quot;m_&amp;quot; prefix (m_store)&lt;br /&gt;
# Static member variable should have &amp;quot;s_&amp;quot; prefix (s_count)&lt;br /&gt;
# Global object should have &amp;quot;g_&amp;quot; prefix. Global static variable is global still -&amp;gt; &amp;quot;g_&amp;quot; prefix&lt;br /&gt;
# No value type hints in a variable name or return type hints in a function name&lt;br /&gt;
# Local variables names should be short&lt;br /&gt;
# Class and namespaces names should consist of 1 or 2 words (Audit, AuditValue, but not AuditValueForTransition)&lt;br /&gt;
# Function name should start with a verb, because any function implies an action (getValue())&lt;br /&gt;
# Accesser name should start with &amp;quot;get&amp;quot;, mutator name should start with &amp;quot;set&amp;quot; (getValue()/setValue())&lt;br /&gt;
&lt;br /&gt;
== Formatting Conventions ==&lt;br /&gt;
&lt;br /&gt;
# It is highly desirable to follow the restrictions:&lt;br /&gt;
## line length is below 80 symbols,&lt;br /&gt;
## function body (outer) is below 50 lines&lt;br /&gt;
# '{' is on the same line with &amp;quot;if&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot;&lt;br /&gt;
# Single-line nested block - without braces&lt;br /&gt;
# There should be a C++-style comment (&amp;quot;// comment&amp;quot;) at:&lt;br /&gt;
## closing '}' for a namespace should have a comment about the namespace&lt;br /&gt;
## #else, #endif, #elif - a comment about a condition of the very first #ifdef&lt;br /&gt;
# One operation (ended by ';') per line&lt;br /&gt;
# Preferred order of a class labeled sections inside the class declaration:&lt;br /&gt;
## public&lt;br /&gt;
## protected&lt;br /&gt;
## private&lt;br /&gt;
# Preferred order inside a section:&lt;br /&gt;
## typedefs&lt;br /&gt;
## constructors&lt;br /&gt;
## destructor&lt;br /&gt;
## member functions&lt;br /&gt;
## static functions&lt;br /&gt;
## member variables&lt;br /&gt;
## static variables&lt;br /&gt;
# Empty line after every section inside a class declaration&lt;br /&gt;
# No empty line after the last section inside a class declaration&lt;br /&gt;
# No indent inside namespace&lt;br /&gt;
# Header files:&lt;br /&gt;
## No &amp;quot;using namespace ...&amp;quot; inside header files&lt;br /&gt;
## if a header file is a part of public API:&lt;br /&gt;
### use 'extern &amp;quot;C&amp;quot;' construct&lt;br /&gt;
### comments for doxygen MUST be&lt;br /&gt;
&lt;br /&gt;
== Taboos ==&lt;br /&gt;
&lt;br /&gt;
# We do not use RTTI (no dynamic_cast&amp;lt;&amp;gt;)&lt;br /&gt;
# We do not use exceptions&lt;br /&gt;
# We do not use conversion operators (int())&lt;br /&gt;
# We do not use assembler inlines&lt;br /&gt;
# We do not use &amp;quot;friends&amp;quot;&lt;br /&gt;
# We do not use &amp;quot;public&amp;quot; or &amp;quot;protected&amp;quot; member variables&lt;br /&gt;
# We do not use standalone functions (not bound to some class)&lt;br /&gt;
&lt;br /&gt;
== Other Rules ==&lt;br /&gt;
&lt;br /&gt;
# A function, which results only in a success or failure, should use 'boolean' return type. In a case of &amp;quot;success&amp;quot;, it should return &amp;quot;true&amp;quot;.&lt;br /&gt;
# A function, which results in a custom error, should return PRL_RESULT return type.&lt;br /&gt;
## For a successful result, use PRL_ERR_SUCCESS&lt;br /&gt;
## A check of successful result of this value should be performed by PRL_SUCCEEDED() or PRL_FAILED() macros.  &lt;br /&gt;
# It is highly desirable to avoid function definitions with more than 3 arguments. Allowed exceptions - external callbacks, interfaces, legacy functions.&lt;br /&gt;
# Use references to objects rather than pointers, even for smart pointers. &lt;br /&gt;
# Group related classes to a single namespace&lt;br /&gt;
# We do not welcome a polymorphic inheritance&lt;br /&gt;
# If possible, avoid manual memory management (use of &amp;quot;new&amp;quot; and &amp;quot;delete&amp;quot; operators)&lt;br /&gt;
# If possible, avoid low-level thread management API (&amp;quot;pthread_xxx&amp;quot;), better to use boost or QT wrappers over it.&lt;br /&gt;
# Use anonymous namespace for symbols, which should be defined and used only inside a local compilation unit.&lt;br /&gt;
# If possible, avoid use of complex boolean conditions. '==' is better than '!=', '&amp;lt;' is better than '&amp;gt;='&lt;br /&gt;
# We do not welcome a function with a boolean argument, which changes the function's behaviour&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtuozzo_7_Technical_Preview_-_Containers&amp;diff=17148</id>
		<title>Virtuozzo 7 Technical Preview - Containers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtuozzo_7_Technical_Preview_-_Containers&amp;diff=17148"/>
		<updated>2015-07-27T13:59:34Z</updated>

		<summary type="html">&lt;p&gt;Dim: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Virtuozzo]] is a Linux distribution based on opensource OpenVZ components.&lt;br /&gt;
&lt;br /&gt;
This is an early technology preview of Virtuozzo 7. We have made some good progress, but this is just the beginning. Much more still needs to be done. In the preview we replaced the containers engine and made our tools work with the new kernel technologies. We consider this beta a major milestone on the road to the official Virtuozzo 7 release and want to share the progress with the community.&lt;br /&gt;
&lt;br /&gt;
== Key Changes == &lt;br /&gt;
* Virtuozzo 7 is based on RHEL7 and [[Download/kernel/rhel7-testing|Kernel 3.10+]]&lt;br /&gt;
* Containers are using kernel features cgroups and namespaces that limit, account for, and isolate resource usage as isolated namespaces of a collection of processes. The beancounters interface remains in place for backward compatibility. At the same time it acts as a proxy for actual cgroups and namespaces implementation.&lt;br /&gt;
* UUID instead of VEID for container identification. You can use UUID or name to identify a container. By default vzctl will treat the former VEID parameter as name.&lt;br /&gt;
* [[VCMMD|VCMM 4th generation of memory manager]]. We switched to memcg. By balancing and configuring memcg limits we will get the exact overcommit, shadow gangs, swap, page cache overuse Virtuozzo parameters. This will be done by a userspace daemon.&lt;br /&gt;
&lt;br /&gt;
== Not Implemented ==&lt;br /&gt;
* KVM-based virtual machines&lt;br /&gt;
* Instance migration based on the [http://criu.org/Main_Page CRIU project]&lt;br /&gt;
* Migration from OpenVZ and Virtuozzo 6&lt;br /&gt;
&lt;br /&gt;
== Deprecated == &lt;br /&gt;
* VZFS&lt;br /&gt;
* [[UBC|User bean counters]]&lt;br /&gt;
* Delayed /vz mounting&lt;br /&gt;
&lt;br /&gt;
== Known Issues ==&lt;br /&gt;
* Cannot boot Virtuozzo 7 Beta 1 with EFI. (#PSBM-34786)&lt;br /&gt;
* Autopartitioning for standard partitions in the Virtuozzo 7 Beta 1 installer does not work.For details, see [https://bugzilla.redhat.com/show_bug.cgi?id=1172441 RHEL bug #1172441]. (#PSBM-34787)&lt;br /&gt;
* Installation may stop due to a Red Hat Enterprise Linux 7 bug. In this case, restart installation. For details, see [https://bugzilla.redhat.com/show_bug.cgi?id=1167948 RHEL bug #1167948]. (#PSBM-34797)&lt;br /&gt;
* netconsole cannot be used along with bridged containers. (#PSBM-34959)&lt;br /&gt;
* Container console does not work in Openstack&lt;br /&gt;
* Simfs is not working&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
* [http://download.openvz.org/virtuozzo/releases/7.0-beta1/x86_64/iso/ Installation ISO images]&lt;br /&gt;
&lt;br /&gt;
== Feedback ==&lt;br /&gt;
* [[Mailing lists]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Userspace_patches&amp;diff=16839</id>
		<title>Userspace patches</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Userspace_patches&amp;diff=16839"/>
		<updated>2015-06-16T13:21:42Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Virtuozzo}}&lt;br /&gt;
&lt;br /&gt;
We are waiting for contributions to userspace utilities from OpenVZ community.&lt;br /&gt;
&lt;br /&gt;
This document describes how to contribute your patches to the OpenVZ userspace.&lt;br /&gt;
&lt;br /&gt;
== Source code ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ source code is available from GIT repository at&lt;br /&gt;
&lt;br /&gt;
 https://src.openvz.org/projects/OVZ&lt;br /&gt;
&lt;br /&gt;
To clone, use&lt;br /&gt;
 &lt;br /&gt;
 git clone https://src.openvz.org/scm/ovz/&amp;lt;project&amp;gt;.git&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 git clone https://src.openvz.org/scm/ovz/prlctl.git&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preparing patches ==&lt;br /&gt;
&lt;br /&gt;
For new code please follow:&lt;br /&gt;
* C++ language - [[C++ Code Style Guide]]&lt;br /&gt;
* C language - [https://www.kernel.org/doc/Documentation/CodingStyle Linux kernel code style]&lt;br /&gt;
* Python language - [https://www.python.org/dev/peps/pep-0008/ Python code style]&lt;br /&gt;
&lt;br /&gt;
For existing code patches, please follow a style which is used for code around.    &lt;br /&gt;
&lt;br /&gt;
== Send pull request ==&lt;br /&gt;
&lt;br /&gt;
For contributions, please register at [https://src.openvz.org our Stash site] and follow [https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow &amp;quot;forking&amp;quot; workflow].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Contribute]]&lt;br /&gt;
* [[C++ Code Style Guide]]&lt;br /&gt;
* [[Static code analysis]]&lt;br /&gt;
* [[Wishlist]]&lt;br /&gt;
* [[QA|OpenVZ Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Contributions]]&lt;br /&gt;
[[Category:Virtuozzo]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Userspace_patches&amp;diff=16838</id>
		<title>Userspace patches</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Userspace_patches&amp;diff=16838"/>
		<updated>2015-06-16T13:21:13Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Virtuozzo}}&lt;br /&gt;
{{Stub}}&lt;br /&gt;
&lt;br /&gt;
We are waiting for contributions to userspace utilities from OpenVZ community.&lt;br /&gt;
&lt;br /&gt;
This document describes how to contribute your patches to the OpenVZ userspace.&lt;br /&gt;
&lt;br /&gt;
== Source code ==&lt;br /&gt;
&lt;br /&gt;
OpenVZ source code is available from GIT repository at&lt;br /&gt;
&lt;br /&gt;
 https://src.openvz.org/projects/OVZ&lt;br /&gt;
&lt;br /&gt;
To clone, use&lt;br /&gt;
 &lt;br /&gt;
 git clone https://src.openvz.org/scm/ovz/&amp;lt;project&amp;gt;.git&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 git clone https://src.openvz.org/scm/ovz/prlctl.git&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Preparing patches ==&lt;br /&gt;
&lt;br /&gt;
For new code please follow:&lt;br /&gt;
* C++ language - [[C++ Code Style Guide]]&lt;br /&gt;
* C language - [https://www.kernel.org/doc/Documentation/CodingStyle Linux kernel code style]&lt;br /&gt;
* Python language - [https://www.python.org/dev/peps/pep-0008/ Python code style]&lt;br /&gt;
&lt;br /&gt;
For existing code patches, please follow a style which is used for code around.    &lt;br /&gt;
&lt;br /&gt;
== Send pull request ==&lt;br /&gt;
&lt;br /&gt;
For contributions, please register at [https://src.openvz.org our Stash site] and follow [https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow &amp;quot;forking&amp;quot; workflow].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Contribute]]&lt;br /&gt;
* [[C++ Code Style Guide]]&lt;br /&gt;
* [[Static code analysis]]&lt;br /&gt;
* [[Wishlist]]&lt;br /&gt;
* [[QA|OpenVZ Testing]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Contributions]]&lt;br /&gt;
[[Category:Virtuozzo]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=C%2B%2B_Code_Style_Guide&amp;diff=16837</id>
		<title>C++ Code Style Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=C%2B%2B_Code_Style_Guide&amp;diff=16837"/>
		<updated>2015-06-16T09:29:39Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
# Names should be readable, better to do not use abbreviations&lt;br /&gt;
# [https://en.wikipedia.org/wiki/CamelCase CamelCase] for names. Class, namespace, enum names should start with uppercase (for example, Audit). Other names should start with lowercase (Audit-&amp;gt;getValue())&lt;br /&gt;
# Typedefs should have &amp;quot;_t&amp;quot; or &amp;quot;_type&amp;quot; suffix (myFavoriteType_t)&lt;br /&gt;
# Member value should have &amp;quot;m_&amp;quot; prefix (m_store)&lt;br /&gt;
# Static member variable should have &amp;quot;s_&amp;quot; prefix (s_count)&lt;br /&gt;
# Global object should have &amp;quot;g_&amp;quot; prefix. Global static variable is global still -&amp;gt; &amp;quot;g_&amp;quot; prefix&lt;br /&gt;
# No value type hints in a variable name or return type hints in a function name&lt;br /&gt;
# Local variables names should be short&lt;br /&gt;
# Class and namespaces names should consist of 1 or 2 words (Audit, AuditValue, but not AuditValueForTransition)&lt;br /&gt;
# Function name should start with a verb, because any function implies an action (getValue())&lt;br /&gt;
# Accesser name should start with &amp;quot;get&amp;quot;, mutator name should start with &amp;quot;set&amp;quot; (getValue()/setValue())&lt;br /&gt;
&lt;br /&gt;
== Formatting Conventions ==&lt;br /&gt;
&lt;br /&gt;
# It is highly desirable to follow the restrictions:&lt;br /&gt;
## line length is below 80 symbols,&lt;br /&gt;
## function body (outer) is below 50 lines&lt;br /&gt;
# '{' is on the same line with &amp;quot;if&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot;&lt;br /&gt;
# Single-line nested block - without braces&lt;br /&gt;
# There should be a C++-style comment (&amp;quot;// comment&amp;quot;) at:&lt;br /&gt;
## closing '}' for a namespace should have a comment about the namespace&lt;br /&gt;
## #else, #endif, #elif - a comment about a condition of the very first #ifdef&lt;br /&gt;
# One operation (ended by ';') per line&lt;br /&gt;
# Preferred order of a class labeled sections inside the class declaration:&lt;br /&gt;
## public&lt;br /&gt;
## protected&lt;br /&gt;
## private&lt;br /&gt;
# Preferred order inside a section:&lt;br /&gt;
## typedefs&lt;br /&gt;
## constructors&lt;br /&gt;
## destructor&lt;br /&gt;
## member functions&lt;br /&gt;
## static functions&lt;br /&gt;
## member variables&lt;br /&gt;
## static variables&lt;br /&gt;
# Empty line after every section inside a class declaration&lt;br /&gt;
# No empty line after the last section inside a class declaration&lt;br /&gt;
# No indent inside namespace&lt;br /&gt;
# Header files:&lt;br /&gt;
## No &amp;quot;using namespace ...&amp;quot; inside header files&lt;br /&gt;
## if a header file is a part of public API:&lt;br /&gt;
### use 'extern &amp;quot;C&amp;quot;' construct&lt;br /&gt;
### comments for doxygen MUST be&lt;br /&gt;
&lt;br /&gt;
== Taboos ==&lt;br /&gt;
&lt;br /&gt;
# We do not use RTTI (no dynamic_cast&amp;lt;&amp;gt;)&lt;br /&gt;
# We do not use exceptions&lt;br /&gt;
# We do not use syntax allowed by C++11 standard&lt;br /&gt;
# We do not use conversion operators (int())&lt;br /&gt;
# We do not use assembler inlines&lt;br /&gt;
# We do not use &amp;quot;friends&amp;quot;&lt;br /&gt;
# We do not use &amp;quot;public&amp;quot; or &amp;quot;protected&amp;quot; member variables&lt;br /&gt;
# We do not use standalone functions (not bound to some class)&lt;br /&gt;
&lt;br /&gt;
== Other Rules ==&lt;br /&gt;
&lt;br /&gt;
# A function, which results only in a success or failure, should use 'boolean' return type. In a case of &amp;quot;success&amp;quot;, it should return &amp;quot;true&amp;quot;.&lt;br /&gt;
# A function, which results in a custom error, should return PRL_RESULT return type.&lt;br /&gt;
## For a successful result, use PRL_ERR_SUCCESS&lt;br /&gt;
## A check of successful result of this value should be performed by PRL_SUCCEEDED() or PRL_FAILED() macros.  &lt;br /&gt;
# It is highly desirable to avoid function definitions with more than 3 arguments. Allowed exceptions - external callbacks, interfaces, legacy functions.&lt;br /&gt;
# Use references to objects rather than pointers, even for smart pointers. &lt;br /&gt;
# Group related classes to a single namespace&lt;br /&gt;
# We do not welcome a polymorphic inheritance&lt;br /&gt;
# If possible, avoid manual memory management (use of &amp;quot;new&amp;quot; and &amp;quot;delete&amp;quot; operators)&lt;br /&gt;
# If possible, avoid low-level thread management API (&amp;quot;pthread_xxx&amp;quot;), better to use boost or QT wrappers over it.&lt;br /&gt;
# Use anonymous namespace for symbols, which should be defined and used only inside a local compilation unit.&lt;br /&gt;
# If possible, avoid use of complex boolean conditions. '==' is better than '!=', '&amp;lt;' is better than '&amp;gt;='&lt;br /&gt;
# We do not welcome a function with a boolean argument, which changes the function's behaviour&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=C%2B%2B_Code_Style_Guide&amp;diff=16836</id>
		<title>C++ Code Style Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=C%2B%2B_Code_Style_Guide&amp;diff=16836"/>
		<updated>2015-06-16T09:26:04Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
# Names should be readable, better to do not use abbreviations&lt;br /&gt;
# [https://en.wikipedia.org/wiki/CamelCase CamelCase] for names. Class, namespace, enum names should start with uppercase (for example, Audit). Other names should start with lowercase (Audit-&amp;gt;getValue())&lt;br /&gt;
# Typedefs should have &amp;quot;_t&amp;quot; or &amp;quot;_type&amp;quot; suffix (myFavoriteType_t)&lt;br /&gt;
# Member value should have &amp;quot;m_&amp;quot; prefix (m_store)&lt;br /&gt;
# Static member variable should have &amp;quot;s_&amp;quot; prefix (s_count)&lt;br /&gt;
# Global object should have &amp;quot;g_&amp;quot; prefix. Global static variable is global still -&amp;gt; &amp;quot;g_&amp;quot; prefix&lt;br /&gt;
# No value type hints in a variable name or return type hints in a function name&lt;br /&gt;
# Local variables names should be short&lt;br /&gt;
# Class and namespaces names should consist of 1 or 2 words (Audit, AuditValue, but not AuditValueForTransition)&lt;br /&gt;
# Function name should start with a verb, because any function implies an action (getValue())&lt;br /&gt;
# Accesser name should start with &amp;quot;get&amp;quot;, mutator name should start with &amp;quot;set&amp;quot; (getValue()/setValue())&lt;br /&gt;
&lt;br /&gt;
== Formatting Conventions ==&lt;br /&gt;
&lt;br /&gt;
# It is highly desirable to follow the restrictions:&lt;br /&gt;
## line length is below 80 symbols,&lt;br /&gt;
## function body (outer) is below 50 lines&lt;br /&gt;
# '{' is on the same line with &amp;quot;if&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot;&lt;br /&gt;
# Single-line nested block - without braces&lt;br /&gt;
# There should be a C++-style comment (&amp;quot;// comment&amp;quot;) at:&lt;br /&gt;
## closing '}' for a namespace should have a comment about the namespace&lt;br /&gt;
## #else, #endif, #elif - a comment about a condition of the very first #ifdef&lt;br /&gt;
# One operation (ended by ';') per line&lt;br /&gt;
# Preferred order of a class labeled sections inside the class declaration:&lt;br /&gt;
## public&lt;br /&gt;
## protected&lt;br /&gt;
## private&lt;br /&gt;
# Preferred order inside a section:&lt;br /&gt;
## typedefs&lt;br /&gt;
## constructors&lt;br /&gt;
## destructor&lt;br /&gt;
## member functions&lt;br /&gt;
## static functions&lt;br /&gt;
## member variables&lt;br /&gt;
## static variables&lt;br /&gt;
# Empty line after every section inside a class declaration&lt;br /&gt;
# No empty line after the last section inside a class declaration&lt;br /&gt;
# No indent inside namespace&lt;br /&gt;
# Header files:&lt;br /&gt;
## No &amp;quot;using namespace ...&amp;quot; inside header files&lt;br /&gt;
## if a header file is a part of public API:&lt;br /&gt;
### use 'extern &amp;quot;C&amp;quot;' construct&lt;br /&gt;
### comments for doxygen MUST be&lt;br /&gt;
&lt;br /&gt;
== Taboos ==&lt;br /&gt;
&lt;br /&gt;
# We do not use RTTI (no dynamic_cast&amp;lt;&amp;gt;)&lt;br /&gt;
# We do not use exceptions&lt;br /&gt;
# We do not use syntax allowed by C++11 standard&lt;br /&gt;
# We do not use conversion operators (int())&lt;br /&gt;
# We do not use polymorphic inheritance&lt;br /&gt;
# We do not use assembler inlines&lt;br /&gt;
# We do not use &amp;quot;friends&amp;quot;&lt;br /&gt;
# We do not use &amp;quot;public&amp;quot; or &amp;quot;protected&amp;quot; member variables&lt;br /&gt;
# We do not use standalone functions (not bound to some class)&lt;br /&gt;
&lt;br /&gt;
== Other Rules ==&lt;br /&gt;
&lt;br /&gt;
# A function, which results only in a success or failure, should use 'boolean' return type. In a case of &amp;quot;success&amp;quot;, it should return &amp;quot;true&amp;quot;.&lt;br /&gt;
# A function, which results in a custom error, should return PRL_RESULT return type.&lt;br /&gt;
## For a successful result, use PRL_ERR_SUCCESS&lt;br /&gt;
## A check of successful result of this value should be performed by PRL_SUCCEEDED() or PRL_FAILED() macros.  &lt;br /&gt;
# It is highly desirable to avoid function definitions with more than 3 arguments. Allowed exceptions - external callbacks, interfaces, legacy functions.&lt;br /&gt;
# Use references to objects rather than pointers, even for smart pointers. &lt;br /&gt;
# Group related classes to a single namespace&lt;br /&gt;
# If possible, avoid manual memory management (use of &amp;quot;new&amp;quot; and &amp;quot;delete&amp;quot; operators)&lt;br /&gt;
# If possible, avoid low-level thread management API (&amp;quot;pthread_xxx&amp;quot;), better to use boost or QT wrappers over it.&lt;br /&gt;
# Use anonymous namespace for symbols, which should be defined and used only inside a local compilation unit.&lt;br /&gt;
# If possible, avoid use of complex boolean conditions. '==' is better than '!=', '&amp;lt;' is better than '&amp;gt;='&lt;br /&gt;
# We do not welcome a function with a boolean argument, which changes the function's behaviour&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=C%2B%2B_Code_Style_Guide&amp;diff=16828</id>
		<title>C++ Code Style Guide</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=C%2B%2B_Code_Style_Guide&amp;diff=16828"/>
		<updated>2015-06-15T18:10:32Z</updated>

		<summary type="html">&lt;p&gt;Dim: Created page with &amp;quot; == Naming Conventions ==  # Names should be readable, better to do not use abbreviations # &amp;quot;Camel&amp;quot; case for names (for example, AuditValue) # Class, namespace, enum names sho...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Naming Conventions ==&lt;br /&gt;
&lt;br /&gt;
# Names should be readable, better to do not use abbreviations&lt;br /&gt;
# &amp;quot;Camel&amp;quot; case for names (for example, AuditValue)&lt;br /&gt;
# Class, namespace, enum names should start with uppercase (for example, Audit). Other names should start with lowercase (Audit-&amp;gt;getValue())&lt;br /&gt;
# Typedefs should have &amp;quot;_t&amp;quot; or &amp;quot;_type&amp;quot; suffix (myFavoriteType_t)&lt;br /&gt;
# Member value should have &amp;quot;m_&amp;quot; prefix (m_store)&lt;br /&gt;
# Static member variable should have &amp;quot;s_&amp;quot; prefix (s_count)&lt;br /&gt;
# Global object should have &amp;quot;g_&amp;quot; prefix. Global static variable is global still -&amp;gt; &amp;quot;g_&amp;quot; prefix&lt;br /&gt;
# No value type hints in a variable name or return type hints in a function name&lt;br /&gt;
# Local variables names should be short&lt;br /&gt;
# Class and namespaces names should consist of 1 or 2 words (Audit, AuditValue, but not AuditValueForTransition)&lt;br /&gt;
# Function name should start with a verb, because any function implies an action (getValue())&lt;br /&gt;
# Accesser name should start with &amp;quot;get&amp;quot;, mutator name should start with &amp;quot;set&amp;quot; (getValue()/setValue())&lt;br /&gt;
&lt;br /&gt;
== Formatting Conventions ==&lt;br /&gt;
&lt;br /&gt;
# It is highly desirable to follow the restrictions:&lt;br /&gt;
## line length is below 80 symbols,&lt;br /&gt;
## function body (outer) is below 50 lines&lt;br /&gt;
# '{' is on the same line with &amp;quot;if&amp;quot;, &amp;quot;for&amp;quot;, &amp;quot;while&amp;quot;&lt;br /&gt;
# Single-line nested block - without braces&lt;br /&gt;
# There should be a C++-style comment (&amp;quot;// comment&amp;quot;) at:&lt;br /&gt;
## closing '}' for a namespace should have a comment about the namespace&lt;br /&gt;
## #else, #endif, #elif - a comment about a condition of the very first #ifdef&lt;br /&gt;
# One operation (ended by ';') per line&lt;br /&gt;
# Preferred order of a class labeled sections inside the class declaration:&lt;br /&gt;
## public&lt;br /&gt;
## protected&lt;br /&gt;
## private&lt;br /&gt;
# Preferred order inside a section:&lt;br /&gt;
## typedefs&lt;br /&gt;
## constructors&lt;br /&gt;
## destructor&lt;br /&gt;
## member functions&lt;br /&gt;
## static functions&lt;br /&gt;
## member variables&lt;br /&gt;
## static variables&lt;br /&gt;
# Empty line after every section inside a class declaration&lt;br /&gt;
# No empty line after the last section inside a class declaration&lt;br /&gt;
# No indent inside namespace&lt;br /&gt;
# Header files:&lt;br /&gt;
## No &amp;quot;using namespace ...&amp;quot; inside header files&lt;br /&gt;
## if a header file is a part of public API:&lt;br /&gt;
### use 'extern &amp;quot;C&amp;quot;' construct&lt;br /&gt;
### comments for doxygen MUST be&lt;br /&gt;
&lt;br /&gt;
== Taboos ==&lt;br /&gt;
&lt;br /&gt;
# We do not use RTTI (no dynamic_cast&amp;lt;&amp;gt;)&lt;br /&gt;
# We do not use exceptions&lt;br /&gt;
# We do not use syntax allowed by C++11 standard&lt;br /&gt;
# We do not use conversion operators (int())&lt;br /&gt;
# We do not use polymorphic inheritance&lt;br /&gt;
# We do not use assembler inlines&lt;br /&gt;
# We do not use &amp;quot;friends&amp;quot;&lt;br /&gt;
# We do not use &amp;quot;public&amp;quot; or &amp;quot;protected&amp;quot; member variables&lt;br /&gt;
# We do not use standalone functions (not bound to some class)&lt;br /&gt;
&lt;br /&gt;
== Other Rules ==&lt;br /&gt;
&lt;br /&gt;
# A function, which results only in a success or failure, should use 'boolean' return type. In a case of &amp;quot;success&amp;quot;, it should return &amp;quot;true&amp;quot;.&lt;br /&gt;
# A function, which results in a custom error, should return PRL_RESULT return type.&lt;br /&gt;
## For a successful result, use PRL_ERR_SUCCESS&lt;br /&gt;
## A check of successful result of this value should be performed by PRL_SUCCEEDED() or PRL_FAILED() macros.  &lt;br /&gt;
# It is highly desirable to avoid function definitions with more than 3 arguments. Allowed exceptions - external callbacks, interfaces, legacy functions.&lt;br /&gt;
# Use references to objects rather than pointers, even for smart pointers. &lt;br /&gt;
# Group related classes to a single namespace&lt;br /&gt;
# If possible, avoid manual memory management (use of &amp;quot;new&amp;quot; and &amp;quot;delete&amp;quot; operators)&lt;br /&gt;
# If possible, avoid low-level thread management API (&amp;quot;pthread_xxx&amp;quot;), better to use boost or QT wrappers over it.&lt;br /&gt;
# Use anonymous namespace for symbols, which should be defined and used only inside a local compilation unit.&lt;br /&gt;
# If possible, avoid use of complex boolean conditions. '==' is better than '!=', '&amp;lt;' is better than '&amp;gt;='&lt;br /&gt;
# We do not welcome a function with a boolean argument, which changes the function's behaviour&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Userspace_patches&amp;diff=16656</id>
		<title>Userspace patches</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Userspace_patches&amp;diff=16656"/>
		<updated>2015-06-03T17:46:08Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
We are waiting for contributions to userspace utilities from OpenVZ community.&lt;br /&gt;
&lt;br /&gt;
For contributions, please register at [https://src.openvz.org our Stash site] and follow [https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow &amp;quot;forking&amp;quot; workflow].&lt;br /&gt;
&lt;br /&gt;
[[Category: Contributions]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2487</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2487"/>
		<updated>2006-11-10T10:51:50Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approaches to the network virtualization, caused by different requirements for different usages. This page is made in order to summarize them and create solution suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
=== Virtualization on the 2nd level (OpenVZ) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
&lt;br /&gt;
The main requirement is that containers should have close to standalone servers networking capabilities. In details:&lt;br /&gt;
# containers should have own loopback;&lt;br /&gt;
# containers should have ability to setup their own level 3 addresses;&lt;br /&gt;
# containers should have ability to sniff their traffic;&lt;br /&gt;
# containers should have ability to setup their own routes;&lt;br /&gt;
# containers should have ability to receive multicast/broadcast packets;&lt;br /&gt;
# containers should have their own netfilters;&lt;br /&gt;
# containers should have at least one level 2 device; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
For input packets context switching is performed in netif_receive_skb(), inherited from the device  context. For output, context is inherited from the socket one.&lt;br /&gt;
&lt;br /&gt;
=== Virtualization on the 3d level (IBM) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
# One can ran servers in several containers listening on *:port without conflict and __without__ forcing the bind to use the IP address assigned to the container;&lt;br /&gt;
# The source address will be filled with the container IP address;&lt;br /&gt;
# Keep sockets isolated by namespace;&lt;br /&gt;
# have the loopback isolated;&lt;br /&gt;
# have the performance near to native as possible;&lt;br /&gt;
# have broadcast and multicast working.&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
For input packets context switching is inherited from the routing entry, for output - inherited from the socket one. &lt;br /&gt;
&lt;br /&gt;
=== Sockets isolation (Linux-VServer) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
# all interfaces and IPs are visible on the host&lt;br /&gt;
# routing and iptables is configured on the host&lt;br /&gt;
# guest has a subset of IPs assigned for 'binding'&lt;br /&gt;
# source ip (of guest packets) is within the assigned set&lt;br /&gt;
# 'local' guest traffic is isolated from other guests&lt;br /&gt;
# no measurable overhead on packet routing&lt;br /&gt;
# normal routing not impaired (same behaviour as without)&lt;br /&gt;
# Guest-Guest and Guest-Host traffic via Loopback&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
Network Context with 'assigned' set of IPs, which are used for 'collision' checks at bind&lt;br /&gt;
time, 'source' checks at send time and 'destination' checks at receive time. The first&lt;br /&gt;
assigned IPs is handled special as it is used for routing decisions outside the IP set.&lt;br /&gt;
Loopback traffic isolation is done via IP 'remapping'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;10%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;10%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;10%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;10%&amp;quot; | loopback&lt;br /&gt;
! Width=&amp;quot;10%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| sockets isolation || - || - || i || - || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - neither virtualized nor isolated&lt;br /&gt;
&lt;br /&gt;
[[Category:Containers]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2486</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2486"/>
		<updated>2006-11-10T10:51:15Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approaches to the network virtualization, caused by different requirements for different usages. This page is made in order to summarize them and create solution suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
=== Virtualization on the 2nd level (OpenVZ) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
&lt;br /&gt;
The main requirement is that containers should have close to standalone servers networking capabilities. In details:&lt;br /&gt;
# containers should have own loopback;&lt;br /&gt;
# containers should have ability to setup their own level 3 addresses;&lt;br /&gt;
# containers should have ability to sniff their traffic;&lt;br /&gt;
# containers should have ability to setup their own routes;&lt;br /&gt;
# containers should have ability to receive multicast/broadcast packets;&lt;br /&gt;
# containers should have their own netfilters;&lt;br /&gt;
# containers should have at least one level 2 device; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
For input packets context switching is performed in netif_receive_skb(), inherited from the device  context. For output, context is inherited from the socket one.&lt;br /&gt;
&lt;br /&gt;
=== Virtualization on the 3d level (IBM) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
# One can ran servers in several containers listening on *:port without conflict and __without__ forcing the bind to use the IP address assigned to the container;&lt;br /&gt;
# The source address will be filled with the container IP address;&lt;br /&gt;
# Keep sockets isolated by namespace;&lt;br /&gt;
# have the loopback isolated;&lt;br /&gt;
# have the performance near to native as possible;&lt;br /&gt;
# have broadcast and multicast working.&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
For input packets context switching is inherited from the routing entry, for output - inherited from the socket one. &lt;br /&gt;
&lt;br /&gt;
=== Socket isolation (Linux-VServer) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
# all interfaces and IPs are visible on the host&lt;br /&gt;
# routing and iptables is configured on the host&lt;br /&gt;
# guest has a subset of IPs assigned for 'binding'&lt;br /&gt;
# source ip (of guest packets) is within the assigned set&lt;br /&gt;
# 'local' guest traffic is isolated from other guests&lt;br /&gt;
# no measurable overhead on packet routing&lt;br /&gt;
# normal routing not impaired (same behaviour as without)&lt;br /&gt;
# Guest-Guest and Guest-Host traffic via Loopback&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
Network Context with 'assigned' set of IPs, which are used for 'collision' checks at bind&lt;br /&gt;
time, 'source' checks at send time and 'destination' checks at receive time. The first&lt;br /&gt;
assigned IPs is handled special as it is used for routing decisions outside the IP set.&lt;br /&gt;
Loopback traffic isolation is done via IP 'remapping'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;10%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;10%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;10%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;10%&amp;quot; | loopback&lt;br /&gt;
! Width=&amp;quot;10%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| sockets isolation || - || - || i || - || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - neither virtualized nor isolated&lt;br /&gt;
&lt;br /&gt;
[[Category:Containers]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2476</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2476"/>
		<updated>2006-11-08T11:28:37Z</updated>

		<summary type="html">&lt;p&gt;Dim: /* Approaches */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approaches to the network virtualization, caused by different requirements for different usages. This page is made in order to summarize them and create solution suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
=== Virtualization on the 2nd level (OpenVZ) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
&lt;br /&gt;
The main requirement is that containers should have close to standalone servers networking capabilities. In details:&lt;br /&gt;
# containers should have own loopback;&lt;br /&gt;
# containers should have ability to setup their own level 3 addresses;&lt;br /&gt;
# containers should have ability to sniff their traffic;&lt;br /&gt;
# containers should have ability to setup their own routes;&lt;br /&gt;
# containers should have ability to receive multicast/broadcast packets;&lt;br /&gt;
# containers should have their own netfilters;&lt;br /&gt;
# containers should have at least one level 2 device; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
For input packets context switching is performed in netif_receive_skb(), inherited from the device  context. For output, context is inherited from the socket one.&lt;br /&gt;
&lt;br /&gt;
=== Virtualization on the 3d level (IBM) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
# One can ran servers in several containers listening on *:port without conflict and __without__ forcing the bind to use the IP address assigned to the container;&lt;br /&gt;
# The source address will be filled with the container IP address;&lt;br /&gt;
# Keep sockets isolated by namespace;&lt;br /&gt;
# have the loopback isolated;&lt;br /&gt;
# have the performance near to native as possible;&lt;br /&gt;
# have broadcast and multicast working.&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
For input packets context switching is inherited from the routing entry, for output - inherited from the socket one. &lt;br /&gt;
&lt;br /&gt;
=== Socket virtualization (Linux-VServer) ===&lt;br /&gt;
'''Requirements''':&lt;br /&gt;
# implementation overhead for established tcp connections should be zero;&lt;br /&gt;
# FIXME&lt;br /&gt;
&lt;br /&gt;
'''Current implementation''':&lt;br /&gt;
&lt;br /&gt;
There is no context switching for packets at all, checks are performed between process and socket contexts.&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;13%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| bind filtering || - || - || i || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - neither virtualized nor isolated&lt;br /&gt;
&lt;br /&gt;
[[Category:Containers]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=ToDo&amp;diff=2474</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=ToDo&amp;diff=2474"/>
		<updated>2006-11-07T15:57:29Z</updated>

		<summary type="html">&lt;p&gt;Dim: /* Kernel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Kernel==&lt;br /&gt;
&lt;br /&gt;
* NFS issues&lt;br /&gt;
* Loopback device (/dev/lo*) support&lt;br /&gt;
* vzquota over other than ext2/ext3 filesystems&lt;br /&gt;
* Incorporate Zaptel/Asterisk modules [http://forum.openvz.org/index.php?t=msg&amp;amp;th=170&amp;amp;start=0&amp;amp; forum]?&lt;br /&gt;
* patch profiling to support VE's differentiation. [http://forum.openvz.org/index.php?t=tree&amp;amp;th=1455&amp;amp;mid=8098&amp;amp;&amp;amp;rev=&amp;amp;reveal=]&lt;br /&gt;
&lt;br /&gt;
==Templates==&lt;br /&gt;
&lt;br /&gt;
* template metadata creation HOWTO&lt;br /&gt;
* template metadata rpms build system, like we have for tools&lt;br /&gt;
* tool for auto creation rpm/deb packages from precreated templates tarballs for easy installation with yum/apt help&lt;br /&gt;
* page for precreated templates submission to contribs&lt;br /&gt;
* page with list of all available templates, like http://www.vmware.com/vmtn/appliances/&lt;br /&gt;
* templates metadata should include some high-level package manager (yum for FC5, what else?)&lt;br /&gt;
* add 'extras' repo to FC5 template metadata&lt;br /&gt;
&lt;br /&gt;
==VE package management==&lt;br /&gt;
&lt;br /&gt;
* x86_64, ia64, ppc64 external package management (vzrpm, vzpkgenv?)&lt;br /&gt;
* support for application templates&lt;br /&gt;
* apt-based external package management&lt;br /&gt;
* adoption for common build system&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
vzctl:&lt;br /&gt;
* add IPv6 configuration support&lt;br /&gt;
* Debian-specific initscript&lt;br /&gt;
* complete redesign&lt;br /&gt;
* [http://bugzilla.openvz.org/buglist.cgi?query_format=advanced&amp;amp;short_desc_type=allwordssubstr&amp;amp;short_desc=&amp;amp;product=OpenVZ&amp;amp;component=vzctl&amp;amp;long_desc_type=substring&amp;amp;long_desc=&amp;amp;bug_file_loc_type=allwordssubstr&amp;amp;bug_file_loc=&amp;amp;bug_status=NEW&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=REOPENED&amp;amp;emailassigned_to1=1&amp;amp;emailtype1=substring&amp;amp;email1=&amp;amp;emailassigned_to2=1&amp;amp;emailreporter2=1&amp;amp;emailcc2=1&amp;amp;emailtype2=substring&amp;amp;email2=&amp;amp;bugidtype=include&amp;amp;bug_id=&amp;amp;votes=&amp;amp;chfieldfrom=&amp;amp;chfieldto=Now&amp;amp;chfieldvalue=&amp;amp;cmdtype=doit&amp;amp;order=Reuse+same+sort+as+last+time&amp;amp;field0-0-0=noop&amp;amp;type0-0-0=noop&amp;amp;value0-0-0= List of opened vzctl bugs in Bugzilla]&lt;br /&gt;
&lt;br /&gt;
==Testing suite==&lt;br /&gt;
* should include base vzctl operation, published, easy to install and run on the node.&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2470</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2470"/>
		<updated>2006-11-02T12:36:26Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approaches to the network virtualization, caused by different requirements for different usages. This page is made in order to summarize them and create solution suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
* '''virtualization on the 2nd level (OpenVZ)''';&lt;br /&gt;
: For input packets context switching is performed in device xmit code, requires virtual device for performing. For output, context is inherited from socket one.&lt;br /&gt;
* '''virtualization on the 3d level (IBM)''';&lt;br /&gt;
: For input packets context switching is performed in routing code, for output - inherited from socket one.&lt;br /&gt;
* '''socket virtualization (Linux-VServer)'''.&lt;br /&gt;
: There is no context switching for packets at all, checks are performed between process and socket contexts.&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;13%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| bind filtering || - || - || i || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - neither virtualized nor isolated&lt;br /&gt;
&lt;br /&gt;
[[Category:Containers]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2469</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2469"/>
		<updated>2006-11-01T17:17:17Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approaches to the network virtualization, caused by different requirements for different usages. This page is made in order to summarize them and create solution suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
* '''virtualization on the 2nd level (OpenVZ)''';&lt;br /&gt;
: For input packets context switching is performed in device xmit code, requires virtual device for performing. For output, context is inherited from socket one.&lt;br /&gt;
* '''virtualization on the 3d level (IBM)''';&lt;br /&gt;
: For input packets context switching is performed in routing code, for output - inherited from socket one.&lt;br /&gt;
* '''socket virtualization (Linux-VServer)'''.&lt;br /&gt;
: There is no context switching for packets at all, checks are performed between process and socket contexts.&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;13%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| bind filtering || - || - || i || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - neither virtualized nor isolated&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers&amp;diff=2452</id>
		<title>Containers</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers&amp;diff=2452"/>
		<updated>2006-11-01T16:31:07Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Topics ==&lt;br /&gt;
* [[Containers/Networking]]&lt;br /&gt;
* [[Containers/Network_virtualization]]&lt;br /&gt;
* [[Containers/Pidcache]]&lt;br /&gt;
* [[Containers/Pidspace]]&lt;br /&gt;
* [[Containers/UBC discussion]]&lt;br /&gt;
* [[Containers/Guarantees for resources]]&lt;br /&gt;
&lt;br /&gt;
== Patches ==&lt;br /&gt;
Cedric Le Goater ([[User:Legoater]]) maintains mainstream kernels with the patches from [http://lists.osdl.org/mailman/listinfo/containers containers@ mailing list]:&lt;br /&gt;
* http://www.sr71.net/patches/2.6.18/2.6.18-rc7-mm1-lxc1/&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://lists.osdl.org/mailman/listinfo/containers &amp;quot;Containers&amp;quot; mailing list]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2450</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2450"/>
		<updated>2006-11-01T16:30:12Z</updated>

		<summary type="html">&lt;p&gt;Dim: Network virtualization moved to Containers/Network virtualization: right place&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approached to the network virtualization, caused different requirements for different usages. This page is made in order to summarize them and create solution, suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
* '''virtualization on the 2nd level (OpenVZ)''';&lt;br /&gt;
: For input packets context switching is performed in device xmit code, requires virtual device for performing. For output, context is inherited from socket one.&lt;br /&gt;
* '''virtualization on the 3d level (IBM)''';&lt;br /&gt;
: For input packets context switching is performed in routing code, for output - inherited from socket one.&lt;br /&gt;
* '''socket virtualization (Linux-VServer)'''.&lt;br /&gt;
: There is no context switching for packets at all, checks are performed between process and socket contexts.&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;13%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| bind filtering || - || - || i || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - nor virtualized, nor isolated&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Network_virtualization&amp;diff=2451</id>
		<title>Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Network_virtualization&amp;diff=2451"/>
		<updated>2006-11-01T16:30:12Z</updated>

		<summary type="html">&lt;p&gt;Dim: Network virtualization moved to Containers/Network virtualization: right place&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Containers/Network virtualization]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2448</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2448"/>
		<updated>2006-11-01T15:37:53Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approached to the network virtualization, caused different requirements for different usages. This page is made in order to summarize them and create solution, suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
* '''virtualization on the 2nd level (OpenVZ)''';&lt;br /&gt;
: For input packets context switching is performed in device xmit code, requires virtual device for performing. For output, context is inherited from socket one.&lt;br /&gt;
* '''virtualization on the 3d level (IBM)''';&lt;br /&gt;
: For input packets context switching is performed in routing code, for output - inherited from socket one.&lt;br /&gt;
* '''socket virtualization (Linux-VServer)'''.&lt;br /&gt;
: There is no context switching for packets at all, checks are performed between process and socket contexts.&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;13%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| bind filtering || - || - || i || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - nor virtualized, nor isolated&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2447</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2447"/>
		<updated>2006-11-01T15:34:53Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approached to the network virtualization, caused different requirements for different usages. This page is made in order to summarize them and create solution, suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
* virtualization on the 2nd level (OpenVZ);&lt;br /&gt;
: For input packets context switching is performed in device xmit code, requires virtual device for performing. For output, context is inherited from socket one.&lt;br /&gt;
* virtualization on the 3d level (IBM);&lt;br /&gt;
: For input packets context switching is performed in routing code, for output - inherited from socket one.&lt;br /&gt;
* socket virtualization (Linux-VServer).&lt;br /&gt;
: There is no context switching for packets at all, checks are performed between process and socket contexts.&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;13%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| bind filtering || - || - || i || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - nor virtualized, nor isolated&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2446</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2446"/>
		<updated>2006-11-01T15:32:59Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approached to the network virtualization, caused different requirements for different usages. This page is made in order to summarize them and create solution, suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
* virtualization on the 2nd level (OpenVZ);&lt;br /&gt;
: For input packets context switching is performed in device xmit code, requires virtual device for performing. For output, context is inherited from socket one.&lt;br /&gt;
* virtualization on the 3d level (IBM);&lt;br /&gt;
: For input packets context switching is performed in routing code, for output - inherited from socket one.&lt;br /&gt;
* socket virtualization (Linux-VServer).&lt;br /&gt;
: There is no context switching for packets at all, checks are perfromed between process and socket contexts.&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;13%&amp;quot; | network devices&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | network sockets&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | netfilters&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v/i || v || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || i || -&lt;br /&gt;
|-&lt;br /&gt;
| bind filtering || - || - || i || -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - nor virtualized, nor isolated&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2445</id>
		<title>Containers/Network virtualization</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Containers/Network_virtualization&amp;diff=2445"/>
		<updated>2006-11-01T15:24:54Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are a number of approached to the network virtualization, caused different requirements for different usages. This page is made in order to summarize them and create solution, suitable for all.&lt;br /&gt;
&lt;br /&gt;
== Usages ==&lt;br /&gt;
Current known usages are:&lt;br /&gt;
* Virtual Environments - complete OS environment, with it's own users, groups, filesystems and devices; &lt;br /&gt;
* Application Containers - partly isolated environment with application inside.&lt;br /&gt;
&lt;br /&gt;
== Approaches ==&lt;br /&gt;
* virtualization on the 2nd level (OpenVZ);&lt;br /&gt;
: For input packets context switching is performed in device xmit code, requires virtual device for performing. For output, context is inherited from socket one.&lt;br /&gt;
* virtualization on the 3d level (IBM);&lt;br /&gt;
: For input packets context switching is performed in routing code, for output - inherited from socket one.&lt;br /&gt;
* socket virtualization (Linux-VServer).&lt;br /&gt;
: There is no context switching for packets at all, checks are perfromed between process and socket contexts.&lt;br /&gt;
&lt;br /&gt;
== Virtualization table ==&lt;br /&gt;
This is a summary table in order to show which core networking objects are virtualized/isolated in above approaches or not.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | Virtualization approach&lt;br /&gt;
! width=&amp;quot;13%&amp;quot; | devices&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing tables&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | routing cache&lt;br /&gt;
! Width=&amp;quot;13%&amp;quot; | sockets&lt;br /&gt;
|-&lt;br /&gt;
| 2d level virtualization || v || v || i || v &lt;br /&gt;
|-&lt;br /&gt;
| 3d level virtualization || - || i || - || i&lt;br /&gt;
|-&lt;br /&gt;
| bind filtering || - || - || - || i&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Legend:&lt;br /&gt;
* 'v' - virtualized&lt;br /&gt;
* 'i' - isolated&lt;br /&gt;
* '-' - nor virtualized, nor isolated&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Printing_in_VE_with_Debian_stable&amp;diff=2418</id>
		<title>Printing in VE with Debian stable</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Printing_in_VE_with_Debian_stable&amp;diff=2418"/>
		<updated>2006-10-20T07:52:42Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here are the steps to set up a print server (CUPS) on a VE using Debian.&lt;br /&gt;
&lt;br /&gt;
* Create the VE and do your initial setup.&lt;br /&gt;
* apt-get cupsys cupsys-bsd foomatic-db cupsomatic-ppd (etc)&lt;br /&gt;
* Return to the HN and do the following:&lt;br /&gt;
: &amp;lt;code&amp;gt;vzctl set &amp;lt;veid&amp;gt; --devnodes lp0:rw&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you configured parport, etc, as modules, you'll have to do the following:&lt;br /&gt;
: &amp;lt;code&amp;gt;cat &amp;lt;&amp;lt; _EOF_ &amp;gt;&amp;gt; /etc/modules&lt;br /&gt;
: &amp;lt;code&amp;gt;parport&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;parport_pc&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;lp&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;_EOF_&amp;lt;/code&amp;gt;&lt;br /&gt;
* Return to the VE and configure your printer in CUPS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Debian]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Category:HOWTO&amp;diff=2417</id>
		<title>Category:HOWTO</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Category:HOWTO&amp;diff=2417"/>
		<updated>2006-10-20T07:40:46Z</updated>

		<summary type="html">&lt;p&gt;Dim: Previous change is moved to separate article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This category is for various HOWTOs on all the possible topics.&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=ToDo&amp;diff=2392</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=ToDo&amp;diff=2392"/>
		<updated>2006-10-10T13:29:20Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Kernel==&lt;br /&gt;
&lt;br /&gt;
* NFS issues&lt;br /&gt;
* Loopback device (/dev/lo*) support&lt;br /&gt;
* vzquota over other than ext2/ext3 filesystems&lt;br /&gt;
&lt;br /&gt;
==Templates==&lt;br /&gt;
&lt;br /&gt;
* template metadata creation HOWTO&lt;br /&gt;
* template metadata rpms build system, like we have for tools&lt;br /&gt;
* tool for auto creation rpm/deb packages from precreated templates tarballs for easy installation with yum/apt help&lt;br /&gt;
* page for precreated templates submission to contribs&lt;br /&gt;
* page with list of all available templates, like [http://www.vmware.com/vmtn/appliances/&lt;br /&gt;
* templates metadata should include some high-level package manager (yum for FC5, what else?)&lt;br /&gt;
* add 'extras' repo to FC5 template metadata&lt;br /&gt;
&lt;br /&gt;
==VE package management==&lt;br /&gt;
&lt;br /&gt;
* x86_64, ia64, ppc64 external package management (vzrpm, vzpkgenv?)&lt;br /&gt;
* support for application templates&lt;br /&gt;
* apt-based external package management&lt;br /&gt;
* adoption for common build system&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
vzctl:&lt;br /&gt;
* add IPv6 configuration support&lt;br /&gt;
* Debian-specific initscript&lt;br /&gt;
* complete redesign&lt;br /&gt;
* [http://bugzilla.openvz.org/buglist.cgi?query_format=advanced&amp;amp;short_desc_type=allwordssubstr&amp;amp;short_desc=&amp;amp;product=OpenVZ&amp;amp;component=vzctl&amp;amp;long_desc_type=substring&amp;amp;long_desc=&amp;amp;bug_file_loc_type=allwordssubstr&amp;amp;bug_file_loc=&amp;amp;bug_status=NEW&amp;amp;bug_status=ASSIGNED&amp;amp;bug_status=REOPENED&amp;amp;emailassigned_to1=1&amp;amp;emailtype1=substring&amp;amp;email1=&amp;amp;emailassigned_to2=1&amp;amp;emailreporter2=1&amp;amp;emailcc2=1&amp;amp;emailtype2=substring&amp;amp;email2=&amp;amp;bugidtype=include&amp;amp;bug_id=&amp;amp;votes=&amp;amp;chfieldfrom=&amp;amp;chfieldto=Now&amp;amp;chfieldvalue=&amp;amp;cmdtype=doit&amp;amp;order=Reuse+same+sort+as+last+time&amp;amp;field0-0-0=noop&amp;amp;type0-0-0=noop&amp;amp;value0-0-0= List of opened vzctl bugs in Bugzilla]&lt;br /&gt;
&lt;br /&gt;
==Testing suite==&lt;br /&gt;
* should include base vzctl operation, published, easy to install and run on the node.&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=ToDo&amp;diff=2390</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=ToDo&amp;diff=2390"/>
		<updated>2006-10-10T12:59:32Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Kernel==&lt;br /&gt;
&lt;br /&gt;
* NFS issues&lt;br /&gt;
* vzquota over other than ext2/ext3 filesystems&lt;br /&gt;
&lt;br /&gt;
==Templates==&lt;br /&gt;
&lt;br /&gt;
* template metadata creation HOWTO&lt;br /&gt;
* template metadata rpms build system, like we have for tools&lt;br /&gt;
* tool for auto creation rpm/deb packages from precreated templates tarballs for easy installation with yum/apt help.&lt;br /&gt;
* page for precreated templates submission to contribs.&lt;br /&gt;
* page with list of all available templates, like http://www.vmware.com/vmtn/appliances/&lt;br /&gt;
* templates metadata should include &amp;quot;smart&amp;quot; package manager (yum to fc5, what else?) &lt;br /&gt;
* add extra repo to fc5 template metadata&lt;br /&gt;
&lt;br /&gt;
==VPS package management==&lt;br /&gt;
&lt;br /&gt;
* x86_64, ia64, ppc64 external package management (vzrpm, vzpkgenv?)&lt;br /&gt;
* apt-based external package management&lt;br /&gt;
* adoption for common build system&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
&lt;br /&gt;
vzctl:&lt;br /&gt;
* add IPv6 configuration support&lt;br /&gt;
* complete redesign.&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=ToDo&amp;diff=2389</id>
		<title>ToDo</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=ToDo&amp;diff=2389"/>
		<updated>2006-10-10T12:57:12Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Kernel==&lt;br /&gt;
&lt;br /&gt;
* NFS issues&lt;br /&gt;
* vzquota over other than ext2/ext3 filesystems&lt;br /&gt;
&lt;br /&gt;
==Templates==&lt;br /&gt;
&lt;br /&gt;
* template metadata creation HOWTO&lt;br /&gt;
* template metadata rpms build system, like we have for tools&lt;br /&gt;
* tool for auto creation rpm/deb packages from precreated templates tarballs for easy installation with yum/apt help.&lt;br /&gt;
* page for precreated templates submission to contribs.&lt;br /&gt;
* page with list of all available templates, like http://www.vmware.com/vmtn/appliances/&lt;br /&gt;
* templates metadata should include &amp;quot;smart&amp;quot; package manager (yum to fc5, what else?) &lt;br /&gt;
* add extra repo to fc5 template metadata&lt;br /&gt;
&lt;br /&gt;
==VPS package management==&lt;br /&gt;
&lt;br /&gt;
* x86_64, ia64, ppc64 external package management (vzrpm, vzpkgenv?)&lt;br /&gt;
* apt-based external package management&lt;br /&gt;
* adoption for common build system&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Monitoring_openvz_resources_using_nagios_and_snmp&amp;diff=2387</id>
		<title>Monitoring openvz resources using nagios and snmp</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Monitoring_openvz_resources_using_nagios_and_snmp&amp;diff=2387"/>
		<updated>2006-10-09T08:25:50Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== snmpd configuration ==&lt;br /&gt;
Debian Etch example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
apt-get install snmpd&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
edit '''/etc/default/snmpd''' : remove ''-u snmp'' and replace ''127.0.0.1'' with your ip, Full'''/etc/default/snmpd''' example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export MIBDIRS=/usr/share/snmp/mibs&lt;br /&gt;
SNMPDRUN=yes&lt;br /&gt;
SNMPDOPTS='-Lsd -Lf /dev/null  -I -smux -p /var/run/snmpd.pid 207.46.250.119'&lt;br /&gt;
TRAPDRUN=no&lt;br /&gt;
TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create user(my_username) and add new mib:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/etc/init.d/snmpd stop&lt;br /&gt;
echo rouser my_username priv &amp;gt; /etc/snmp/snmpd.conf&lt;br /&gt;
echo &amp;quot;extend  .1.3.6.1.4.1.2021.51  beancounters  /bin/cat /proc/user_beancounters&amp;quot; &amp;gt;&amp;gt; /etc/snmp/snmpd.conf&lt;br /&gt;
echo  createUser my_username MD5 my_password DES &amp;gt;&amp;gt; /var/lib/snmp/snmpd.conf&lt;br /&gt;
/etc/init.d/snmpd start &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing snmp:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
snmpwalk   -v 3  -u my_usrname -l authPriv   -a MD5 -A my_password -x DES -X my_password  207.46.250.119&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Warning: the minimum pass phrase length is 8 characters.&lt;br /&gt;
&lt;br /&gt;
== nagios configuration ==&lt;br /&gt;
=== example nagios configuration ===&lt;br /&gt;
add to configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define command {&lt;br /&gt;
command_name check_snmp_openvz_on_port&lt;br /&gt;
# command_line /usr/local/bin/check_snmp_openvz.sh  $HOSTADDRESS$ PORT    USER    PASSWORD&lt;br /&gt;
command_line /usr/local/bin/check_snmp_openvz.sh  $HOSTADDRESS$ $ARG1$  $ARG2$  $ARG3$&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define host {&lt;br /&gt;
        host_name   openvz-server&lt;br /&gt;
        alias       Serwer Openvz&lt;br /&gt;
        address     207.46.250.119&lt;br /&gt;
        use         generic-host&lt;br /&gt;
        contact_groups  admins&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
define service{&lt;br /&gt;
        use                             generic-service&lt;br /&gt;
        host_name                       openvz-server&lt;br /&gt;
        service_description             Virtual Machines Limits&lt;br /&gt;
        check_command                   check_snmp_openvz_on_port!161!my_username!my_password&lt;br /&gt;
        max_check_attempts              1&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== nagios plugin ===&lt;br /&gt;
It is shell script:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# cat /usr/local/bin/check_snmp_openvz.sh&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
HOST=$1&lt;br /&gt;
PORT=$2&lt;br /&gt;
USER=$3&lt;br /&gt;
PASS=$4&lt;br /&gt;
export FILE=/tmp/$HOST.beancounters&lt;br /&gt;
RET=0&lt;br /&gt;
&lt;br /&gt;
DATA=`snmpwalk   -v 3  -u $USER -l authPriv   -a MD5 -A $PASS -x DES -X $PASS $HOST:$PORT .1.3.6.1.4.1.2021.51.4 \&lt;br /&gt;
|  perl -ne '/&amp;quot;(.*)&amp;quot;/ ; print &amp;quot;$1\n&amp;quot; ;'`&lt;br /&gt;
&lt;br /&gt;
if [ &amp;quot;$?&amp;quot; != &amp;quot;0&amp;quot; ]; then&lt;br /&gt;
        echo &amp;quot;Unknown snmp error&amp;quot;&lt;br /&gt;
        exit 1&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if [ -f $FILE ]; then&lt;br /&gt;
echo &amp;quot;$DATA&amp;quot; | perl  -n -e'&lt;br /&gt;
use Data::Dumper;&lt;br /&gt;
my $file=$ENV{&amp;quot;FILE&amp;quot;};&lt;br /&gt;
my $ret=0 ;&lt;br /&gt;
my $vid ;&lt;br /&gt;
my $resource ;&lt;br /&gt;
my $held ;&lt;br /&gt;
my $maxheld ;&lt;br /&gt;
my $barrier ;&lt;br /&gt;
my $limit ;&lt;br /&gt;
my $failcnt ;&lt;br /&gt;
my %beancounters ;&lt;br /&gt;
my %beancounters_old ;&lt;br /&gt;
while(&amp;lt;STDIN&amp;gt;){&lt;br /&gt;
        my %vmachine;&lt;br /&gt;
        if ( /\D*(\d+):.*/ ){ $vid=$1; $beancounters{$vid}=\%vmachine ; }&lt;br /&gt;
        if ( /^[\W\d]+([a-z]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+).*/ ) {&lt;br /&gt;
                $resource=$1 ;&lt;br /&gt;
                $held=$2 ;&lt;br /&gt;
                $maxheld=$3 ;&lt;br /&gt;
                $barrier=$4 ;&lt;br /&gt;
                $limit=$5 ;&lt;br /&gt;
                $failcnt=$6 ;&lt;br /&gt;
                ${beancounters{$vid}}{$resource}=[$held , $maxheld , $barrier , $limit ,$failcnt ];&lt;br /&gt;
                if ( ($held  &amp;gt; $barrier) &amp;amp;&amp;amp; ($barrier != 0) ) {&lt;br /&gt;
                        print &amp;quot;WARNING: Limits on $vid: $resource  held-&amp;gt;$held , barrier-&amp;gt;$barrier ( limit-&amp;gt;$limit ) \n&amp;quot; ;&lt;br /&gt;
                        $ret=1;&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# read and parse old data&lt;br /&gt;
open(MYINPUTFILE, &amp;quot;&amp;lt;$file&amp;quot;);&lt;br /&gt;
while(&amp;lt;MYINPUTFILE&amp;gt;){&lt;br /&gt;
        my %vmachine;&lt;br /&gt;
        if ( /\D*(\d+):.*/ ){ $vid=$1; $beancounters_old{$vid}=\%vmachine ; }&lt;br /&gt;
        if ( /^[\W\d]+([a-z]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+).*/ ) {&lt;br /&gt;
                $resource=$1 ;&lt;br /&gt;
                $held=$2 ;&lt;br /&gt;
                $maxheld=$3 ;&lt;br /&gt;
                $barrier=$4 ;&lt;br /&gt;
                $limit=$5 ;&lt;br /&gt;
                $failcnt=$6 ;&lt;br /&gt;
                ${beancounters_old{$vid}}{$resource}=[$held , $maxheld , $barrier , $limit ,$failcnt ];&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
foreach my $vmachine_id (keys %beancounters) {&lt;br /&gt;
        foreach my $resource (keys %{$beancounters{$vmachine_id}} ) {&lt;br /&gt;
                if ( defined($beancounters{$vmachine_id}{$resource}[4]) &amp;amp;&amp;amp; defined($beancounters_old{$vmachine_id}{$resource}[4]) ){&lt;br /&gt;
                        my $failcnt=$beancounters{$vmachine_id}{$resource}[4];&lt;br /&gt;
                        my $failcnt_old=$beancounters_old{$vmachine_id}{$resource}[4];&lt;br /&gt;
                        my $held=$beancounters{$vmachine_id}{$resource}[0];&lt;br /&gt;
                        my $maxheld=$beancounters{$vmachine_id}{$resource}[1];&lt;br /&gt;
                        my $barrier=$beancounters{$vmachine_id}{$resource}[2];&lt;br /&gt;
                        my $limit=$beancounters{$vmachine_id}{$resource}[3];&lt;br /&gt;
                        if ( $failcnt_old &amp;lt; $failcnt ){&lt;br /&gt;
                                print &amp;quot;CRITICAL: Incrased failcnt  $vmachine_id: $resource from $failcnt_old to $failcnt (held-&amp;gt;$held , maxheld-&amp;gt;$maxheld , barrier-&amp;gt;$barrier , limit-&amp;gt;$limit ) \n&amp;quot; ;&lt;br /&gt;
                                $ret=2;&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if ($ret == 0 ) { print &amp;quot;Ok. \n&amp;quot; ; }&lt;br /&gt;
# print Dumper(%beancounters_old) ;&lt;br /&gt;
exit($ret);&lt;br /&gt;
'&lt;br /&gt;
&lt;br /&gt;
RET=$?&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;$DATA&amp;quot; &amp;gt; $FILE&lt;br /&gt;
&lt;br /&gt;
exit $RET&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1886</id>
		<title>Using NAT for container with private IPs</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1886"/>
		<updated>2006-07-18T06:58:28Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== How to provide access for VE to Internet ==&lt;br /&gt;
&lt;br /&gt;
To enable the [[VE]]s, which have only internal IP addresses, to access the Internet, SNAT (Source Network Address Translation, also known as IP masquerading) should be configured on the [[Hardware Node]]. This is ensured by the standard Linux &amp;lt;tt&amp;gt;iptables&amp;lt;/tt&amp;gt; utility. To perform a simple SNAT setup, execute the following command on the [[Hardware Node]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s src_net -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;tt&amp;gt;src_net&amp;lt;/tt&amp;gt; is a range of IP addresses of VEs to be translated by SNAT, and &amp;lt;tt&amp;gt;ip_address&amp;lt;/tt&amp;gt; is the external IP address of your [[Hardware Node]]. Multiple rules are allowed, for example, in case you wish to specify several ranges of IP addresses. If you are using a number of physical network interfaces on the [[Hardware Node|Node]], you may need to specify a different interface for outgoing connections, e.g. &amp;lt;tt&amp;gt;-o eth2&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Note|If you are using stable (currently 2.6.8-based) kernel, then to enable SNAT for the VEs on your local network you need to explicitly enable connection tracking in [[VE0]].}}&lt;br /&gt;
Make sure that the following string is present in the &amp;lt;tt&amp;gt;/etc/modprobe.conf&amp;lt;/tt&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;
In case it is not, add this string to the file by means of any text editor (for example, vi). This setting is not needed for kernels more recent than 2.6.8, since connection tracking for [[VE0]] is enabled by default in those kernels.&lt;br /&gt;
&lt;br /&gt;
To make all IP addresses to be translated by SNAT (not only the ones of [[VE]]s with private addresses), you should type the following string:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to provide access from Internet to a VE ==&lt;br /&gt;
&lt;br /&gt;
In addition, to make some services in VE with private IP address be accessible from the Internet, DNAT (Destination Network Address Translation) should be configured on the [[Hardware Node]]. To perform a simple DNAT setup, execute the following command on the [[Hardware Node]]:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address --port port_num \&lt;br /&gt;
  -i eth0 -j DNAT --to-destination ve_address:dst_port_num &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;tt&amp;gt;ve_address&amp;lt;/tt&amp;gt; is an IP address of the VE, &amp;lt;tt&amp;gt;dst_port_num&amp;lt;/tt&amp;gt; is a tcp port which requires service use, &amp;lt;tt&amp;gt;ip_address&amp;lt;/tt&amp;gt; is the external (public) IP address of your [[Hardware Node]], and &amp;lt;tt&amp;gt;port_num&amp;lt;/tt&amp;gt; is a tcp port of [[Hardware Node]], which will be used for Internet connections to private VE service. Note that this setup makes the service which is using &amp;lt;tt&amp;gt;port_num&amp;lt;/tt&amp;gt; on the [[Hardware Node]] be unaccessible from the Internet. Also note that SNAT translation is required too.&lt;br /&gt;
&lt;br /&gt;
For example, if you need a web server in a VE to be accessible from outside and, at the same time, keep a web server on the [[Hardware Node]] be accessible, use the following config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address --dport 8080 \&lt;br /&gt;
  -i eth0 -j DNAT --to-destination ve_address:80&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s ve_address -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After applying this, you'll see VE' web server at &amp;lt;nowiki&amp;gt;http://ip_address:8080/&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;iptables&amp;lt;/tt&amp;gt; utility allows to set up more complex rules for Network Address Translation, involving various protocols and ports. If you wish to get more information on this, consult the numerous Internet sites (e.g. [http://www.netfilter.org netfilter.org]) and tutorials devoted to this issue.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [http://www.netfilter.org netfilter.org]&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Networking]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Asterisk_in_container_with_Debian_stable&amp;diff=1883</id>
		<title>Asterisk in container with Debian stable</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Asterisk_in_container_with_Debian_stable&amp;diff=1883"/>
		<updated>2006-07-17T08:08:40Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is an example of how to install Asterisk into OpenVZ VE based on debian stable aka. &amp;quot;sarge&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ apt-get install asterisk&lt;br /&gt;
&lt;br /&gt;
$ nano /etc/defaults/asterisk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RUNASTERISK=no -&amp;gt; yes&lt;br /&gt;
AST_REALTIME=yes -&amp;gt; no (for realtime, you need&lt;br /&gt;
&lt;br /&gt;
$ /etc/init.d/asterisk start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
modify the config files for asterisk, and done!&lt;br /&gt;
&lt;br /&gt;
if you need capi or/and zaptel/zaphfc:&lt;br /&gt;
&lt;br /&gt;
* for capi: you need the /dev files on you hw-node and vps:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crw-rw---- 1 root dialout 68, 0 Jan 3 2006 /dev/capi20&lt;br /&gt;
crw-rw---- 1 root dialout 68, 1 Jan 3 2006 /dev/capi20.00&lt;br /&gt;
crw-rw---- 1 root dialout 68, 2 Jan 3 2006 /dev/capi20.01&lt;br /&gt;
crw-rw---- 1 root dialout 68, 3 Jan 3 2006 /dev/capi20.02&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
/* if the files doesn' exist use mknod for creating it*/&lt;br /&gt;
&lt;br /&gt;
and in your vps config add for directly access:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEVICES=&amp;quot;c:68:0:rw, c:68:1:rw, c:68:2:rw&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
* for zaptel/zaphfc:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
crw-rw---- 1 root dialout 196, 0 Jan 4 2006 ctl&lt;br /&gt;
crw-rw---- 1 root dialout 196, 1 Jan 4 2006 1&lt;br /&gt;
crw-rw---- 1 root dialout 196, 2 Jan 4 2006 2&lt;br /&gt;
crw-rw---- 1 root dialout 196, 3 Jan 4 2006 3&lt;br /&gt;
crw-rw---- 1 root dialout 196, 4 Jan 4 2006 4&lt;br /&gt;
[...]&lt;br /&gt;
crw-rw---- 1 root dialout 196, 253 Jan 4 2006 timer&lt;br /&gt;
crw-rw---- 1 root dialout 196, 255 Jan 4 2006 pseudo&lt;br /&gt;
crw-rw---- 1 root dialout 196, 254 Jan 4 2006 channel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
/* if the files doesn' exist use mknod for creating it*/&lt;br /&gt;
&lt;br /&gt;
and in your vps config&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEVICES=&amp;quot;c:196:0:rw, c:196:2:rw, c:196:1:rw, c:196:253:rw,c:196:254:rw,c:196:255:rw&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if need both (capi and zaphfc)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DEVICES=&amp;quot;c:68:0:rw, c:68:1:rw, c:68:2:rw c:196:0:rw, c:196:2:rw, c:196:1:rw, c:196:253:rw,c:196:254:rw,c:196:255:rw&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category:HOWTO]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=1834</id>
		<title>Virtual network device</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Virtual_network_device&amp;diff=1834"/>
		<updated>2006-07-05T10:29:13Z</updated>

		<summary type="html">&lt;p&gt;Dim: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Vitual network device (&amp;lt;code&amp;gt;venet&amp;lt;/code&amp;gt;) is the default network device for a [[VE]]. This network device looks like a peer-to-peer connection between [[VE]] and the [[VE0|host system]]. It does packet switching based on IP header. This is a default network device for VE (an alternative is [[veth]] device).&lt;br /&gt;
&lt;br /&gt;
Venet device is created automatically on [[VE]] start. Vzctl scripts set up an appropriate IP address and other settings on venet inside a VE.&lt;br /&gt;
&lt;br /&gt;
=  Virtual network device usage =&lt;br /&gt;
&lt;br /&gt;
== Adding IP address to a VE ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;VEID&amp;gt; --ipadd &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|This option is incremental, so IP addresses are added to already existing ones.}}&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipadd 10.0.0.1 --save&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After executing this command IP address 10.0.0.1 will be added to VE 101 and IP configuration will be saved to a VE configuration file.&lt;br /&gt;
&lt;br /&gt;
== Removing IP address from a VE ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set &amp;lt;VEID&amp;gt; --ipdel &amp;lt;IP1&amp;gt;[,&amp;lt;IP2&amp;gt;,...] [--save]&lt;br /&gt;
vzctl set &amp;lt;VEID&amp;gt; --ipdel all [--save]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vzctl set 101 --ipdel 10.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
After executing this command IP address 10.0.0.1 will be removed from VE 101, but IP configuration will not be changed in VE config file. And after VE reboot IP address 10.0.0.1 will be assigned to this VE again.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Virtual ethernet device]]&lt;br /&gt;
* [[Differences between venet and veth]]&lt;br /&gt;
&lt;br /&gt;
[[Category: Networking]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1454</id>
		<title>Using NAT for container with private IPs</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1454"/>
		<updated>2006-06-02T07:53:02Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== How to provide access for VPS to Internet ==&lt;br /&gt;
&lt;br /&gt;
To enable the VPSs, which have only internal IP addresses, to access the Internet, SNAT (Source Network Address Translation, also known as IP masquerading) should be configured on the Hardware Node. This is ensured by the standard Linux iptables utility. To perform a simple SNAT setup, execute the following command on the Hardware Node:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s src_net -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where src_net is a range of IP addresses of VPSs to be translated by SNAT, and ip_address is the external IP address of your Hardware Node. Multiple rules are allowed, for example, in case you wish to specify several ranges of IP addresses. If you are using a number of physical network interfaces on the Node, you may need to specify a different interface for outgoing connections, e.g. -o eth2.&lt;br /&gt;
&lt;br /&gt;
Note: If you are using stable (2.6.8-based) kernel, then to enable SNAT for the VPSs on your local network you should also make sure that the following string is present in the /etc/modules.conf 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;
In case it is not, add this string to the file by means of any text editor (for example, vi). This setting is not needed for kernels more recent than 2.6.8, since connection tracking for VE0 is enabled by default in those kernels.&lt;br /&gt;
&lt;br /&gt;
To make all IP addresses to be translated by SNAT (not only the ones of VPSs with private addresses), you should type the following string:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to provide access from Internet to VPS ==&lt;br /&gt;
&lt;br /&gt;
In addition, to make some services in VPS with internal IP address be accessible from the Internet, DNAT (Destination Network Address Translation) should be configured on the Hardware Node. To perform a simple DNAT setup, execute the following command on the Hardware Node:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address --port port_num -i eth0 -j DNAT --to-destination vps_address:dst_port_num &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where vps_address is an IP address of VPS, dst_port_num is a tcp port, which required service use, ip_address is the external IP address of your Hardware Node, and port_num is a tcp port of Hardware Node, which will be used for Internet connections to private VPS service. Note that this setup makes the service, which use port_num on the Hardware Node, be unaccessible from the Internet. Also note that SNAT translation is required too.&lt;br /&gt;
&lt;br /&gt;
For example, if you need a web server in a VPS to be accessible from outside, and, at the same time, keep a web server on the Hardware Node be accessible, use the following config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address -p 8080 -i eth0 -j DNAT --to-destination vps_address:80&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s vps_address -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After applying this, you'll see VPS' web server at http://ip_address:8080/&lt;br /&gt;
&lt;br /&gt;
The iptables utility allows to set up more complex rules for Network Address Translation, involving various protocols and ports. If you wish to get more information on this, consult the numerous Internet sites (e.g. [http://www.netfilter.org www.netfilter.org]) and tutorials devoted to this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Networking]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1452</id>
		<title>Using NAT for container with private IPs</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1452"/>
		<updated>2006-06-02T07:51:39Z</updated>

		<summary type="html">&lt;p&gt;Dim: MASQUERADE moved to Using NAT for VPS with private IPs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NAT for providing access to/from VPS with private IPs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VPS to Internet ==&lt;br /&gt;
&lt;br /&gt;
To enable the VPSs, which have only internal IP addresses, to access the Internet, SNAT (Source Network Address Translation, also known as IP masquerading) should be configured on the Hardware Node. This is ensured by the standard Linux iptables utility. To perform a simple SNAT setup, execute the following command on the Hardware Node:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s src_net -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where src_net is a range of IP addresses of VPSs to be translated by SNAT, and ip_address is the external IP address of your Hardware Node. Multiple rules are allowed, for example, in case you wish to specify several ranges of IP addresses. If you are using a number of physical network interfaces on the Node, you may need to specify a different interface for outgoing connections, e.g. -o eth2.&lt;br /&gt;
&lt;br /&gt;
Note: If you are using stable (2.6.8-based) kernel, then to enable SNAT for the VPSs on your local network you should also make sure that the following string is present in the /etc/modules.conf 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;
In case it is not, add this string to the file by means of any text editor (for example, vi). This setting is not needed for kernels more recent than 2.6.8, since connection tracking for VE0 is enabled by default in those kernels.&lt;br /&gt;
&lt;br /&gt;
To make all IP addresses to be translated by SNAT (not only the ones of VPSs with private addresses), you should type the following string:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Internet to VPS ==&lt;br /&gt;
&lt;br /&gt;
In addition, to make some services in VPS with internal IP address be accessible from the Internet, DNAT (Destination Network Address Translation) should be configured on the Hardware Node. To perform a simple DNAT setup, execute the following command on the Hardware Node:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address --port port_num -i eth0 -j DNAT --to-destination vps_address:dst_port_num &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where vps_address is an IP address of VPS, dst_port_num is a tcp port, which required service use, ip_address is the external IP address of your Hardware Node, and port_num is a tcp port of Hardware Node, which will be used for Internet connections to private VPS service. Note that this setup makes the service, which use port_num on the Hardware Node, be unaccessible from the Internet. Also note that SNAT translation is required too.&lt;br /&gt;
&lt;br /&gt;
For example, if you need a web server in a VPS to be accessible from outside, and, at the same time, keep a web server on the Hardware Node be accessible, use the following config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address -p 8080 -i eth0 -j DNAT --to-destination vps_address:80&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s vps_address -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After applying this, you'll see VPS' web server at http://ip_address:8080/&lt;br /&gt;
&lt;br /&gt;
The iptables utility allows to set up more complex rules for Network Address Translation, involving various protocols and ports. If you wish to get more information on this, consult the numerous Internet sites (e.g. [http://www.netfilter.org www.netfilter.org]) and tutorials devoted to this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Networking]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=MASQUERADE&amp;diff=1453</id>
		<title>MASQUERADE</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=MASQUERADE&amp;diff=1453"/>
		<updated>2006-06-02T07:51:39Z</updated>

		<summary type="html">&lt;p&gt;Dim: MASQUERADE moved to Using NAT for VPS with private IPs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Using NAT for VPS with private IPs]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1451</id>
		<title>Using NAT for container with private IPs</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1451"/>
		<updated>2006-06-02T07:49:08Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NAT for providing access to/from VPS with private IPs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VPS to Internet ==&lt;br /&gt;
&lt;br /&gt;
To enable the VPSs, which have only internal IP addresses, to access the Internet, SNAT (Source Network Address Translation, also known as IP masquerading) should be configured on the Hardware Node. This is ensured by the standard Linux iptables utility. To perform a simple SNAT setup, execute the following command on the Hardware Node:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s src_net -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where src_net is a range of IP addresses of VPSs to be translated by SNAT, and ip_address is the external IP address of your Hardware Node. Multiple rules are allowed, for example, in case you wish to specify several ranges of IP addresses. If you are using a number of physical network interfaces on the Node, you may need to specify a different interface for outgoing connections, e.g. -o eth2.&lt;br /&gt;
&lt;br /&gt;
Note: If you are using stable (2.6.8-based) kernel, then to enable SNAT for the VPSs on your local network you should also make sure that the following string is present in the /etc/modules.conf 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;
In case it is not, add this string to the file by means of any text editor (for example, vi). This setting is not needed for kernels more recent than 2.6.8, since connection tracking for VE0 is enabled by default in those kernels.&lt;br /&gt;
&lt;br /&gt;
To make all IP addresses to be translated by SNAT (not only the ones of VPSs with private addresses), you should type the following string:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Internet to VPS ==&lt;br /&gt;
&lt;br /&gt;
In addition, to make some services in VPS with internal IP address be accessible from the Internet, DNAT (Destination Network Address Translation) should be configured on the Hardware Node. To perform a simple DNAT setup, execute the following command on the Hardware Node:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address --port port_num -i eth0 -j DNAT --to-destination vps_address:dst_port_num &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where vps_address is an IP address of VPS, dst_port_num is a tcp port, which required service use, ip_address is the external IP address of your Hardware Node, and port_num is a tcp port of Hardware Node, which will be used for Internet connections to private VPS service. Note that this setup makes the service, which use port_num on the Hardware Node, be unaccessible from the Internet. Also note that SNAT translation is required too.&lt;br /&gt;
&lt;br /&gt;
For example, if you need a web server in a VPS to be accessible from outside, and, at the same time, keep a web server on the Hardware Node be accessible, use the following config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address -p 8080 -i eth0 -j DNAT --to-destination vps_address:80&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s vps_address -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After applying this, you'll see VPS' web server at http://ip_address:8080/&lt;br /&gt;
&lt;br /&gt;
The iptables utility allows to set up more complex rules for Network Address Translation, involving various protocols and ports. If you wish to get more information on this, consult the numerous Internet sites (e.g. [http://www.netfilter.org www.netfilter.org]) and tutorials devoted to this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Networking]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1450</id>
		<title>Using NAT for container with private IPs</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Using_NAT_for_container_with_private_IPs&amp;diff=1450"/>
		<updated>2006-06-02T07:48:34Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Using NAT for providing access to/from VPS with private IPs ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VPS to Internet ==&lt;br /&gt;
&lt;br /&gt;
To enable the VPSs, which have only internal IP addresses, to access the Internet, SNAT (Source Network Address Translation, also known as IP masquerading) should be configured on the Hardware Node. This is ensured by the standard Linux iptables utility. To perform a simple SNAT setup, execute the following command on the Hardware Node:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s src_net -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where src_net is a range of IP addresses of VPSs to be translated by SNAT, and ip_address is the external IP address of your Hardware Node. Multiple rules are allowed, for example, in case you wish to specify several ranges of IP addresses. If you are using a number of physical network interfaces on the Node, you may need to specify a different interface for outgoing connections, e.g. -o eth2.&lt;br /&gt;
&lt;br /&gt;
Note: If you are using stable (2.6.8-based) kernel, then to enable SNAT for the VPSs on your local network you should also make sure that the following string is present in the /etc/modules.conf 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;
In case it is not, add this string to the file by means of any text editor (for example, vi). This setting is not needed for kernels more recent than 2.6.8, since connection tracking for VE0 is enabled by default in those kernels.&lt;br /&gt;
&lt;br /&gt;
To make all IP addresses to be translated by SNAT (not only the ones of VPSs with private addresses), you should type the following string:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Internet to VPS ==&lt;br /&gt;
&lt;br /&gt;
In addition, to make some services in VPS with internal IP address be accessible from the Internet, DNAT (Destination Network Address Translation) should be configured on the Hardware Node. To perform a simple DNAT setup, execute the following command on the Hardware Node:&lt;br /&gt;
&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address --port port_num -i eth0 -j DNAT --to-destination vps_address:dst_port_num &lt;br /&gt;
&lt;br /&gt;
where vps_address is an IP address of VPS, dst_port_num is a tcp port, which required service use, ip_address is the external IP address of your Hardware Node, and port_num is a tcp port of Hardware Node, which will be used for Internet connections to private VPS service. Note that this setup makes the service, which use port_num on the Hardware Node, be unaccessible from the Internet. Also note that SNAT translation is required too.&lt;br /&gt;
&lt;br /&gt;
For example, if you need a web server in a VPS to be accessible from outside, and, at the same time, keep a web server on the Hardware Node be accessible, use the following config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# iptables -t nat -A PREROUTING -p tcp -d ip_address -p 8080 -i eth0 -j DNAT --to-destination vps_address:80&lt;br /&gt;
# iptables -t nat -A POSTROUTING -s vps_address -o eth0 -j SNAT --to ip_address&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After applying this, you'll see VPS' web server at http://ip_address:8080/&lt;br /&gt;
&lt;br /&gt;
The iptables utility allows to set up more complex rules for Network Address Translation, involving various protocols and ports. If you wish to get more information on this, consult the numerous Internet sites (e.g. [http://www.netfilter.org www.netfilter.org]) and tutorials devoted to this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category: HOWTO]]&lt;br /&gt;
[[Category: Networking]]&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=FAQ&amp;diff=1423</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=FAQ&amp;diff=1423"/>
		<updated>2006-05-30T15:47:22Z</updated>

		<summary type="html">&lt;p&gt;Dim: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Dim</name></author>
		
	</entry>
</feed>