Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now it is enabled, configure the first zone to test the result. Here we do not explain step by step configuring of a non-global zone, it was described here, just do it:

Code Block
lenovo# zonecfg -z zone01
zone01: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:zone01> create
zonecfg:zone01> set zonename=zone01
zonecfg:zone01> set zone           
set zonename=  set zonepath=  
zonecfg:zone01> set zonepath=/zones/zone01
zonecfg:zone01> set autoboot=false
zonecfg:zone01> set ip-type=exclusive
zonecfg:zone01> add net              
zonecfg:zone01:net> set physical=iz0
zonecfg:zone01:net> set global-nic=vsw0
zonecfg:zone01:net> add property (name=ip,value="10.68.0.2")
zonecfg:zone01:net> add property (name=gateway,value="10.68.0.1")
zonecfg:zone01:net> add property (name=netmask,value="255.255.255.0")
zonecfg:zone01:net> add property (name=primary,value="true")         
zonecfg:zone01:net> end                                     
zonecfg:zone01> add attr
zonecfg:zone01:attr> set name=resolvers
zonecfg:zone01:attr> set type=string
zonecfg:zone01:attr> set value=192.168.0.1
zonecfg:zone01:attr> end                  
zonecfg:zone01> verify  
zonecfg:zone01> commit
zonecfg:zone01> exit  

The only I would like to comment here is the lines 12-15.

In line 12 we specified a physical VNIC which will be created at zone boot time over the global nic vsw0 (line13), instead of a global nic we specified an etherstub (virtual switch), in line 14 we assign an IP-address from our internal private network. As we remember from the previous step, we configured first IP-address on the interface int0 to forward the traffic from our zones. In line 15 we use the int0 as the default gateway. In line 22 I specified an IP-address of name server (external for the host, it could be google’s public addresses: 8.8.8.8, 8.8.4.4).

Install and boot the zone:

Code Block
lenovo# zoneadm -z zone01 install
A ZFS file system has been created for this zone.
       Image: Preparing at /zones/zone01/root.
  Installing: Packages (output follows)

/* cut the logs */

 Postinstall: Copying SMF seed repository ... done.
 Postinstall: Applying workarounds.
        Done: Installation completed in 62 seconds.

  Next Steps: Boot the zone, then log into the zone console (zlogin -C)
              to complete the configuration process.
lenovo#

Boot it:

Code Block
lenovo# zoneadm -z zone01 boot
zone 'zone01': /zones/zone01/root
lenovo#