Skip to content

Integrating libvirt

acrish edited this page Jul 1, 2013 · 8 revisions

Basically, libvirt supports building the networking model for virtual machines by using the bridge module functionality, for example. By integrating libvirt, it would directly access the LiSA Switch API for connecting the virtual machines on different ports.

Notes

Note #1: Some research is required on the feasibility of integrating libvirt.

First, let's see what is libvirt and reference its networking component.

Libvirt

Libvirt is a virtualization library which provides an API for developing management tools used to manage guest operating systems (OS). In other words, a quest OS, called domain, may be managed from a host, called node, through the hypervisor. Moreover, the management application and the managed hypervisor may be running on the same node or on different nodes in the same network.

But what does it mean to manage a domain anyway? The management tools should be able to provision, create, modify, monitor, control, migrate and stop the domains. As these operations would "exploit" the hypervisor functionality, they are limited to the support of the hypervisor. More specifically, with libvirt, resources like memory, storage, networking, CPUs can be monitored, different network models can be obtained by linking the host with virtual machines etc.

Libvirt Virtual Networking

In terms of networking, libvirt exposes the concept of virtual switch. Basically, the virtual switch contains one or more either bridge interfaces or macvtap interfaces used to connect the host to virtual machines (VM). Hence, the host and the guests become a LAN, the host acting like a gateway for the guests.

When libvirtd daemon starts, it creates by default a bridge named virbr0, which could be configured to link a node with a domain. Here it is an example of network management architecture with three domains and one node.

LiSA and libvirt

Now the question is: if a host H is a LiSA software switch, is H able to communicate with the VMs running on H? In terms of libvirt, is it feasible to call sw_api instead of directly creating a bridge?

// TODO

Other references

  1. libvirt architecture
  2. Linux virtualization
  3. Libvirt netdev bridge source file
  4. Libvirt network config
  5. Libvirt network filters
  6. man 1 virsh - device and interface commands
  7. Extend libvirt API
  8. Libvirt domain NICs