OpenVZ Forum


Home » General » Support » Howto create a desired distro template?
Howto create a desired distro template? [message #23577] Tue, 20 November 2007 14:17 Go to next message
Fenixoid is currently offline  Fenixoid
Messages: 7
Registered: August 2007
Location: Lithuania
Junior Member

Hi,

I need to create a scientific linux 3.0.8 template, and only from this distro and it's version. Centos, as a replacement, doesn't workd for this deal.

http://wiki.openvz.org/OS_template_cache_preparation only shows, howto create templates only from metadata, and my distro isin't there.

So any ideas about this? maby there's a way, tho create a template from files in iso, or install a distro on other hdd and somehow put whole stuff in openvz's envirement? Rolling Eyes
Re: Howto create a desired distro template? [message #23586 is a reply to message #23577] Tue, 20 November 2007 16:11 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Basically a template is just a set of packages (RPMs in case of your distro) installed in a chroot'ed environment, and slightly modified so it would suit a VE better.

So you can just use something as simple as
mkdir some
rpm --initdb --root ./some
rpm -ihv --root ./some (list of rpms you want to install)

and then do some cleanups.

The tricky part here is that list. It should be something like a minimal set of packages really needed to run a system (except for the packages what are related to hardware -- those are kernel, bootloader, various drivers, USB, PCI and some other hardware-dependant tools -- you can optimize all those packages out, but their presense won't do harm), plus the packages that you want to have in a template.

When you have this set installed, do some cleanups (see http://wiki.openvz.org/Category:Templates, especially Debian template creation article for idea of what are those cleanups).

Finally, create a tarball out of the above directory, and put it into /vz/template/cache.

Then, make sure vzctl understands your distro (look into /etc/vz/dists directory to get the idea).


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: Possible Fedora 8 problem
Next Topic: Memory Error in VE starting TurboGears Project
Goto Forum:
  


Current Time: Fri Sep 19 18:35:17 GMT 2025

Total time taken to generate the page: 0.07128 seconds