[Users] openvz and SuSE

Kir Kolyshkin kir at openvz.org
Fri Feb 3 04:20:29 EST 2006


Daniel Bauer wrote:

> From: "Kir Kolyshkin" <kir at openvz.org>
>
>> Daniel Bauer wrote:
>>
>>> ok, that sounds good, I'll have a try with SuSE.
>>
> Is there a howto for creating templates, or should I start with 
> building the directory tree by myself?

No, there is no formal howto, but somehow people manage to find out all 
the details. It is probably not that hard, and there are two approaches:

(A)
Currently our template tools can use yum-enabled repositories, so the 
way to go is:
1. Take yum-enabled repo (or create one from a bunch of RPMS using 
createrepo).
2. Take one of the existing OS templates metadata and find out what is it.
3. Create a metadata for your OS template, based on the above.
4. Run vzpkgcache to create a template cache.

(B)
Alternative approach is just to install a set of packages into chrooted 
environment (in RPM world you use 'rpm -i --root' for that, in Debian 
world you use 'debootstrap'), then do some fine tuning and finally tar 
this environment. The final tarball can be placed to /vz/template/cache 
and used as a template. Basically, you need to install some basic stuff 
- system libraries, init scripts, useful binaries etc.

> Why is the stuff double in private and root, I thougt that the root is 
> only the mounted stuff from private?

It is not doubled. You can think of it as a bind mount (although it's a 
bit more than that).
Private is a source for mount (i.e. what we mount), while root is a 
mountpoint (i.e. where we mount it).


More information about the Users mailing list