Professional Documents
Culture Documents
ENVIRONMENT IN A
SOLARIS ZONE
Nils Nieuwejaar
Russ Blaine
Solaris Kernel Technology
Sun Microsystems
Agenda
• BrandZ Overview
• The 'lx' Brand
• OpenSolaris
• Demo
• Q&A
Server Virtualization Categories
Hard Partitions Virtual Machines OS Virtualization Resource Mgmt.
App Identity
Server Database Server
File
Server
Web
Server
Mail
Server
Calendar Database Web
Server Server
SunRay Database App
Server Server
App
OS
Server
Multiple OSes Single OS
Trend to flexibility Trend to isolation
Dynamic System Logical Domains Zones Solaris Resource
Domains Xen Manager (SRM)
Solaris Zones
• Basic concept: isolated execution environment
within a Solaris instance
• Virtualizes OS layer: file system, devices,
network, processes
• Provides:
> Privacy: can't see outside zone
> Security: can't affect activity outside zone
> Failure isolation: application failure in one zone
doesn't affect others
• Lightweight, granular, efficient
Zones Block Diagram
global zone (serviceprovider.com)
twilight zone (twilight.com) drop zone (drop.net) fracture zone (fracture.org)
zone root: /zone/twilight zone root: /aux0/drop zone root: /export/fracture
Environment
Application
enterprise service network services network services
(Oracle 10g, AS 8.1EE)
22%
(BIND 8.3, Sendmail 8.13.1) (BIND 9.2.4, Postfix 2.1)
Platform
zcons
zcons
zcons
ge0:2
ce0:1
ge0:1
ce0:2
65%zoneadmd
/usr
/usr
Virtual
/opt
zoneadmd zoneadmd
storage complex
network device network device
(ce0) (ge0)
One Step Back, Two Steps Forward
• A zone is:
> A collection of processes with limited privileges
> A limited device tree
> An alternate root directory
• Why should a zone have to look like the system
that hosts it?
BrandZ: Branded Zones
• Simple extension of the zones model
• Supports zones that don't resemble the global
zone
> Only supports user-space environments
> If you need a different kernel, see Xen
• Each distinct zone type is called a Brand
• The Brand defines the content, structure, and
behavior of the zone
BrandZ Uses
• Available today:
> Linux zones on Solaris
> x86 only
> Possible OpenSolaris project: add support for SPARC
Linux
• Other possibilities
> Alternate Solaris zones
> Nexenta/ShilliX/BeleniX
> Replace Solaris tools in /usr/bin with GNU equivalents
> BrandZ + QEMU = SPARC zones on x86
> A MacOS X zone (you've gotta have dreams).
(Branded) Zones Block Diagram
global zone (My desktop)
linux zone (brandz.east) twiki zone (muskoka.east) Mac OSX zone
zone root: /zone/brandz zone root: /zone/twiki zone root: /zone/mac
Environment
Application
MATLAB, yum, pandora)
network services Finder, Spotlight
(BIND 9.2.41)
bge0::2
Platform
bge0:1
zcons
zcons
zcons
/usr
65%
/usr
/usr
Virtual
/opt
zoneadmd zoneadmd zoneadmd
} }
Userland
Kernel
Solaris Kernel LX brand module
struct lx_brand_ops {
Syscall handler lx_syscall()
lx_syscall {
lx_proc_exit()
if (p->p_brand) return to userland
lx_pid_assign()
p->p_brand->br_syscall(); }
lx_pid_release()
else lx_setregs()
rval = do_syscall(); ...
return to userspace open() {
... }
return(fd);
}
Signals
• Solaris never handles or processes untranslated
signals
Linux Process Linux Process
Kernel