From the point of view of Linux administrator Solaris zones can be compared with Linux's both vserver and xen.
Exist two kinds of zones: global and non-global.
# zonecfg -z test-zone
If you are configuring this zone for the first time, the following system message will appear:
test-zone: No such zone configured
Use 'create' to begin configuring a new zone.
Create the configuration for the test-zone by issuing the create command at the zone prompt:
#zonecfg:test-zone> create
Set the zone path to, for example, /export/home/test-zone:
#zonecfg:test-zone> set zonepath=/export/home/test-zone
Set the value of the autoboot property so that the zone is automatically booted when the global zone is booted.
#zonecfg:test-zone> set autoboot=true
Add the virtual network interface to the zone test-zone.Start setting up the interface with the following command:
#zonecfg:test-zone> add net
Assign the IP address 192.168.1.11 to the network interface.
#zonecfg:test-zone:net> set address=192.168.1.11
Set the physical device type for the network interface, such as pcn0.
#zonecfg:test-zone:net> set physical=pcn0
End this specification for the resource net:
#zonecfg:test-zone:net> end
The prompt returns back to the zone level:
#zonecfg:test-zone>
Exit the zonecfg command:
#zonecfg:test-zone> exit
At this stage we our zone configured.
Now we can install it:
#zoneadm -z test-zone install
To make zone up and running:
#zoneadm -z test-zone boot
To login to zone:
#zlogin test-zone
Exist two kinds of zones: global and non-global.
- global - have access to all hardware resources, this zone is used for system wide administration.
- non-global - shares operation under the Solaris kernel booted from the global zone, not aware of physical device paths, and not aware of the existence of other zones, no zone (including itself) can be managed from this zone.
# zonecfg -z test-zone
If you are configuring this zone for the first time, the following system message will appear:
test-zone: No such zone configured
Use 'create' to begin configuring a new zone.
Create the configuration for the test-zone by issuing the create command at the zone prompt:
#zonecfg:test-zone> create
Set the zone path to, for example, /export/home/test-zone:
#zonecfg:test-zone> set zonepath=/export/home/test-zone
Set the value of the autoboot property so that the zone is automatically booted when the global zone is booted.
#zonecfg:test-zone> set autoboot=true
Add the virtual network interface to the zone test-zone.Start setting up the interface with the following command:
#zonecfg:test-zone> add net
Assign the IP address 192.168.1.11 to the network interface.
#zonecfg:test-zone:net> set address=192.168.1.11
Set the physical device type for the network interface, such as pcn0.
#zonecfg:test-zone:net> set physical=pcn0
End this specification for the resource net:
#zonecfg:test-zone:net> end
The prompt returns back to the zone level:
#zonecfg:test-zone>
Exit the zonecfg command:
#zonecfg:test-zone> exit
At this stage we our zone configured.
Now we can install it:
#zoneadm -z test-zone install
To make zone up and running:
#zoneadm -z test-zone boot
To login to zone:
#zlogin test-zone
Comments