Zones unter opensolaris

Zone mit dem Namen test anlegen:

root@dione:~$ zonecfg -z test
test: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:test> create
zonecfg:test> set zonepath=/zones/test
zonecfg:test> set autoboot=true
zonecfg:test> add net
zonecfg:test:net> set address=192.168.0.12
zonecfg:test:net> set physical=rge0
zonecfg:test:net> end
zonecfg:test> add dataset
zonecfg:test:dataset> set name=data/zones/test/DATA
zonecfg:test:dataset> end
zonecfg:test> verify
zonecfg:test> commit
zonecfg:test> exit

Konfigurierte Zone anzeigen:

root@dione:~$ zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   - test             configured /zones/test                    ipkg     shared

Zoneverzeichnis und Dataset anlegen:

root@dione:~$ zfs create data/zones/test
root@dione:~$ zfs create -o mountpoint=legacy data/zones/test/DATA
root@dione:~$ chmod 700 /zones/test

Zone installieren:

root@dione:~$ zoneadm -z test install
  Authority: Using http://pkg.opensolaris.org/release/.
      Image: Preparing at /zones/test1/root ... done.
      Cache: Using /var/pkg/download.
 Installing: (output follows)

Zone booten:

root@dione:~$ zoneadm -z test boot & zlogin -C test