kill tsol ("Trusted Solaris") aka TX ("Trusted Extensions")
[unleashed.git] / usr / src / man / man5 / zones.5
blob51ee8d9e98466f038e492e9a0d5a299a587fb925
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ZONES 5 "Jan 29, 2009"
7 .SH NAME
8 zones \- Solaris application containers
9 .SH DESCRIPTION
10 .sp
11 .LP
12 The zones facility in Solaris provides an isolated environment for running
13 applications. Processes running in a zone are prevented from monitoring or
14 interfering with other activity in the system. Access to other processes,
15 network interfaces, file systems, devices, and inter-process communication
16 facilities are restricted to prevent interaction between processes in different
17 zones.
18 .sp
19 .LP
20 The privileges available within a zone are restricted to prevent operations
21 with system-wide impact. See \fBprivileges\fR(5).
22 .sp
23 .LP
24 You can configure and administer zones with the \fBzoneadm\fR(1M) and
25 \fBzonecfg\fR(1M) utilities. You can specify the configuration details a zone,
26 install file system contents including software packages into the zone, and
27 manage the runtime state of the zone. You can use the \fBzlogin\fR(1) to run
28 commands within an active zone. You can do this without logging in through a
29 network-based login server such as \fBin.rlogind\fR(1M) or \fBsshd\fR(1M).
30 .sp
31 .LP
32 The autobooting of zones is enabled and disabled by the zones service,
33 identified by the FMRI:
34 .sp
35 .LP
36 svc:/system/zones:default
37 .sp
38 .LP
39 See \fBzoneadm\fR(1M). Note that a zone has an \fBautoboot\fR property, which
40 can be set to \fBtrue\fR (always autoboot). However, if the zones service is
41 disabled, autoboot will not occur, regardless of the setting of the autoboot
42 property for a given zone. See \fBzonecfg\fR(1M).
43 .sp
44 .LP
45 An alphanumeric name and numeric ID identify each active zone. Alphanumeric
46 names are configured using the \fBzonecfg\fR(1M) utility. Numeric IDs are
47 automatically assigned when the zone is booted. The \fBzonename\fR(1) utility
48 reports the current zone name, and the \fBzoneadm\fR(1M) utility can be used to
49 report the names and IDs of configured zones.
50 .sp
51 .LP
52 A zone can be in one of several states:
53 .sp
54 .ne 2
55 .na
56 \fB\fBCONFIGURED\fR\fR
57 .ad
58 .RS 17n
59 Indicates that the configuration for the zone has been completely specified and
60 committed to stable storage.
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fBINCOMPLETE\fR\fR
67 .ad
68 .RS 17n
69 Indicates that the zone is in the midst of being installed or uninstalled, or
70 was interrupted in the midst of such a transition.
71 .RE
73 .sp
74 .ne 2
75 .na
76 \fB\fBINSTALLED\fR\fR
77 .ad
78 .RS 17n
79 Indicates that the zone's configuration has been instantiated on the system:
80 packages have been installed under the zone's root path.
81 .RE
83 .sp
84 .ne 2
85 .na
86 \fB\fBREADY\fR\fR
87 .ad
88 .RS 17n
89 Indicates that the "virtual platform" for the zone has been established. For
90 instance, file systems have been mounted, devices have been configured, but no
91 processes associated with the zone have been started.
92 .RE
94 .sp
95 .ne 2
96 .na
97 \fB\fBRUNNING\fR\fR
98 .ad
99 .RS 17n
100 Indicates that user processes associated with the zone application environment
101 are running.
105 .ne 2
107 \fB\fBSHUTTING_DOWN\fR\fR
111 \fB\fBDOWN\fR\fR
113 .RS 17n
114 Indicates that the zone is being halted. The zone can become stuck in one of
115 these states if it is unable to tear down the application environment state
116 (such as mounted file systems) or if some portion of the virtual platform
117 cannot be destroyed. Such cases require operator intervention.
120 .SS "Process Access Restrictions"
123 Processes running inside a zone (aside from the global zone) have restricted
124 access to other processes. Only processes in the same zone are visible through
125 \fB/proc\fR (see \fBproc\fR(4) or through system call interfaces that take
126 process IDs such as \fBkill\fR(2) and \fBpriocntl\fR(2). Attempts to access
127 processes that exist in other zones (including the global zone) fail with the
128 same error code that would be issued if the specified process did not exist.
129 .SS "Privilege Restrictions"
132 Processes running within a non-global zone are restricted to a subset of
133 privileges, in order to prevent one zone from being able to perform operations
134 that might affect other zones. The set of privileges limits the capabilities of
135 privileged users (such as the super-user or root user) within the zone. The
136 list of privileges available within a zone can be displayed using the
137 \fBppriv\fR(1) utility. For more information about privileges, see
138 \fBprivileges\fR(5).
139 .SS "Device Restrictions"
142 The set of devices available within a zone is restricted, to prevent a process
143 in one zone from interfering with processes in other zones. For example, a
144 process in a zone should not be able to modify kernel memory using
145 \fB/dev/kmem\fR, or modify the contents of the root disk. Thus, by default,
146 only a few pseudo devices considered safe for use within a zone are available.
147 Additional devices can be made available within specific zones using the
148 \fBzonecfg\fR(1M) utility.
151 The device and privilege restrictions have a number of effects on the utilities
152 that can run in a non-global zone. For example, the \fBeeprom\fR(1M),
153 \fBprtdiag\fR(1M), and \fBprtconf\fR(1M) utilities do not work in a zone since
154 they rely on devices that are not normally available.
155 .SS "Brands"
158 A zone may be assigned a brand when it is initially created. A branded zone is
159 one whose software does not match that software found in the global zone. The
160 software may include Solaris software configured or laid out differently, or it
161 may include non-Solaris software. The particular collection of software is
162 called a "brand" (see \fBbrands\fR(5)). Once installed, a zone's brand may not
163 be changed unless the zone is first uninstalled.
164 .SS "File Systems"
167 Each zone has its own section of the file system hierarchy, rooted at a
168 directory known as the zone root. Processes inside the zone can access only
169 files within that part of the hierarchy, that is, files that are located
170 beneath the zone root. This prevents processes in one zone from corrupting or
171 examining file system data associated with another zone. The \fBchroot\fR(1M)
172 utility can be used within a zone, but can only restrict the process to a root
173 path accessible within the zone.
176 In order to preserve file system space, sections of the file system can be
177 mounted into one or more zones using the read-only option of the
178 \fBlofs\fR(7FS) file system. This allows the same file system data to be shared
179 in multiple zones, while preserving the security guarantees supplied by zones.
182 NFS and autofs mounts established within a zone are local to that zone; they
183 cannot be accessed from other zones, including the global zone. The mounts are
184 removed when the zone is halted or rebooted.
185 .SS "Networking"
188 A zone has its own port number space for \fBTCP\fR, \fBUDP\fR, and \fBSCTP\fR
189 applications and typically one or more separate \fBIP\fR addresses.
192 For the \fBIP\fR layer (\fBIP\fR routing, \fBARP\fR, \fBIPsec\fR, \fBIP\fR
193 Filter, and so on) a zone can either share the configuration and state with the
194 global zone (a shared-\fBIP\fR zone), or have its distinct \fBIP\fR layer
195 configuration and state (an exclusive-\fBIP\fR zone).
198 If a zone is to be connected to the same datalink, that is, be on the same
199 \fBIP\fR subnet or subnets as the global zone, then it is appropriate for the
200 zone to use the shared \fBIP\fR instance.
203 If a zone needs to be isolated at the \fBIP\fR layer on the network, for
204 instance being connected to different \fBVLAN\fRs or different \fBLAN\fRs than
205 the global zone and other non-global zones, then for isolation reasons the zone
206 should have its exclusive \fBIP\fR.
209 A shared-\fBIP\fR zone is prevented from doing certain things towards the
210 network (such as changing its \fBIP\fR address or sending spoofed \fBIP\fR or
211 Ethernet packets), but an exclusive-\fBIP\fR zone has more or less the same
212 capabilities towards the network as a separate host that is connected to the
213 same network interface. In particular, the superuser in such a zone can change
214 its \fBIP\fR address and spoof \fBARP\fR packets.
217 The shared-\fBIP\fR zones are assigned one or more network interface names and
218 \fBIP\fR addresses in \fBzonecfg\fR(1M). The network interface name(s) must
219 also be configured in the global zone.
222 The exclusive-\fBIP\fR zones are assigned one or more network interface names
223 in \fBzonecfg\fR(1M). The network interface names must be exclusively assigned
224 to that zone, that is, it (or they) can not be assigned to some other running
225 zone, nor can they be used by the global zone.
228 The full \fBIP\fR-level functionality in the form of \fBDHCP\fR client,
229 \fBIPsec\fR and \fBIP\fR Filter, is available in exclusive-\fBIP\fR zones and
230 not in shared-\fBIP\fR zones.
231 .SS "Host Identifiers"
234 A zone is capable of emulating a 32-bit host identifier, which can be
235 configured via \fBzonecfg\fR(1M), for the purpose of system consolidation. If a
236 zone emulates a host identifier, then commands such as \fBhostid\fR(1) and
237 \fBsysdef\fR(1M) as well as C interfaces such as \fBsysinfo\fR(2) and
238 \fBgethostid\fR(3C) that are executed within the context of the zone will
239 display or return the zone's emulated host identifier rather than the host
240 machine's identifier.
241 .SH SEE ALSO
244 \fBhostid\fR(1), \fBzlogin\fR(1), \fBzonename\fR(1), \fBin.rlogind\fR(1M),
245 \fBsshd\fR(1M), \fBsysdef\fR(1M), \fBzoneadm\fR(1M), \fBzonecfg\fR(1M),
246 \fBkill\fR(2), \fBpriocntl\fR(2), \fBsysinfo\fR(2), \fBgethostid\fR(3C),
247 \fBgetzoneid\fR(3C), \fBucred_get\fR(3C), \fBproc\fR(4), \fBattributes\fR(5),
248 \fBbrands\fR(5), \fBprivileges\fR(5), \fBcrgetzoneid\fR(9F)