<?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=Anthony</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=Anthony"/>
	<link rel="alternate" type="text/html" href="https://wiki.openvz.org/Special:Contributions/Anthony"/>
	<updated>2026-05-15T16:23:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=OS_template_cache_preparation&amp;diff=2850</id>
		<title>OS template cache preparation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=OS_template_cache_preparation&amp;diff=2850"/>
		<updated>2007-03-15T06:42:21Z</updated>

		<summary type="html">&lt;p&gt;Anthony: OS should be uppercase&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the procedure of an OS template cache creation.  It assumes you already have OpenVZ installed and running. The steps needed to achieve it are documented in the [[Quick installation]] document.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
Please make sure you understand these terms:&lt;br /&gt;
&lt;br /&gt;
* [[OS template]]&lt;br /&gt;
* [[OS template metadata]]&lt;br /&gt;
* [[OS template cache]]&lt;br /&gt;
&lt;br /&gt;
== Creating an OS template cache ==&lt;br /&gt;
You can create an [[OS template cache]] using template utilities and [[OS template metadata]] right on your [[hardware node]]. The process is automated and will take from about 10 minutes to a few hours, depending on the network speed, and the result will be most up-to-date template cache.&lt;br /&gt;
&lt;br /&gt;
=== Installing template utilities ===&lt;br /&gt;
&lt;br /&gt;
You have to install a few packages in order to be able to create/update OS template cache(s).&lt;br /&gt;
&lt;br /&gt;
==== Using yum ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install vzpkg vzyum vzrpm43-python vzrpm44-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using rpm ====&lt;br /&gt;
Packages are available from [http://openvz.org/download/template/utils/ Download » Templates » Utilities]. You need both &amp;lt;tt&amp;gt;vzpkg&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;vzyum&amp;lt;/tt&amp;gt; packages, as well as one or both &amp;lt;tt&amp;gt;vzrpm43&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;vzrpm44&amp;lt;/tt&amp;gt; (including their &amp;lt;tt&amp;gt;-python&amp;lt;/tt&amp;gt; counterparts), depending on the OS templates being used.&lt;br /&gt;
&lt;br /&gt;
Install these utilities using rpm:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# rpm -ihv vzpkg*.rpm vzyum*.rpm vzrpm44*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Red Hat Enterprise Linux, to install &amp;lt;tt&amp;gt;vzyum&amp;lt;/tt&amp;gt; you will need &amp;lt;tt&amp;gt;[http://rpmfind.net/linux/rpm2html/search.php?query=python-elementtree&amp;amp;system=redhat python-elementtree]&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[http://rpmfind.net/linux/rpm2html/search.php?query=python-sqlite&amp;amp;system=redhat python-sqlite]&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;[http://rpmfind.net/linux/rpm2html/search.php?query=python-urlgrabber&amp;amp;system=redhat python-urlgrabber]&amp;lt;/tt&amp;gt;. These packages might have dependencies of their own. For example, &amp;lt;tt&amp;gt;python-sqlite&amp;lt;/tt&amp;gt; needs &amp;lt;tt&amp;gt;[http://rpmfind.net/linux/rpm2html/search.php?query=sqlite&amp;amp;system=redhat sqlite]&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Installing OS template metadata ===&lt;br /&gt;
&lt;br /&gt;
To create an [[OS template cache]], you need to get the [[OS template metadata|metadata]] for the chosen OS template(s).&lt;br /&gt;
&lt;br /&gt;
==== Using yum ====&lt;br /&gt;
To see which templates are available, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum search vztmpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To install some of the templates, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install vztmpl-XXX [...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using rpm ====&lt;br /&gt;
Get the chosen &amp;lt;tt&amp;gt;vztmpl-*&amp;lt;/tt&amp;gt; packages from [http://openvz.org/download/template/metadata/ Downloads » Templates » Metadata] (or directly from [http://download.openvz.org/template/metadata/ download.openvz.org/template/metadata] or one of the [[Download mirrors|mirrors]] and install them:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# rpm -ihv vztmpl-*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing repository cache (optional) ===&lt;br /&gt;
&lt;br /&gt;
Optionally, you may want to get a snapshot of the local copy of the package repository for the chosen OS template(s). This is not required but might speed up the initial OS template cache creation considerably. The tarballs are available from [http://openvz.org/download/template/repocache/ Downloads » Templates » Repo Cache]; download and untar them to the &amp;lt;tt&amp;gt;/vz/template&amp;lt;/tt&amp;gt; directory on your OpenVZ [[Hardware Node]]. If you choose to skip this step, all the needed files will be downloaded from the Internet automatically when needed.&lt;br /&gt;
&lt;br /&gt;
Note - The cache may be out of date meaning you end up downloading them all again anyway.&lt;br /&gt;
&lt;br /&gt;
=== Running &amp;lt;tt&amp;gt;vzpkgcache&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run the &amp;lt;tt&amp;gt;vzpkgcache&amp;lt;/tt&amp;gt; utility; see the vzpkgcache(8) man page for details. It will create or update the caches of all the templates for which the corresponding metadata exist.&lt;br /&gt;
&lt;br /&gt;
 # vzpkgcache centos-4-i386-minimal&lt;br /&gt;
&lt;br /&gt;
== Alternative: use precreated template cache ==&lt;br /&gt;
&lt;br /&gt;
As an alternative to creating a cache using template metadata, you can use precreated template cache taken from [http://openvz.org/download/template/cache Downloads » Templates » Precreated], or directly from [http://download.openvz.org/template/precreated/ download.openvz.org/template/precreated], or from one of the [[Download mirrors|mirrors]].&lt;br /&gt;
&lt;br /&gt;
However, this option is not recommended for production systems since without installing template metadata you will not be able to update your template cache.&lt;br /&gt;
&lt;br /&gt;
In order to use precreated template cache files, download files for chosen OS distributions and place them as-is (no unpacking needed) to the &amp;lt;tt&amp;gt;/vz/template/cache&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you use precreated CentOS-4 templates and wish to install software using vzyum, you will probably run into error like this:&lt;br /&gt;
&lt;br /&gt;
 [root@localhost tmp]# vzyum MYVPSID install mypackage&lt;br /&gt;
 [root@localhost tmp]# ERROR: No such OS template: install&lt;br /&gt;
&lt;br /&gt;
This might apply to Fedora also. To fix this problem, install the appropriate [[OS template metadata]] on the OpenVZ host, for example&lt;br /&gt;
&lt;br /&gt;
 yum install vztmpl-centos-4&lt;br /&gt;
&lt;br /&gt;
== Next step ==&lt;br /&gt;
&lt;br /&gt;
Follow on to the [[VE creation]] article.&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Templates]]&lt;/div&gt;</summary>
		<author><name>Anthony</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=Basic_operations_in_OpenVZ_environment&amp;diff=2849</id>
		<title>Basic operations in OpenVZ environment</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=Basic_operations_in_OpenVZ_environment&amp;diff=2849"/>
		<updated>2007-03-15T06:19:48Z</updated>

		<summary type="html">&lt;p&gt;Anthony: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article assumes you have already [[Quick installation|installed OpenVZ]] and prepared the [[OS template cache]](s). If not, follow the links to perform the steps needed.&lt;br /&gt;
&lt;br /&gt;
To create and start a [[VE]], run the following commands:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[host-node]# vzctl create VEID --ostemplate osname&lt;br /&gt;
[host-node]# vzctl set VEID --ipadd a.b.c.d --save&lt;br /&gt;
[host-node]# vzctl start VEID&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here &amp;lt;tt&amp;gt;VEID&amp;lt;/tt&amp;gt; is the numeric ID for the VE; &amp;lt;tt&amp;gt;osname&amp;lt;/tt&amp;gt; is the name of the OS template for the VE, and &amp;lt;tt&amp;gt;a.b.c.d&amp;lt;/tt&amp;gt; is the IP address to be assigned to the VE.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[host-node]# vzctl create 101 --ostemplate fedora-core-5-minimal&lt;br /&gt;
[host-node]# vzctl set 101 --ipadd 10.1.2.3 --save&lt;br /&gt;
[host-node]# vzctl start 101&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your freshly-created VE should be up and running now; you can see its processes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[host-node]# vzctl exec VEID ps ax&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To enter VE give the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[host-node]# vzctl enter VEID&lt;br /&gt;
entered into VPS VEID&lt;br /&gt;
[ve]#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To exit from VE, just type &amp;lt;code&amp;gt;exit&amp;lt;/code&amp;gt; and press enter:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[ve]# exit&lt;br /&gt;
exited from VPS VEID&lt;br /&gt;
&lt;br /&gt;
[host-node]#&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To stop VE:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[host-node]# vzctl stop VEID&lt;br /&gt;
Stopping VPS ...&lt;br /&gt;
VPS was stopped&lt;br /&gt;
VPS is unmounted&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And to destroy VE:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[host-node]# vzctl destroy VEID&lt;br /&gt;
Destroying VPS private area: /vz/private/VEID&lt;br /&gt;
VPS private area was destroyed&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, when you know how to manage your [[VE]], learn about [[Resource management]].&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: HOWTO]]&lt;/div&gt;</summary>
		<author><name>Anthony</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.openvz.org/index.php?title=OS_template_cache_preparation&amp;diff=2848</id>
		<title>OS template cache preparation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openvz.org/index.php?title=OS_template_cache_preparation&amp;diff=2848"/>
		<updated>2007-03-15T06:17:23Z</updated>

		<summary type="html">&lt;p&gt;Anthony: corrected typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This article describes the procedure of an OS template cache creation.  It assumes you already have OpenVZ installed and running. The steps needed to achieve it are documented in the [[Quick installation]] document.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
Please make sure you understand these terms:&lt;br /&gt;
&lt;br /&gt;
* [[OS template]]&lt;br /&gt;
* [[OS template metadata]]&lt;br /&gt;
* [[OS template cache]]&lt;br /&gt;
&lt;br /&gt;
== Creating an OS template cache ==&lt;br /&gt;
You can create an [[OS template cache]] using template utilities and [[OS template metadata]] right on your [[hardware node]]. The process is automated and will take from about 10 minutes to a few hours, depending on the network speed, and the result will be most up-to-date template cache.&lt;br /&gt;
&lt;br /&gt;
=== Installing template utilities ===&lt;br /&gt;
&lt;br /&gt;
You have to install a few packages in order to be able to create/update OS template cache(s).&lt;br /&gt;
&lt;br /&gt;
==== Using yum ====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install vzpkg vzyum vzrpm43-python vzrpm44-python&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using rpm ====&lt;br /&gt;
Packages are available from [http://openvz.org/download/template/utils/ Download » Templates » Utilities]. You need both &amp;lt;tt&amp;gt;vzpkg&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;vzyum&amp;lt;/tt&amp;gt; packages, as well as one or both &amp;lt;tt&amp;gt;vzrpm43&amp;lt;/tt&amp;gt;/&amp;lt;tt&amp;gt;vzrpm44&amp;lt;/tt&amp;gt; (including their &amp;lt;tt&amp;gt;-python&amp;lt;/tt&amp;gt; counterparts), depending on the OS templates being used.&lt;br /&gt;
&lt;br /&gt;
Install these utilities using rpm:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# rpm -ihv vzpkg*.rpm vzyum*.rpm vzrpm44*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In Red Hat Enterprise Linux, to install &amp;lt;tt&amp;gt;vzyum&amp;lt;/tt&amp;gt; you will need &amp;lt;tt&amp;gt;[http://rpmfind.net/linux/rpm2html/search.php?query=python-elementtree&amp;amp;system=redhat python-elementtree]&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;[http://rpmfind.net/linux/rpm2html/search.php?query=python-sqlite&amp;amp;system=redhat python-sqlite]&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;[http://rpmfind.net/linux/rpm2html/search.php?query=python-urlgrabber&amp;amp;system=redhat python-urlgrabber]&amp;lt;/tt&amp;gt;. These packages might have dependencies of their own. For example, &amp;lt;tt&amp;gt;python-sqlite&amp;lt;/tt&amp;gt; needs &amp;lt;tt&amp;gt;[http://rpmfind.net/linux/rpm2html/search.php?query=sqlite&amp;amp;system=redhat sqlite]&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Installing OS template metadata ===&lt;br /&gt;
&lt;br /&gt;
To create an [[OS template cache]], you need to get the [[OS template metadata|metadata]] for the chosen OS template(s).&lt;br /&gt;
&lt;br /&gt;
==== Using yum ====&lt;br /&gt;
To see which templates are available, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum search vztmpl&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To install some of the templates, run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# yum install vztmpl-XXX [...]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Using rpm ====&lt;br /&gt;
Get the chosen &amp;lt;tt&amp;gt;vztmpl-*&amp;lt;/tt&amp;gt; packages from [http://openvz.org/download/template/metadata/ Downloads » Templates » Metadata] (or directly from [http://download.openvz.org/template/metadata/ download.openvz.org/template/metadata] or one of the [[Download mirrors|mirrors]] and install them:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# rpm -ihv vztmpl-*.rpm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing repository cache (optional) ===&lt;br /&gt;
&lt;br /&gt;
Optionally, you may want to get a snapshot of the local copy of the package repository for the chosen OS template(s). This is not required but might speed up the initial OS template cache creation considerably. The tarballs are available from [http://openvz.org/download/template/repocache/ Downloads » Templates » Repo Cache]; download and untar them to the &amp;lt;tt&amp;gt;/vz/template&amp;lt;/tt&amp;gt; directory on your OpenVZ [[Hardware Node]]. If you choose to skip this step, all the needed files will be downloaded from the Internet automatically when needed.&lt;br /&gt;
&lt;br /&gt;
Note - The cache may be out of date meaning you end up downloading them all again anyway.&lt;br /&gt;
&lt;br /&gt;
=== Running &amp;lt;tt&amp;gt;vzpkgcache&amp;lt;/tt&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Run the &amp;lt;tt&amp;gt;vzpkgcache&amp;lt;/tt&amp;gt; utility; see the vzpkgcache(8) man page for details. It will create or update the caches of all the templates for which the corresponding metadata exist.&lt;br /&gt;
&lt;br /&gt;
 # vzpkgcache centos-4-i386-minimal&lt;br /&gt;
&lt;br /&gt;
== Alternative: use precreated template cache ==&lt;br /&gt;
&lt;br /&gt;
As an alternative to creating a cache using template metadata, you can use precreated template cache taken from [http://openvz.org/download/template/cache Downloads » Templates » Precreated], or directly from [http://download.openvz.org/template/precreated/ download.openvz.org/template/precreated], or from one of the [[Download mirrors|mirrors]].&lt;br /&gt;
&lt;br /&gt;
However, this option is not recommended for production systems since without installing template metadata you will not be able to update your template cache.&lt;br /&gt;
&lt;br /&gt;
In order to use precreated template cache files, download files for chosen OS distributions and place them as-is (no unpacking needed) to the &amp;lt;tt&amp;gt;/vz/template/cache&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you use precreated CentOS-4 templates and wish to install software using vzyum, you will probably run into error like this:&lt;br /&gt;
&lt;br /&gt;
 [root@localhost tmp]# vzyum MYVPSID install mypackage&lt;br /&gt;
 [root@localhost tmp]# ERROR: No such OS template: install&lt;br /&gt;
&lt;br /&gt;
This might apply to Fedora also. To fix this problem, install the appropriate os template metadata on the OpenVZ host, for example&lt;br /&gt;
&lt;br /&gt;
 yum install vztmpl-centos-4&lt;br /&gt;
&lt;br /&gt;
== Next step ==&lt;br /&gt;
&lt;br /&gt;
Follow on to the [[VE creation]] article.&lt;br /&gt;
&lt;br /&gt;
[[Category: Installation]]&lt;br /&gt;
[[Category: Templates]]&lt;/div&gt;</summary>
		<author><name>Anthony</name></author>
		
	</entry>
</feed>