Chapter 3. Command-Line Operations Using Native and Libvirt Tools
LXC supports a variety of backing stores for its root filesystem. In Chapter 2, Installing and Running LXC on Linux Systems we used the default dir
type, which creates a directory under /var/lib/lxc/containername/rootfs
. Using the default store might be sufficient in some cases, however, to take advantage of more advanced features, such as container snapshots and backups, other types such as the LVM, Btrfs, and ZFS are available.
In addition to container snapshots, LXC provides tools for controlling resource usage through cgroups, the ability to execute programs before, during, and after the container starts, and to freeze/suspend the state of a running LXC instance.
As an alternative to the LXC tools, we will also look at a different set of userspace tools and libraries for creating and managing containers, particularly the one provided by libvirt.
In this chapter, we'll cover the following topics:
- Building containers...