Skip to content

Virtualization

wikipedia Virtualization

NOTE: 下面介绍各个层级的的virtualization

Hardware virtualization

Main article: Hardware virtualization

See also: Mobile virtualization

Desktop virtualization

Main article: Desktop virtualization

Containerization

Main article: Operating-system-level virtualization

NOTE: 这是本章主要关注的

wikipedia OS-level virtualization

OS-level virtualization refers to an operating system paradigm in which the kernel allows the existence of multiple isolated user space instances. Such instances, called containers (Solaris, Docker), Zones (Solaris), virtual private servers (OpenVZ), partitions, virtual environments (VEs), virtual kernel (DragonFly BSD), or jails (FreeBSD jail or chroot jail),[1] may look like real computers from the point of view of programs running in them. A computer program running on an ordinary operating system can see all resources (connected devices, files and folders, network shares, CPU power, quantifiable hardware capabilities) of that computer. However, programs running inside of a container can only see the container's contents and devices assigned to the container.

NOTE: 常常听到的Docker,**container**所使用的就是OS-level virtualization

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 features to limit the impact of one container's activities on other containers.

NOTE:

linux kernel特性Linux namespaces用于支持isolation;

linux kernel特性Linux control groups用于支持resource-management

The term "container," while most popularly referring to OS-level virtualization systems, is sometimes ambiguously used to refer to fuller virtual machine environments operating in varying degrees of concert with the host OS, e.g. Microsoft's "Hyper-V Containers."