Chapter 4. LXC Code Integration with Python

This chapter will introduce you to the Python bindings provided by both the LXC and libvirt APIs. We'll explore which container functionalities are possible and which are not, using the upstream lxc-dev and python-libvirt packages on Ubuntu and the lxc-devel and libvirt-python packages on CentOS.

To gain the most out of this chapter, some knowledge of Python is required. If you are a developer, this chapter is probably the most important one for you.

In this chapter, we'll cover the following topics in this order:

  • Building and managing containers using the lxc Python bindings
  • Creating and orchestrating containers using the libvirt Python bindings
  • Using LXC as a backend for development and testing with Vagrant ...

Get Containerization with LXC now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.