Solaris Containers (including Solaris Zones) is an implementation of operating system-level virtualization technology first made available in 2005 as part of Solaris 10.
A Solaris Container is the combination of system resource controls and the boundary separation provided by zones. Zones act as completely isolated virtual servers within a single operating system instance. By consolidating multiple sets of application services onto one system and by placing each into isolated virtual server containers, system administrators can reduce cost and provide all the same protections of separate machines on a single machine.
Contents |
Terminology
There is always one zone defined, named the "global" zone. Zones hosted by a global zone are known as "non-global zones" but are sometimes just called "zones". The term "local zone" is specifically discouraged, since in this usage "local" is not an antonym of "global". The global zone encompasses all processes running on the system, whether or not these processes are running within a non-global zone. Unless otherwise noted, "zone" will refer to non-global zones in this article.
Description
Each zone has its own node name, virtual network interfaces, and storage assigned to it; there is no requirement for a zone to have any minimum amount of dedicated hardware other than the disk storage necessary for its unique configuration. Specifically, it does not require a dedicated CPU, memory, physical network interface or HBA, although any of these can be allocated specifically to one zone.
Each zone has a security boundary surrounding it which prevents a process associated with one zone from interacting with or observing processes in other zones. Each zone can be configured with its own separate user list. The system automatically manages user ID conflicts; that is, two zones on a system could have a user ID 10000 defined, and each would be mapped to its own unique global identifier.
A zone can be assigned to a resource pool (processor set plus scheduling class) to guarantee certain usage, or can be given shares via fair-share scheduling. A zone can be in one of the following states:
- Configured: configuration was completed and committed
- Incomplete: Transition state during install or uninstall operation
- Installed: the packages have been successfully installed
- Ready: the virtual platform has been established
- Running: the zone booted successfully and is now running
- Shutting down: the zone is in the process of shutting down - this is a temporary state, leading to "Down"
- Down: the zone has completed the shut down process and is down - this is a temporary state, leading to "Installed"
Some programs cannot be executed from within a non-global zone; typically this is because the application requires privileges that cannot be granted within a container. As a zone does not have its own separate kernel (in contrast to a hardware virtual machine), applications that require direct manipulation of kernel features, such as the ability to directly read or alter kernel memory space, may not work inside of a container.
Resources needed
Zones induce a very low overhead on CPU and memory. Currently a maximum of 8191 non-global zones can be created within a single operating system instance. "Sparse Zones", in which most filesystem content is shared with the global zone, can take as little as 50MB of disk space. "Whole Root Zones", in which each zone has its own copy of its operating system files, may occupy anywhere from several hundred megabytes to several gigabytes, depending on installed software.
Even with Whole Root Zones, disk space requirements can be negligible if the zone's OS file system is a ZFS clone of the global zone image, since only the blocks different from a snapshot image need to be stored on disk; this method also makes it possible to create new zones in a few seconds.
Branded zones
Although all zones on the system share a common kernel, an additional feature set has been added called branded zones (BrandZ for short). This allows individual zones to behave in a manner other than the default brand of the global zone. The existing brands (October 2009) can be grouped into two categories:
- brands which do not perform system call translation:
- 'native' is the default for Solaris 10
- 'ipkg' is the default for OpenSolaris
- 'cluster' is used for Solaris Cluster zones
- 'labeled' is used for zones in a Solaris Trusted Extensions environment
- brands which perform system call translation:
- 'solaris8' provides a Solaris 8/SPARC environment on a Solaris 10/SPARC system, including translation from Solaris 8 system calls to Solaris 10 system calls
- 'solaris9' provides a Solaris 9/SPARC environment on a Solaris 10/SPARC system, including translation from Solaris 9 system calls to Solaris 10 system calls
- 'lx' provides a Red Hat Enterprise Linux 3/x86 environment on a Solaris 10/x86 system, including translation from RHEL 3 system calls to Solaris 10 system calls
- 's10brand' provides a Solaris 10 environment on an OpenSolaris system, including translation from Solaris 10 system calls to OpenSolaris system calls; the design provides for migration of a Solaris 10 x86 system to an OpenSolaris/x86 system, or from Solaris 10/SPARC to OpenSolaris/SPARC.[1]
The brand for a zone is set at the time the zone is created. The second category is implemented with interposition points within the OS kernel that can be used to change the behavior of syscalls, process loading, thread creation, and other elements.
For the 'lx' brand, libraries from Red Hat 3 or an equivalent distribution such as CentOS are required to complete the emulated environment.
Documentation
The Solaris operating system provides man pages for Solaris Containers by default; more detailed documentation can be found at various on-line technical resources.
The first published document and hands-on reference for Solaris Zones was written in February 2004 by Dennis Clarke at Blastwave.org, providing the essentials to getting started.[2] This document was greatly expanded upon by Brendan Gregg in July 2005.[3] The Solaris 8 and Solaris 9 Containers were documented in detail by Dennis Clarke at Blastwave(tm) again in April 2008 and this has become a simple How To style guide that can get people started with Solaris Containers in a production setting.[4] The Blastwave Solaris 8 and Solaris 9 Containers document was very early in the release cycle of the Solaris Containers technology and the actions and implementation at Blastwave resulted in a followup by Sun Microsystems marketing.[5] More extensive documentation may be found at the Sun Microsystems documentation site,[6], the Sun BluePrints Archive,[7] and the Sun Solaris Containers Learning Center.[8]
Implementation issues
The standard Solaris NFS server is implemented in the kernel, and cannot be used for exports within non-global zones.[9][10] Third party NFS server software that is not implemented in the Solaris kernel may work.
Branded zones are not supported on the sun4us architecture. The packages will install on Fujitsu PRIMEPOWER servers that are running Solaris 10, but attempting to use branded zones will result in errors.[11]
Similar technologies
Other implementations of operating system-level virtualization technology include OpenVZ/Virtuozzo, Linux-VServer, FreeBSD Jails, FreeVPS, iCore Virtual Accounts and AIX Workload Partitions.
See also
References
- ^ "OpenSolaris Project: s10brand". OpenSolaris Project. http://opensolaris.org/os/project/s10brand/. Retrieved 2009-05-10.
- ^ Dennis Clarke (February 2004). "Get in the Zone". Blastwave.org Inc.. http://www.blastwave.org/articles/DMC-0002/. Retrieved 2008-04-21.
- ^ "Zones". Solaris Internals wiki. November 6, 2007. http://www.solarisinternals.com/wiki/index.php/Zones. Retrieved 2008-04-21.
- ^ "The Solaris 8 Container & Solaris 9 Container : A Brief Introduction". Blastwave.org Inc.. April 27, 2008. http://www.blastwave.org/articles/BLS-0065/index.html. Retrieved 2008-04-27.
- ^ "World's Largest Provider of Standardized Solaris Software Packages Saves Time and Money With Solaris Containers". Sun Microsystems Inc.. August 1, 2008. http://www.sun.com/customers/software/blastwave.xml. Retrieved 2008-05-01.
- ^ "Sun Microsystems Documentation". Sun Microsystems, Inc.. http://docs.sun.com. Retrieved 2008-04-21.
- ^ "Sun BluePrints". Sun Microsystems, Inc.. http://wikis.sun.com/display/BluePrints/Main. Retrieved 2008-11-09.
- ^ "Solaris Containers Learning Center". Sun Microsystems, Inc.. http://sun.com/software/solaris/containers_learning_center.jsp. Retrieved 2008-04-21.
- ^ "RFE: Zones should be able to be NFS servers". OpenSolaris BugTracker. 2003-12-07. http://bugs.opensolaris.org/view_bug.do?bug_id=4964859. Retrieved 2007-02-20.
- ^ "NFS server in zones". zones-discuss. 2007-02-14. http://www.opensolaris.org/jive/thread.jspa?threadID=24136&tstart=0. Retrieved 2007-02-20.
- ^ "SUNWs[89]brandr missing kernel modules". brandz-discuss list. 2008-10-16. http://mail.opensolaris.org/pipermail/brandz-discuss/2008-October/001218.html. Retrieved 2009-05-05.
External links
- OpenSolaris Zones Community
- Solaris Containers FAQ
- Solaris Containers Learning Center
- Solaris Containers data sheet
- "How to Move a Solaris Container" by Jeff Victor
- Moving Solaris 10 Zones
|
|||||||||||||||||||||||
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)




