Modify Sun Solaris non-global zone configurations
Posted: Tue Apr 06, 2010 1:45 pm
I will use the address as an example to modify the value.
First, become root user.
Check existing information:
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.
Set new value for the variable:
Check new configuration information:
Exit from current level to non-global zone level:
Verify new configurations:
Commit the new changes:
Exit from non-global zone configuration:
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."
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
Code: Select all
zonecfg:gt_zone:net> set address=192.168.0.238
Code: Select all
zonecfg:gt_zone:net> info
net:
address: 192.168.0.238
physical: vfe0
Code: Select all
zonecfg:gt_zone:net> end
Code: Select all
zonecfg:gt_zone> verify
Code: Select all
zonecfg:gt_zone> commit
Code: Select all
zonecfg:gt_zone> exit