[OpenIndiana-discuss] Installing zones from templates

Peter Tribble peter.tribble at gmail.com
Sun Jun 16 19:54:56 UTC 2013


On Sun, Jun 16, 2013 at 7:52 PM, Stefan Müller-Wilken <
stefan.mueller-wilken at acando.de> wrote:

> Hi Peter,
>
> >I'm currently trying to better automate zone creation. What I'm actually
> >> missing is a way to define the packages to be loaded while doing the
> >> "zoneadm install" step.
> >>
> >
> >Can't you specify the extra packages you want with the -e flag
> >to install:
> >
> >zoneadm -z zone_name install -e extra_pkg
>
> Hmmm... that might be an option but doesn't sound too elegant with dozends
> of packages.
>

So, find or create a package that depends on the packages you need and
just add that.


> What about branded zones? There is an /etc/brand/ipkg/pkgrm.conf that is
> used to remove unwanted packages after zone installation. Shouldn't there
> be a complementary pkg.conf to define the required ones?
>
> Or are there other means to define zone brands?
>

A brand is just a directory in /usr/lib/brand. It would be a bit
clumsy, but you could just clone the ipkg brand and modify
pkgcreatezone (originally in /usr/lib/brand/ipkg) to define the
package list. Or extend it so it took an argument to supply the
list of packages. (If you fiddle with arguments you need to
update installopts in config.xml as well.)

If you're looking for elegance, then all pkgcreatezone does is
have a very long list. If you're scripted, then I wouldn't see much
of a problem with dozens of packages.

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/


More information about the OpenIndiana-discuss mailing list