Professional Documents
Culture Documents
Creating Zone in
Solaris 11
Prepared By
F. Mohaideen Abdul Kader
The zone is installed now. Check the status of the installed zone:
root@testlab:~# zoneadm list -icv
ID NAME
STATUS PATH
0 global
running /
- zone01
installed /rpool/zone01
BRAND IP
solaris shared
solaris excl
You can also check the file systems that are created under /rpool/zone01 for the zone01.
root@testlab:~# zfs list |grep zone
rpool/zone01
414M 4.50G 32K /rpool/zone01
rpool/zone01/rpool
414M 4.50G 31K /rpool
rpool/zone01/rpool/ROOT
414M 4.50G 31K legacy
rpool/zone01/rpool/ROOT/solaris
414M 4.50G 390M /rpool/zone01/root
rpool/zone01/rpool/ROOT/solaris/var 24.3M 4.50G 23.7M /rpool/zone01/root/var
rpool/zone01/rpool/VARSHARE
31K 4.50G 31K /var/share
rpool/zone01/rpool/export
62K 4.50G 31K /export
rpool/zone01/rpool/export/home
31K 4.50G 31K /export/home
The ZFS dataset used to create the zones gives us the ability to clone the zones.
Booting the zone
Now the final step is to boot the configured, installed zone and configure the zone using the System
Configuration Tool (SCI).
root@testlab:~# zoneadm -z zone01 boot
root@testlab:~# zlogin -C zone01
[Connected to zone 'zone01' console]
The system configuration tool starts after you press enter. Use ESC + 2 to navigate through the next
screens.
Set the hostname for the zone as zone01 and mode of network configuration as manual.
On the next screen give the IP address to the NIC card net0 and a netmask.
We will not configure any DNS service so select Do not configure DNS.
On the next screens set the time zone according to your location.
Now set the root password. Also if you want any user to be created, you can do it on this screen.
After this the system will get configured. No need to login as its the console login of the zone. Use ~.
to come out of the console.
Check the status of the zone01 from the global zone. It should be running now.
root@testlab:~# zoneadm list -icv
ID NAME
STATUS PATH
BRAND IP
0 global
running /
solaris shared
1 zone01
running /rpool/zone01
solaris excl
If you check dladm, you would see a virtual NIC created:
root@testlab:~# dladm show-link
LINK
CLASS MTU STATE OVER
net0
phys 1500 up
-zone01/net0
vnic 1500 up
net0
Now login to the zone
root@testlab:~# zlogin zone01
[Connected to zone 'zone01' pts/3]
Oracle Corporation SunOS 5.11 11.1 September 2012
root@zone01:~# uname -a
SunOS zone01 5.11 11.1 i86pc i386 i86pc
Check the network settings:
root@zone01:~# dladm show-link
LINK
CLASS MTU STATE OVER
net0
vnic 1500 up
?
root@zone01:~# ipadm show-addr
ADDROBJ
TYPE STATE
ADDR
lo0/v4
static ok
127.0.0.1/8
net0/v4
static ok
192.168.1.25/24
lo0/v6
static ok
::1/128
net0/v6
addrconf ok
fe80::8:20ff:fe89:4b7c/10
root@zone01:~# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
net0: flags=1000843 mtu 1500 index 2
inet 192.168.1.25 netmask ffffff00 broadcast 192.168.1.255
ether 2:8:20:89:4b:7c
lo0: flags=2002000849 mtu 8252 index 1
inet6 ::1/128
net0: flags=20002004841 mtu 1500 index 2
inet6 fe80::8:20ff:fe89:4b7c/10
ether 2:8:20:89:4b:7c
If you check zfs list, you would only see zfs dataset assigned to zone and not the global file system.
root@zone01:~# zfs list
NAME
USED AVAIL REFER MOUNTPOINT
rpool
441M 4.48G 31K /rpool
rpool/ROOT
441M 4.48G 31K legacy
rpool/ROOT/solaris
441M 4.48G 416M /
rpool/ROOT/solaris/var 24.4M 4.48G 23.8M /var
rpool/VARSHARE
39K 4.48G 39K /var/share
rpool/export
63K 4.48G 32K /export
rpool/export/home
31K 4.48G 31K /export/home
To check the complete configuration details of the zone from non-global zone:
root@testlab:~# zonecfg -z zone01 info
zonename: zone01
zonepath: /rpool/zone01
brand: solaris
autoboot: true
bootargs: -m verbose
file-mac-profile:
pool:
limitpriv:
scheduling-class:
ip-type: exclusive
hostid:
fs-allowed:
anet:
linkname: net0
lower-link: auto
allowed-address not specified
configure-allowed-address: true
defrouter not specified
allowed-dhcp-cids not specified
link-protection: mac-nospoof
mac-address: random
auto-mac-address: 2:8:20:89:4b:7c
mac-prefix not specified
mac-slot not specified
vlan-id not specified
priority not specified
rxrings not specified
txrings not specified
mtu not specified
maxbw not specified
rxfanout not specified
vsi-typeid not specified
vsi-vers not specified