Create Whole Root Solaris Zone
Description:
|
|
Platform:
|
Sun
|
StateStatement abouut
Whole Zone
|
A self-contain zone makes copies
of the from the global zone of the /usr, /lib, /sbin and
/platform directories.
![]()
|
ep
|
Action
|
Description
|
|||||
1
|
User
zonecfg to configure a Inherited Pacakage Zone
|
||||||
1a
|
#
zonecfg -z selfzone
|
Start the zonecfg command with a
-z option followed by name of the zone that is to be created.
The prompt will change to zonecfg:
selfzone> and issue a response to use the create option.
|
|||||
1b
|
zonecfg:selfzone>
create -b
|
Use create
parameter with the "b" option to begin the configuration of a new
whole root zone.
Use of the "b"
option creates a blank zone as compared to a sparse zone includes lof
filesysrtems of the global zone root. You can verify the it is indeed blank
by peforming the info command
|
|||||
1c
|
zonecfg:selfzone>
set zonepath=/zones/selfzone
|
||||||
Use set zonepath
command to set up the loopback filesystem for the zone that will be built on
the global zone.
|
|||||||
1d
|
zonecfg:selfzone>
set autoboot=true
|
||||||
Use set autoboot=
to set autoboot of the zone to either true or false.
You can also set other parameters
in this section such as limitpriv, scheduling-class, and ip-type. Set Setting Other Zone Parameters. If not they will be set to the default.
|
|||||||
1e
|
zonecfg:selfzone>
add net
|
||||||
|
|||||||
1f
|
zonecfg:selfzone>
commit
|
Display the configuration with the
"info" option. Use "verify" to verify the current
configuration has all of the required properties and that a zonepath is
specified. Use "commit" to move configuration from memory to
perminent storage. Use exit
to complete the configuration and save it and exit the zonecfg
command.
This configuration is saved in the
/etc/zones directory as an xml file:
The index file in this directory
also contains the entry:
|
|||||
2
|
Use
zoneadm to verify and install the new zone
|
||||||
#
zoneadm -z selfzone install
|
|||||||
Use zoneadm with the -z the zone name and the install option. This will generate an output showing the progress
as the file system is created and written.
After a zone is installed the index file in
the /etc/zones will be updated.
|
|||||||
3
|
Use
zoneadm -z <zonename> boot to boot the zone.
|
||||||
# zoneadm -z
selfzone boot
|
|||||||
Boot the new zone by issuing zoneadm -z
<zonename> boot.
|
|||||||
4
|
Use
zlogin to perform initial setup up of new zone
|
||||||
# zlogin
-C selfzone
|
Use zlogin <zonename>
-C to login to the new zone at its console. This will take you through
the normal configuration questions as it you had boot a new installation for
the first time. You will be asked to set timezone, network and hostname.
Using zlogin from the global zone
is as if you had login from the console. To exist this consol login and
return to the global zone simply enter a tilda dot:
~.
This will return back to global
zone.
|
||||||
5
|
Use
zoneadm list to show status of current zone
|
||||||
#
/usr/sbin/zoneadm list -vi
|
|||||||
On the global zone, use the zoneadm list -vi
to show current status of the new zone
|