Article Title: LXC: Linux container tool. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Tour and set up a new container tool Linux Containers
Containers can provide lightweight virtualization to isolate processes and resources, without the need to provide command interpretation mechanisms and other complexities of full virtualization. This document introduces the container tool Linux in a step-by-step manner? Containers (LXC ). The author demonstrates how to set and use them.
Containers effectively divide resources managed by a single operating system into isolated groups to better balance conflicting resource usage requirements between isolated groups. Compared with virtualization, this requires neither command-level simulation nor instant compilation. Containers can run commands locally on the core CPU without any special explanation mechanism. In addition, it avoids the complexity of paravirtualization and System Call replacement.
By providing a method for creating and entering containers, the operating system allows applications to run as they run on independent machines, but also shares many underlying resources. For example, you can effectively share the page cache of public files (such as glibc), because all containers use the same kernel, in addition, all containers often share the same libc library (depending on the container configuration ). Such sharing can often be extended to other files in the directory that do not need to be written.
While providing isolation, containers also save costs by sharing these resources, which means containers are much less costly than real virtualization.
Container technology has long existed. For example, Solaris Zones and BSD jails are containers on non-Linux operating systems. The container Technology Used in Linux also has rich heritage, such as Linux-Vserver, OpenVZ, and FreeVPS. Although these technologies are mature, these solutions have not yet integrated their container support into mainstream Linux kernels. (To understand