Customizing templates [message #22903] |
Wed, 07 November 2007 09:33 |
tauren
Messages: 7 Registered: November 2007
|
Junior Member |
|
|
I'm a newbie here and am slightly confused with building custom templates. I've been reading the wiki, manual, and forum all day but haven't found the answers I seek. Maybe I missed them, or maybe I'm not understanding something fundamental, but I could use help.
I have created a FC6 HN and would like to install multiple identical FC6 VEs into it. I've already got fedora-core-6-i386-minimal and fedora-core-6-i386-default up and running.
However, what I really want is an easy way to create custom VEs without having to manually customize it each time I create one. I need to add several packages to each VE I create. I also need to make several customizations to configuration files for every VE.
I can add packages by going into the VE and running "yum install whatever". Or I could use vzyum from the HN. I can edit the config files within the VE. But once I've created a "custom" VE, how do I then take that VE and turn it into a template? It seems like this would be a very common request, but the solution eludes me.
I've discovered that I can customize the RPM list that is in a template. I copied minimal.list to custom.list and then added several rpms to it. Then I ran vzpkgcache on it.
[root@pyrite /]# cd /vz/template/fedora-core/6/i386/config
[root@pyrite config]# cp minimal.list custom.list
[root@pyrite config]# vi custom.list
[root@pyrite config]# vzpkgcache fedora-core-6-custom
Is that the best way to customize the RPMs that are included in a template? It seems like a good solution, but is this the recommended way?
But then what about the configuration changes I want to make? Is the best solution to edit install-post, install-pre, and update-post with commands to make the appropriate edits? What if I only want those edits for the custom template, not minimal or default?
And making the scripts to do all those edits could be time consuming. Is there a simpler way to just create a VE, manually make the edits, and then use that VE to create a template? But I do want a template that can be updated. This is what I'm trying to figure out.
Thanks!
Tauren
|
|
|