Content deleted Content added
m →Implementations: formatting fix |
No edit summary |
||
(47 intermediate revisions by 26 users not shown) | |||
Line 1:
{{
{{More citations needed|date=November 2020}}
'''OS-level virtualization''' is an [[operating system]] (OS) [[virtualization]] paradigm in which the [[Kernel (operating system)|kernel]] allows the existence of multiple isolated [[user space and kernel space|user space]] instances,
On [[Unix-like]] operating systems, this feature can be seen as an advanced implementation of the standard [[chroot]] mechanism, which changes the apparent root folder for the current running process and its children. In addition to isolation mechanisms, the kernel often provides [[Resource management (computing)|resource-management]] features to limit the impact of one container's activities on other containers. Linux containers are all based on the virtualization, isolation, and resource management mechanisms provided by the [[Linux kernel]], notably [[Linux namespaces]] and [[cgroups]].<ref>{{cite web|url=http://www.netdevconf.org/1.1/proceedings/slides/rosen-namespaces-cgroups-lxc.pdf|title=Namespaces and Cgroups, the basis of Linux Containers|first=Rosen|last=Rami|access-date=18 August 2016}}</ref>
== Operation ==
On ordinary operating systems for personal computers, a computer program can see (even though it might not be able to access) all the system's resources. They include:
The operating system may be able to allow or deny access to such resources based on which program requests them and the [[User (computing)|user account]] in the context
With operating-system-virtualization, or containerization, it is possible to run programs within containers, to which only parts of these resources are allocated. A program expecting to see the whole computer, once run inside a container, can only see the allocated resources and believes them to be all that is available. Several containers can be created on each operating system, to each of which a subset of the computer's resources is allocated. Each container may contain any number of computer programs. These programs may run concurrently or separately, and may even interact with one another.
Line 30 ⟶ 20:
== Uses ==
Operating-system-level virtualization is commonly used in [[virtual machine|virtual hosting]] environments, where it is useful for securely allocating finite hardware resources among a large number of mutually-distrusting users.
Other typical scenarios include separating several programs to separate containers for improved security, hardware independence, and added resource management features.<ref>{{Cite web |date=2022-10-20 |title=Secure Bottlerocket deployments on Amazon EKS with KubeArmor {{!}} Containers |url=https://aws.amazon.com/blogs/containers/secure-bottlerocket-deployments-on-amazon-eks-with-kubearmor/ |access-date=2023-06-20 |website=aws.amazon.com |language=en-US}}</ref> The improved security provided by the use of a chroot mechanism, however, is not perfect.<ref>{{
=== Overhead ===
Line 38 ⟶ 28:
=== Flexibility ===
Operating-system-level virtualization is not as flexible as other virtualization approaches since it cannot host a guest operating system different from the host one, or a different guest kernel. For example, with [[Linux]], different distributions are fine, but other operating systems such as Windows cannot be hosted. Operating systems using variable input systematics are subject to limitations within the virtualized architecture. Adaptation methods including cloud-server relay analytics maintain the OS-level virtual environment within these applications.<ref>{{
[[Oracle Solaris
=== Storage ===
Line 71 ⟶ 46:
|-
!File system isolation
![[Copy-on-write|Copy on
![[Disk quota]]s
!I/O rate limiting
Line 85 ⟶ 60:
| Varies by operating system
| 1982
| {{Partial}}{{Efn|name="root-escape"|Root user can easily escape from chroot.
| {{No}}
| {{No}}
Line 97 ⟶ 72:
|-
|[[Docker (software)|Docker]]
|[[Linux]],<ref>{{
|{{open source|[[Apache License|Apache License 2.0]]}}
| 2013
| {{Yes}}
| {{Yes}}
| {{Partial}}{{Efn|name="docker-disk-quotas"|For btrfs, overlay2, windowsfilter, and zfs storage drivers.
<ref>{{Cite web |url=https://docs.docker.com/reference/cli/docker/container/run/#storage-opt|title=docker container run - Set storage driver options per container (--storage-opt)|website=docs.docker.com|date=22 February 2024 }}</ref>}}
| {{Yes}} {{
| {{Yes}}
| {{Yes}}
| {{Yes}}
| {{Yes}}
| {{No|Only in
| {{Yes}} {{
|-
| [[Linux-VServer]]<br />(security context)
| [[Linux]], [[Windows Server 2016]]
|{{
| 2001
| {{Yes}}
Line 122 ⟶ 98:
| {{Yes}}
| {{Partial}}{{Efn|name="vserver-net"|Networking is based on isolation, not virtualization.}}
| {{
| {{No}}
| {{Partial|Partial{{Efn|name="linux-vserver-paper"|A total of 14 user capabilities are considered safe within a container. The rest may cannot be granted to processes within that container without allowing that process to potentially interfere with things outside that container.<ref>{{Cite web |url=http://linux-vserver.org/Paper#Secure_Capabilities|title=Paper - Linux-VServer| website=linux-vserver.org }}</ref>}}}}
|-
| [[lmctfy]]
| [[Linux]]
| {{open source|[[Apache License|Apache License 2.0]]}}
| 2013{{
| {{Yes}}
| {{Yes}}
Line 137 ⟶ 113:
| {{Yes}}
| {{Partial}}{{Efn|name="vserver-net"}}
| {{
| {{No}}
| {{Partial|Partial{{Efn|name="linux-vserver-paper"}}}}
Line 145 ⟶ 121:
|{{open source|[[GNU General Public License|GNU GPLv2]]}}
| 2008
| {{Yes}}<ref name="lxc-1-0-security-features">{{
| {{Yes}}
| {{Partial}}{{Efn|name="lxc-dq"|Disk quotas per container are possible when using separate partitions for each container with the help of [[Logical Volume Manager (Linux)|LVM]], or when the underlying host filesystem is btrfs, in which case btrfs subvolumes are automatically used.}}
Line 154 ⟶ 130:
| {{Yes}}
| {{Yes}}
| {{Yes}}<ref name="lxc-1-0-security-features"
|-
| [[Singularity (software)|Singularity]]
| [[Linux]]
|{{
| 2015<ref>{{Cite web |url=https://www.top500.org/news/sylabs-brings-singularity-containers-into-commercial-hpc/ |title=Sylabs
| {{Yes}}<ref>{{Cite web |url=https://www.sylabs.io/2018/03/sif-containing-your-containers/ |title=
| {{Yes}}
| {{Yes}}
Line 169 ⟶ 145:
| {{No}}
| {{No}}
| {{Yes}}<ref>{{Cite journal |title=Singularity: Scientific containers for mobility of compute |first1=Gregory M. |last1=Kurtzer |first2=Vanessa |last2=Sochat |first3=Michael W. |last3=Bauer |date=May 11, 2017 |journal=PLOS ONE |volume=12 |issue=5 |pages=e0177459 |doi=10.1371/journal.pone.0177459 |pmid=28494014 |pmc=5426675 |bibcode=2017PLoSO..1277459K |doi-access=free}}</ref>
|-
|[[OpenVZ]]
Line 176 ⟶ 152:
| 2005
| {{Yes}}
| {{Yes}}<ref>{{
| {{Yes}}
| {{Yes}}{{Efn|name="ioprio"|Available since Linux kernel 2.6.18-028stable021. Implementation is based on CFQ disk I/O scheduler, but it is a two-level schema, so I/O priority is not per-process, but rather per-container.<ref>{{
| {{Yes}}
| {{Yes}}
| {{Yes}}{{Efn|name="vn"|Each container can have its own IP addresses, firewall rules, routing tables and so on. Three different networking schemes are possible: route-based, bridge-based, and assigning a real network device ([[Network interface controller|NIC]]) to a container.}}
| {{Partial}}{{Efn|name="docker-inside-openvz"|Docker containers can run inside OpenVZ containers.<ref>{{
| {{Yes}}
| {{Yes|Yes{{Efn|name="openvz-wiki-container"|Each container may have root access without possibly affecting other containers.<ref>{{
|-
|[[Virtuozzo]]
|[[Linux]], [[Microsoft Windows
|{{Proprietary|[[Trialware]]}}
| 2000<ref name="aspcomplete">{{Cite web |url=http://www.paul.sladen.org/vserver/aspcomplete/2000-08-25/ve-0.4.2-for-2.4.0-test6.diff.gz |title=Initial public prerelease of Virtuozzo (named ASPcomplete at that time)}}</ref>
| {{Yes}}
| {{Yes}}
Line 197 ⟶ 173:
| {{Yes}}
| {{Yes}}{{Efn|name="vn"}}
| {{Partial}}{{Efn|name="vz-docker-inside-ct"|Docker containers can run inside Virtuozzo containers.<ref>{{
| {{Yes}}
| {{Yes}}
Line 203 ⟶ 179:
|[[Solaris Containers]] (Zones)
||[[illumos]] ([[OpenSolaris]]),<br />[[Solaris (operating system)|Solaris]]
|{{
| 2004
| {{Yes}}
| {{Yes}} (ZFS)
| {{Yes}}
| {{Partial}}{{Efn|name="solaris-iolimit"|Yes with illumos<ref>{{
| {{Yes}}
| {{Yes}}
| {{Yes}}{{Efn|name="crossbow"|See [[
| {{Partial}}{{Efn|name="solaris-nested"|Only when top level is a KVM zone (illumos) or a kz zone (Oracle).}}
| {{Partial}}{{Efn|name="kernelzone"|Starting in Solaris 11.3 Beta, Solaris Kernel Zones may use live migration.}}{{Efn|name="coldmig"|Cold migration (shutdown-move-restart) is implemented.}}
| {{Yes|Yes}}{{Efn|name="solaris-E29024"|Non-global zones are restricted so they may not affect other zones via a capability-limiting approach. The global zone may administer the non-global zones.<ref>Oracle Solaris 11.1
|-
|[[FreeBSD jail]]
|[[FreeBSD]], [[DragonFly BSD]]
|{{
| 2000<ref>{{
| {{Yes}}
| {{Yes}} (ZFS)
| {{Yes}}{{Efn|Check the "allow.quotas" option and the "Jails and
| {{Yes}}
| {{Yes}}<ref name="rctl">{{
| {{Yes}}
| {{Yes}}<ref>{{
| {{Yes}}
| {{Partial}}<ref name="freebsdvps">{{
| {{Yes}}<ref>{{
|-
|[[vkernel]]
|[[DragonFly BSD]]
|{{
| 2006<ref name=vkernel.h>{{
| {{Yes}}<ref name=vkd.4/>
| {{Yes}}<ref name=vkd.4>{{
| {{N/A}}
| {{Dunno}}
| {{Yes}}<ref name=vkernel.7>{{
*{{
| {{Yes}}{{r|vkernel.7}}
| {{Yes}}<ref name=vke.4>{{
| {{Dunno}}
| {{Dunno}}
| {{Yes}}
|-
|[[sysjail]]
|[[OpenBSD]], [[NetBSD]]
|{{
| 2006–2009
| {{Yes}}
Line 272 ⟶ 248:
| {{Yes}}
| {{Yes}}
| {{Yes}}{{Efn|Available since TL 02.<ref>{{
| {{No}}
| {{Yes}}<ref>{{Cite web |url=http://www.ibm.com/developerworks/aix/library/au-aix61mobility/index.html |title=Live
| {{
|-
|
|[[Windows XP]]
|{{Proprietary|[[Freeware]]}}
Line 288 ⟶ 264:
| {{No}}
| {{No}}
| {{
| {{No}}
| {{
|-
| [[Sandboxie]]
| [[Microsoft Windows
| {{open source|[[GNU General Public License|GNU GPLv3]]}}
| 2004
Line 309 ⟶ 285:
| [[systemd-nspawn]]
| [[Linux]]
| {{
| 2010
| {{Yes}}
| {{Yes}}
| {{Yes}}<ref name="systemd-nspawn manual">{{Cite web |url=https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html#--property= |title=systemd-nspawn |website=www.freedesktop.org }}</ref><ref name="Systemd service unit files parameters">{{Cite web |url=https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/resource_management_guide/sec-modifying_control_groups |title=2.3. Modifying
| {{Yes}}<ref name="systemd-nspawn manual"/><ref name="Systemd service unit files parameters"/>
| {{Yes}}<ref name="systemd-nspawn manual"/><ref name="Systemd service unit files parameters"/>
| {{Yes}}<ref name="systemd-nspawn manual"/><ref name="Systemd service unit files parameters"/>
| {{Yes}}
| {{
| {{
| {{Yes}}
|-
| [[Turbo (software)|Turbo]]
| [[Microsoft Windows
|{{Proprietary|[[Freemium]]}}
| 2012
Line 337 ⟶ 313:
| {{Yes}}
|-
| [[Rocket (software)|rkt]] (''rocket'')
| [[Linux]]
| {{
| 2014<ref>{{
| {{Yes}}
| {{Yes}}
Line 348 ⟶ 324:
| {{Yes}}
| {{Yes}}
| {{
| {{
| {{Yes}}
|}
Linux containers not listed above include:
* [[LXC#LXD|LXD]], an alternative wrapper around [[LXC]] developed by [[Canonical (company)|Canonical]]<ref>{{
*[[Podman]],<ref>[https://indico.cern.ch/event/757415/contributions/3421994/attachments/1855302/3047064/Podman_Rootless_Containers.pdf Rootless containers with Podman and fuse-overlayfs], CERN
* [[Charliecloud]], a set of container tools used on HPC systems<ref>{{
* [[Kata Containers]] MicroVM Platform<ref>{{
* Bottlerocket is a Linux-based open-source operating system that is purpose-built by [[Amazon Web Services]] for running containers on virtual machines or bare metal hosts<ref>{{
* [[
== See also ==
* [[Container Linux]]▼
* [[Orchestration (computing)|Container orchestration]]
* [[Flatpak]] package manager
* [[cgroups|Linux cgroups]]▼
* [[Linux namespaces]]
▲* [[cgroups|Linux cgroups]]
* [[Sandbox (software development)]]▼
▲* [[Container Linux]]
* [[Hypervisor]]
* [[Portable application creators]]
* [[Open Container Initiative]]
▲* [[Sandbox (software development)]]
* [[Separation kernel]]
* [[Serverless computing]]
Line 384 ⟶ 361:
== External links ==
* [https://www.kernelthread.com/publications/virtualization/ An introduction to
* [https://wiki.openvz.org/Introduction_to_virtualization A short intro to three different virtualization techniques]
* [https://thijs.ai/papers/scheepers-virtualization-containerization.pdf Virtualization and
* [https://lwn.net/Articles/646054/ Containers and persistent data], [[LWN.net]], May 28, 2015, by Josh Berkus
Line 392 ⟶ 369:
{{DEFAULTSORT:Operating-system-level virtualization}}
[[Category:Operating system security]]
[[Category:
[[Category:Linux]]
[[Category:Linux containerization]]
[[Category:Linux kernel features]]
|