Is there a howto that describes how to create metadata for a distribution? Looking through an existing template, it appears as though everything is available through existing yum repositories with the exception of the packages in the /vz-addons directory and the scripts in the config directory. Could these be produced for any rpm-based distribution? If so, are there any hints on how to create these?
Yup, this could be done for any rpm-based distro which has yum repositories (in newer yum format). Basically you start from one of existing template metadata package, modifying things such as lists of package repos, lists of packages, pre- and post-install scripts and all the other things. Trial and error, finally you will reach the destination and have your own template. If you will succeed, please let us know and we will put your template to contrib area.
After looking through the various directories in /vz/templates I decided to begin with CentOS 5.0 as it's hopefully closer to CentOS 4.x than something like SLES. I essentially duplicated everything from the CentOS 4.x directories with the exception of: 1. changed the yum.conf to reflect the CentOS 5 repositories 2. updated the GPG keys for CentOS 5 3. updated the yum-cache directories from the CentOS 5 repodata While trying to build a minimal template I get an error: Processing Conflict: initscripts conflicts kernel < 2.6.12 which stops the process. Is it impossible to build a CentOS 5 image on a CentOS 4.x system or do I need to upgrade the kernel to get this to work (I'm using the 2.6.9 kernel on RHEL 4.4)? Also, is template metadata sort of like documentation that no one wants to do while exciting kernel development awaits? It just seems like you see lots of VMWare and Xen images out there, but not OpenVZ. I happen to think that your metadata install is a much better way to create a template and have control over it right on the host node instead of relying on transferring a multi-hundred megabyte file over the Internet and hoping it all gets there intact, however, if it's not available or difficult to create perhaps it's better to create templates using methods like the one's outlined by sspt in this forum.