An Introduction to Virtualization
- Posted in
- IT Computing
How Are Containers Different?
Discussed in-depth in our recent article on OpenVZ, containers offer a different take on virtualization. These solutions are not as easily categorized as the hypervisors, since they tend to be much more varied, as each is based on a specific OS.
Containers are able to "partition" an existing operating system, in order to provide multiple isolated environments to its users. The isolation of resources is attained by implementing several changes into an existing kernel, allowing for a more controlled resource management. Essentially, the adapted kernel takes on the role of "hypervisor and base kernel in one", naturally handling the isolation of each separate container.

The methods used for doing so vary from one solution to the next, but the fundamentals remain the same. Each container is locked into its own part of the host's file system, has its own users and processes, its own network address, and is practically fully customizable software-wise. To the actual user, it is for all intents and purposes a completely separate system.
Cutting out the kernel allows a virtual environment to have a much smaller footprint, since there is no need for a separate kernel supporting it, making it essentially just a separate group of processes on the host OS. Logically, we could state that in a comparison of a hypervisor solution and a container solution on the exact same hardware, the container solution is likely to provide a larger amount of separate systems. Nonetheless, nothing prevents users from combining the best of two worlds, as a container-supporting kernel will still run perfectly well on top of a hypervisor-solution, making systems even more flexible.
More information on how containers actually work can be found in our article on the subject, where we dig deep into the inner workings of the adapted OpenVZ kernel.
Examples of popular container-based solutions are Solaris Containers, OpenVZ, Parallels Virtuozzo, and Linux VServer.
Originally published at https://www.anandtech.com/show/2653 (Wayback Machine).