<?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=Jmelyn</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=Jmelyn"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Jmelyn"/>
	<updated>2026-06-13T20:17:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Configuring_container_creation&amp;diff=4756</id>
		<title>Configuring container creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Configuring_container_creation&amp;diff=4756"/>
		<updated>2008-03-18T18:42:35Z</updated>

		<summary type="html">&lt;p&gt;Jmelyn: modified an orphan markup (first list)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The creation of a container with vzctl needs three configuration files:&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/vz/vz.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/vz/dists/''distro-name''.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/vz/conf/ve-''config-name''.conf-sample&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== /etc/vz/vz.conf ==&lt;br /&gt;
There are two important lines in the file &amp;lt;code&amp;gt;/etc/vz/vz.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== DEF_OSTEMPLATE ===&lt;br /&gt;
The first is '''DEF_OSTEMPLATE=&amp;quot;''distro''&amp;quot;''' sets the default distribution used for container creation (i.e a default for &amp;lt;code&amp;gt;--ostemplate&amp;lt;/code&amp;gt; argument). An example of ''distro'' is '''fedora-8-i386-minimal'''.&lt;br /&gt;
&lt;br /&gt;
First, this provides the name of the tar file of container template cache: &amp;lt;code&amp;gt;/vz/template/cache/''distro''.tar.gz&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Also, it gives the distribution configuration file, because unfortunately all distributions do not work the same way when setting the host name or the IP address. Several tries are done to find this configuration file name. Say, if ''distro'' is '''fedora-8-i386-minimal''', then the following files are tried, in sequence:&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/vz/dists/fedora-8-i386-minimal.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/vz/dists/fedora-8-i386.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/vz/dists/fedora-8.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;/etc/vz/dists/fedora.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If not found, the &amp;lt;code&amp;gt;/etc/vz/dists/default.conf&amp;lt;/code&amp;gt; is used (and the appropriate warning printed).&lt;br /&gt;
&lt;br /&gt;
=== CONFIGFILE ===&lt;br /&gt;
The other important line in the file &amp;lt;code&amp;gt;/etc/vz/vz.conf&amp;lt;/code&amp;gt; is '''CONFIGFILE=&amp;quot;''config-name''&amp;quot;'''. It provides the name of the container configuration file: &amp;lt;code&amp;gt;/etc/vz/conf/ve-''config-name''.conf-sample&amp;lt;/code&amp;gt; (for example, &amp;lt;code&amp;gt;/etc/vz/conf/ve-light.conf-sample&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
During container creation, this configuration file is copied to &amp;lt;code&amp;gt;''CTID''.conf&amp;lt;/code&amp;gt;, for example, with CTID of 123: &amp;lt;code&amp;gt;/etc/vz/conf/123.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Whenever a parameter is changed for this container ('''vzctl set CTID --parameter newValue --save'''), '''parameter=&amp;quot;newValue&amp;quot;''' line is added to (or replaced in) &amp;lt;code&amp;gt;/etc/vz/conf/''CTID''.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once those three files are correctly set, creating a new container is just the command:&lt;br /&gt;
 vzctl create CTID&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: vzctl]]&lt;/div&gt;</summary>
		<author><name>Jmelyn</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Configuring_container_creation&amp;diff=4672</id>
		<title>Configuring container creation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Configuring_container_creation&amp;diff=4672"/>
		<updated>2008-03-18T12:18:20Z</updated>

		<summary type="html">&lt;p&gt;Jmelyn: New page: The creation of a VE needs three configuration files: &amp;lt;pre&amp;gt;/etc/vz/vz.conf /etc/vz/dists/&amp;lt;dist&amp;gt;.conf /etc/vz/conf/ve-&amp;lt;parameters&amp;gt;.conf-sample&amp;lt;/pre&amp;gt;  There are two important lines in the fi...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The creation of a VE needs three configuration files:&lt;br /&gt;
&amp;lt;pre&amp;gt;/etc/vz/vz.conf&lt;br /&gt;
/etc/vz/dists/&amp;lt;dist&amp;gt;.conf&lt;br /&gt;
/etc/vz/conf/ve-&amp;lt;parameters&amp;gt;.conf-sample&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are two important lines in the file &amp;lt;code&amp;gt;/etc/vz/vz.conf&amp;lt;/code&amp;gt;. The first is '''DEF_OSTEMPLATE=&amp;quot;&amp;lt;dist&amp;gt;&amp;quot;'''; an example of '''&amp;lt;dist&amp;gt;''' is: '''fedora-8-i386-minimal'''. It provides the name of the tar file of VE template cache: &amp;lt;code&amp;gt;/vz/template/cache/&amp;lt;dist&amp;gt;.tar.gz&amp;lt;/code&amp;gt;. This line gives the distribution config file as well, because unfortunately all distributions do not work the same way when setting the host name or the ip address. Several tries are done to find this configuration file name: if '''&amp;lt;dist&amp;gt;''' is '''fedora-8-i386-minimal''', then first guest will be &amp;lt;code&amp;gt;/etc/vz/dists/fedora-8-i386-minimal.conf&amp;lt;/code&amp;gt;, second will be &amp;lt;code&amp;gt;/etc/vz/dists/fedora-8-i386.conf&amp;lt;/code&amp;gt;, third &amp;lt;code&amp;gt;/etc/vz/dists/fedora-8.conf&amp;lt;/code&amp;gt;, and finally &amp;lt;code&amp;gt;/etc/vz/dists/fedora.conf&amp;lt;/code&amp;gt;. If not found, the &amp;lt;code&amp;gt;/etc/vz/dists/default.conf&amp;lt;/code&amp;gt; will be used.&lt;br /&gt;
&lt;br /&gt;
The other important line in the file &amp;lt;code&amp;gt;/etc/vz/vz.conf&amp;lt;/code&amp;gt; is '''CONFIGFILE=&amp;quot;&amp;lt;parameters&amp;gt;&amp;quot;'''. It provides the name of the VE parameters file: &amp;lt;code&amp;gt;/etc/vz/conf/ve-&amp;lt;parameters&amp;gt;.conf-sample&amp;lt;/code&amp;gt;, for example: &amp;lt;code&amp;gt;/etc/vz/conf/ve-light.conf-sample&amp;lt;/code&amp;gt;. During VE creation, a copy of this file will be done with the '''&amp;lt;ve_id&amp;gt;''', for example &amp;lt;ve_id&amp;gt;=123: &amp;lt;code&amp;gt;/etc/vz/conf/123.conf&amp;lt;/code&amp;gt;. Whenever a parameter is changed for this VE ('''vzctl set &amp;lt;ve_id&amp;gt; --parameter newValue --save'''), '''parameter=&amp;quot;newValue&amp;quot;''' is saved in &amp;lt;code&amp;gt;/etc/vz/conf/&amp;lt;ve_id&amp;gt;.conf&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Once those three files are correctly set, creating a new VE is just the command: '''vzctl create &amp;lt;ve_id&amp;gt;'''.&lt;/div&gt;</summary>
		<author><name>Jmelyn</name></author>
		
	</entry>
</feed>