LibvirtVIFTypeXMLConfigs

=Libvirt VIF Type XML configuration=

This document outlines the way the LibvirtGenericVIFDriver configures networking in Liberty-1 development tree, and also looks at a few proposed new VIF types

Common configuration
A number of aspects of the guest interface configuration are common to all VIF types, though some types do have restrictions on valid values. For example. VIF_TYPE_VHOSTUSER requires a model of virtio.

    ....QOS settings...

VIF_TYPE_OVS
Primary method:

 

Or if firewall filtering is needed, it uses

VIF_TYPE_IVS
Either

Or if firewall filtering is needed, it uses

VIF_TYPE_DVS
VMWare specific, not used by libvirt

VIF_TYPE_802_QBG
 

VIF_TYPE_802_QBH
  

VIF_TYPE_HW_VEB


Or

 3

VIF_TYPE_MLNX_DIRECT


VIF_TYPE_VHOSTUSER


VIF_TYPE_OTHER
Dummy placeholder, not used by libvirt.

Proposed: VIF_TYPE_MACVTAP
 <source dev='eth0' mode=’vepa|bridge’/>

Consolidated XML configs needed
Based on what is implemented in existing VIF types and proposed VIF types, it is possible to consoldiate to a limited set of libvirt variants

In fact out of the 15 different VIF types, there are only ultimately 5 distinct libvirt guest configurations used

VIF_TYPE_BRIDGE
....

VIF_TYPE_GENERIC
A standalone TAP dev, that is connected to host in unspecified manner

VIF_TYPE_VHOSTUSER
<source type="unix" path="/some/sock" mode="server|client"/>

VIF_TYPE_PCI_ASSIGNED
<source dev="00:02:10.2"/> 3

VIF_TYPE_DIRECT
<interface type='direct'> <source dev='eth0' mode=’vepa|bridge|passthrough’/> ....

As an alternative to specifying a 'mode' it might be desirable to have separate VIF types VIF_TYPE_VEPA, VIF_TYPE_PASSTHROUGH, VIF_TYPE_DEV_BRIDGE