|
Re: Howto create a desired distro template? [message #23586 is a reply to message #23577] |
Tue, 20 November 2007 16:11  |
|
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
|
|
|