On Wed 10/25/06 at 15:16 PM, Bernd.Schemmer at gmx.de wrote:
> I'm trying to create a new "brand" for zones in snv_49 to install belenix
> in a zone but without success until now.

Very cool.  I've been hoping somebody would try this.

> I used the instructions in this message
> 
> http://www.opensolaris.org/jive/thread.jspa?threadID=5481&tstart=0
> 
> to create the brand.

I just took a look at that message, and it's sadly out of date - as you
discovered.

There is no need for a brand to provide either a SUNWblank.xml or a
SUNWdefault.xml.  It may provide a template to simplify the creation of a
new zone, but that's completely optional.

To create a template file, copy /etc/zones/SUNWlx.xml to
/etc/zones/MYbelenix.xml.  In that file, change
        brand="lx"
to
        brand="belenix"

The name of the file can be anything you want.  It doesn't have to have
anything to do with the name of the brand, although that would certainly
make sense.  You should not call it SUNWanything, though.  The SUNW prefix
indicates that the file came from Sun and is an official part of Solaris.

> In addition to the instrcutions from the message I did
> 
> - copy the SUNWblank.xml from /etc/zones

This is unnecessary.

> - changed postclone entry in config.xml also 

Fine.

> http://www.opensolaris.org/jive/thread.jspa?threadID=5483&tstart=100
> 
> It looks like the switch -B is not supported for the create command of 
> zonecfg anymore. Therefor I tried the 
> keyword "brand" with the value "privsnz".

Right.  "set brand=" has replaced "-B".  The optional template file is just
a blank zone with the "set brand=" already done for you.

> (bash):root at ferrari:/usr/lib/brand # zonecfg -z belenix -f 
> /export/install/belenix.zonecfg
> On line 9 of /export/install/belenix.zonecfg:
> belenix: unknown brand.
> 
> belenix: Invalid document
> belenix: unknown brand.
> 
> belenix: Invalid document
> Configuration not saved.

I can't tell for certain from the diff you sent, but I think you removed
the <installopts> line from the config.xml file.

The libbrand DTD requires that every field in the .xml file be present.  If
not, the config.xml file will fail to verify.  Without a valid config.xml
file, libbrand will report that the brand doesn't exist.

If I'm misreading your diff, and that line is present, then I'm stumped.
I just built the framework for a Belenix brand, and it's working fine:

mobay# diff -r /usr/lib/brand/native /usr/lib/brand/belenix
diff -r /usr/lib/brand/native/config.xml /usr/lib/brand/belenix/config.xml
34c34
< <brand name="native">
---
> <brand name="belenix">
46c46
<       <postclone>/usr/lib/brand/native/postclone %z %R</postclone>
---
>       <postclone>/usr/lib/brand/belenix/postclone %z %R</postclone>
diff -r /usr/lib/brand/native/platform.xml
/usr/lib/brand/belenix/platform.xml
34c34
< <platform name="native">
---
> <platform name="belenix">

mobay# zonecfg -z newzone
newzone: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:newzone> create
zonecfg:newzone> set brand="belenix"
zonecfg:newzone> set zonepath=/zones/newzone
zonecfg:newzone> verify
zonecfg:newzone> commit
zonecfg:newzone> exit

Nils

Reply via email to