Book Image

Containerization with LXC

By : Konstantin Ivanov
Book Image

Containerization with LXC

By: Konstantin Ivanov

Overview of this book

In recent years, containers have gained wide adoption by businesses running a variety of application loads. This became possible largely due to the advent of kernel namespaces and better resource management with control groups (cgroups). Linux containers (LXC) are a direct implementation of those kernel features that provide operating system level virtualization without the overhead of a hypervisor layer. This book starts by introducing the foundational concepts behind the implementation of LXC, then moves into the practical aspects of installing and configuring LXC containers. Moving on, you will explore container networking, security, and backups. You will also learn how to deploy LXC with technologies like Open Stack and Vagrant. By the end of the book, you will have a solid grasp of how LXC is implemented and how to run production applications in a highly available and scalable way.
Table of Contents (17 chapters)
Containerization with LXC
About the Author
About the Reviewer
Customer Feedback

Building and running LXC containers with libvirt

Libvirt is a set of libraries and language bindings used to interact with various virtualization technologies in a standard and uniform way. These include KVM, XEN, QEMU, OpenVZ, and of course LXC. Libvirt uses XML files to define virtualized entities such as LXC containers, and describe their properties, such as available memory, block devices, networking, the init system, and other metadata. It supports multiple storage drivers such as the LVM, local and network filesystems, iSCSI, and others.

Libvirt provides a completely independent way of working with Linux containers from the mainstream LXC project and the toolset we've seen and used so far. It implements the kernel feature set that constitutes LXC, and exposes its own tools and libraries to work with containers without the need to install other packages. In Chapter 4, LXC Code Integration with Python, we'll see how to write Python programs using the libvirt API, but for now let's explore...