Skip to content
Tim Ohliger edited this page May 16, 2016 · 4 revisions

This page describes the rough structure of the migration-framework.

Task_handler

The Task_handler is the core of the migration-framework. On startup, this class is created and its member function loop() is called. It handles the procedure of getting messages, converting those to Task_container objects, and executing those.

This procedure builds on two interfaces:

  • Hypervisor
  • Communicator

Those interfaces are rather simple and describe the minimal requirements used by the migration-framework. Thus, the actual implementations, introduced in the following sections, may provide further functionalities. The Communicator is used to get the task messages and the Hypervisor and the Communicator are then passed to the executed tasks.

Hypervisor

The Hypervisor interface provides methods to start, stop, and migrate virtual machines. Currently, there are two implementations.

The first and very simple one is the Dummy_hypervisor. It may be configured to finish always either with success or error. However, no action is performed and thus it is only used for debugging purpose.

The second Hypervisor implementation is the Libvirt_hypervisor. It uses libvirt for implementing the three actions. The Libvirt_hypervisor page provides further implementation details.

Communicator

The Communicator interface provides methods to send messages and get received messages. These and a lot more functionalities are implemented by the MQTT_communicator. The MQTT_communicator uses the MQTT protocol or more precisely the mosquitto library for communication. Further information about the MQTT_communicator can be found here.

Tasks and Task_container

A message received by the migration-framework is converted to a Task_container containing Task objects. Currently, there are four Task derivates:

  • Start - Starts a domain
  • Stop - Stops a domain
  • Migrate - Migrates a domain
  • Quit - Quits the migration-framework

Though, a Task_container may hold multiple Task objects, this is only supported for Start and Stop. Thus, one can send a Task_container containing, e.g., ten Start tasks to start ten domains, but must send ten Task_container each containing one Migrate task in order to migrate ten domains. This is due to the specification of tasks that can be found here.

Clone this wiki locally