BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News FOSDEM Virtualization: Docker Integration in oVirt and Live Migration of Containers with CRIU

FOSDEM Virtualization: Docker Integration in oVirt and Live Migration of Containers with CRIU

Federico Simoncelli, principal software engineer in the virtualization department at Red Hat, explained the integration status between oVirt, Docker containers and Kubernetes, and Andrey Vagin, software engineer at Parallels, covered the work done in the CRIU project to enable live migration of containers, at the virtualization developer room at FOSDEM.

Docker Integration in oVirt and IaaS

Federico Simoncelli talked about using Docker for application distribution, being a viable alternative to building and managing packages or building a VM appliance, which would add a significant memory footprint.

Federico outlined his view on application distribution:

  • Distributing an application should be easy, one package system fits all.
  • Should give freedom for the developer to choose the platform.
  • Dependencies should be magically available in all platforms.
  • The same appliance should be used in QA and production.
  • Rebuilding the appliance or application should be easy and should need only one command.

oVirt is a virtualization management application that allows managing hardware nodes, storage and network resources, and deploy and monitor virtual machines running in the datacenter, used by Red Hat Enterprise Virtualization products. oVirt integrations with containers covers:

  • Utilities and tools to automate and simplify the deployment of containers.
  • Using oVirt as IaaS to orchestrate containers.
  • Running containers on oVirt nodes.
  • Evolve to a multi-purpose datacenter with different types of workloads.

One of the utilities added to oVirt is the Docker UI plugin, that allows creating a new virtual machine running a Docker image with a specified command, using Cloud-Init to pass commands to the guest. While oVirt is not yet aware of containers running in the virtual machines it may include tools and plugins to help visualizing containers in the datacenter.

Another tool is the Kubernetes cloud provider for oVirt, that allows Kubernetes to discover Docker hosts (minions) in oVirt. The oVirt project also provides a Docker image with oVirt engine installed.

Live Migration for Containers is Around the Corner

Andrey Vagin presented on migration of live containers, and the CRIU (Checkpoint/Restore In Userspace) project. CRIU allows to freeze a running application and checkpoint it to persistent storage as a collection of files, which can be used later on to restore and run the application from the point it was frozen at. The distinctive feature of the CRIU project is that it is mainly implemented in user space.

It works on the Linux kernel 3.11 or greater, after a number of patches to support CRIU functionality were added to the kernel, and supports the migration of:

  • Processes.
  • Application memory.
  • Open files.
  • Pipes and FIFOs.
  • Unix domain sockets.
  • Network sockets.
  • System IPC.
  • Timers.
  • Signals.
  • Terminals.
  • Linux kernel-specific system calls.

In order to dump containers, CRIU gathers information from /proc, collects and freezes the process tree, and them dumps the information into files. The restore process is more complicated, needs to collect shared objects, restore namespaces, create a process tree and restore files, sockets, pipes and memory.

An online migration of containers is a slow process and involves:

  • Suspend the container in the source host.
  • Transfer images to the remote host.
  • Resume container in the target host.

The freeze time can be reduced by using memory changes tracking ability to perform pre-copy memory migration, by transferring memory in a few iterations without freezing processes, and then freezing processes only in the last iteration.

Rate this Article

Adoption
Style

BT