Changes

Jump to: navigation, search

OS template cache preparation

1,093 bytes removed, 06:27, 23 October 2011
m
Protected "OS template cache preparation": Excessive vandalism ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite))
This article describes the procedure of an OS template cache creationpreparation. It assumes you already have OpenVZ installed and running. The steps needed to achieve it are documented in the [[Quick installation]] document. == Precreated templates == Use precreated templates 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]]. Precreated templates can be easily updated using the following algorithm:# create temporary [[container]] based on template# update [[container]] using OS-specific tools (yum, apt or similar)# pack [[container]] as a new templateExamples of this procedure are described in details at [[Updating Ubuntu template]], [[Updating Debian template]], [[Fedora template update]] In order to use precreated template cache files, download files for chosen OS distributions and place them as-is (no unpacking needed) to the <tt>/vz/template/cache</tt> directory (for Debian/Ubuntu it might be <tt>/var/lib/vz/template/cache</tt>). == Next step == Follow on to the [[container creation]] article. = Obsoleted: use template tools = {{Warning|The rest of this document is obsoleted and is kept here for historical purposes only. Template utilities (vzpkg/vzyum) are no longer supported. Use [[Download/template/precreated|precreated templates]].}}
== Terminology ==
# vzpkgcache centos-4-i386-minimal
== Alternative: use precreated template cache ==
 
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]].
 
Precreated templates can be easily updated using the following algorithm:
# create temporary [[container]] based on template
# update [[container]] using OS-specific tools (yum, apt or similar)
# pack [[container]] as a new template
Examples of this procedure are described in details at [[Updating Ubuntu template]], [[Updating Debian template]], [[Fedora template update]]
 
In order to use precreated template cache files, download files for chosen OS distributions and place them as-is (no unpacking needed) to the <tt>/vz/template/cache</tt> directory.
 
'''NOTE:''' On Ubuntu and probably recent Debian distros, the path is <tt>/var/lib/vz/template/cache</tt> if you installed OpenVZ from the repositories.
 
'''NOTE:''' If you use precreated CentOS-4 templates and wish to install software using vzyum, you will probably run into error like this:
 
[root@localhost tmp]# vzyum CTID install mypackage
[root@localhost tmp]# ERROR: No such OS template: install
 
This might apply to Fedora also. To fix this problem, install the appropriate [[OS template metadata]] on the OpenVZ host, for example
 
yum install vztmpl-centos-4
 
[Unverified note] : After creating a new OSTemplate cache called "centos4-i386-[ASINGLEWORD].tar.gz from a Container (on which vzyum worked) based on centos4-i386-default.tar.gz, vzyum failed to work (showing "No such OS template: install").
 
Here is the "solution" I worked out :
The new OSTemplate should be named "centos4-i386-[ASINGLEWORD].tar.gz", and in /vz/template/centos/4/i386/config you should copy the default.list to [ASINGLEWORD].list. vzyum then works (for me!). I have tried to verify this by creating templates with [MULTIPLEWORDS], which fail, and by creating templates without a corresponding [ASINGLEWORLD].conf file, which also fail - indicating that using a single word seems to be important (no hyphens etc). Good luck.
 
== Next step ==
 
Follow on to the [[container creation]] article.
[[Category: Installation]]
[[Category: Templates]]

Navigation menu