Page 1 of 1

Modify Sun Solaris non-global zone configurations

Posted: Tue Apr 06, 2010 1:45 pm
by cah
I will use the address as an example to modify the value.

First, become root user.

Check existing information:

Code: Select all

% zonecfg -z testzone
zonecfg:testzone> info
zonename: testzone
zonepath: /export/home/zones/testzone
brand: native
autoboot: true
bootargs: 
pool: 
limitpriv: 
scheduling-class: 
ip-type: shared
inherit-pkg-dir:
        dir: /lib
inherit-pkg-dir:
        dir: /platform
inherit-pkg-dir:
        dir: /sbin
inherit-pkg-dir:
        dir: /usr
inherit-pkg-dir:
        dir: /opt/sfw
net:
        address: 192.168.1.238
        physical: vfe0
attr:
        name: comment
        type: string
        value: "This is a test non-global configuration."
Select which variable to change. Notice, it is very important to specify EXACT value including spaces, commas to successfully select the right variable. Otherwise, it will complain.

Code: Select all

zonecfg:gt_zone> select net address=192.168.1.238
zonecfg:gt_zone:net> info
net:
        address: 192.168.1.238
        physical: vfe0
Set new value for the variable:

Code: Select all

zonecfg:gt_zone:net> set address=192.168.0.238
Check new configuration information:

Code: Select all

zonecfg:gt_zone:net> info
net:
        address: 192.168.0.238
        physical: vfe0
Exit from current level to non-global zone level:

Code: Select all

zonecfg:gt_zone:net> end
Verify new configurations:

Code: Select all

zonecfg:gt_zone> verify
Commit the new changes:

Code: Select all

zonecfg:gt_zone> commit
Exit from non-global zone configuration:

Code: Select all

zonecfg:gt_zone> exit