Jump to: navigation, search

Difference between revisions of "LibvirtVIFTypeXMLConfigs"

(VIF_TYPE_BRIDGE)
Line 7: Line 7:
 
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.
 
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.
  
     <interface type="...">
+
     <nowiki><interface type="...">
 
         <mac address="01:02:ab:de:03:04"/>
 
         <mac address="01:02:ab:de:03:04"/>
 
         <model type="virtio|e1000|...."/>
 
         <model type="virtio|e1000|...."/>
Line 14: Line 14:
 
         ....QOS settings...
 
         ....QOS settings...
 
         </bandwidth>
 
         </bandwidth>
     </interface>
+
     </interface></nowiki>
  
 
== VIF_TYPE_OVS ==
 
== VIF_TYPE_OVS ==
Line 59: Line 59:
 
== VIF_TYPE_IOVISOR ==
 
== VIF_TYPE_IOVISOR ==
  
     <interface type="ethernet">
+
     <nowiki><interface type="ethernet">
 
       <target dev="vnet0"/>
 
       <target dev="vnet0"/>
     </interface>
+
     </interface></nowiki>
  
 
== VIF_TYPE_BRIDGE ==
 
== VIF_TYPE_BRIDGE ==
Line 73: Line 73:
 
== VIF_TYPE_802_QBG ==
 
== VIF_TYPE_802_QBG ==
  
   <interface type="direct">
+
   <nowiki><interface type="direct">
 
       <source dev="eth0">
 
       <source dev="eth0">
 
       <portprofile type="802.1qbg">
 
       <portprofile type="802.1qbg">
Line 82: Line 82:
 
    instanceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/>
 
    instanceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/>
 
       </portprofile>
 
       </portprofile>
   </interface>
+
   </interface></nowiki>
  
 
== VIF_TYPE_802_QBH ==
 
== VIF_TYPE_802_QBH ==
  
   <interface type="direct">
+
   <nowiki><interface type="direct">
 
       <source dev="eth0" mode="vepa">
 
       <source dev="eth0" mode="vepa">
 
       <portprofile type="802.1qbh">
 
       <portprofile type="802.1qbh">
 
         <parameters profileid="manager"/>
 
         <parameters profileid="manager"/>
 
       </portprofile>
 
       </portprofile>
   </interface>
+
   </interface></nowiki>
  
 
== VIF_TYPE_HW_VEB ==
 
== VIF_TYPE_HW_VEB ==
  
   <interface type="direct">
+
   <nowiki><interface type="direct">
 
       <source dev="eth0" mode="passthrough">
 
       <source dev="eth0" mode="passthrough">
   </interface>
+
   </interface></nowiki>
  
 
Or
 
Or
  
   <interface type="hostdev">
+
   <nowiki><interface type="hostdev">
 
       <source dev="00:02:10.2"/>
 
       <source dev="00:02:10.2"/>
 
       <vlan>3</vlan>
 
       <vlan>3</vlan>
   </interface>
+
   </interface></nowiki>
  
  
Line 110: Line 110:
  
  
   <interface type="direct">
+
   <nowiki><interface type="direct">
 
       <source dev="eth0" mode="passthrough">
 
       <source dev="eth0" mode="passthrough">
   </interface>
+
   </interface></nowiki>
  
  
 
== VIF_TYPE_MIDONET ==
 
== VIF_TYPE_MIDONET ==
  
     <interface type="ethernet">
+
     <nowiki><interface type="ethernet">
 
       <target dev="vnet0"/>
 
       <target dev="vnet0"/>
     </interface>
+
     </interface></nowiki>
  
 
== VIF_TYPE_VHOSTUSER ==
 
== VIF_TYPE_VHOSTUSER ==
  
     <interface type="vhostuser">
+
     <nowiki><interface type="vhostuser">
 
       <source type="unix" path="/some/sock" mode="0775"/>
 
       <source type="unix" path="/some/sock" mode="0775"/>
     </interface>
+
     </interface></nowiki>
  
 
== VIF_TYPE_VROUTER ==
 
== VIF_TYPE_VROUTER ==
  
   <interface type="ethernet">
+
   <nowiki><interface type="ethernet">
 
       <target dev="vnet0"/>
 
       <target dev="vnet0"/>
     </interface>
+
     </interface></nowiki>
  
 
== VIF_TYPE_OTHER ==
 
== VIF_TYPE_OTHER ==
Line 139: Line 139:
 
== Proposed: VIF_TYPE_MACVTAP ==
 
== Proposed: VIF_TYPE_MACVTAP ==
  
   <interface type='direct'>
+
   <nowiki><interface type='direct'>
 
<source dev='eth0' mode=’vepa|bridge’/>
 
<source dev='eth0' mode=’vepa|bridge’/>
   </interface>
+
   </interface></nowiki>

Revision as of 14:51, 24 June 2015

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.

   <interface type="...">
        <mac address="01:02:ab:de:03:04"/>
        <model type="virtio|e1000|...."/>
        <driver name="vhost|qemu"/>
        <bandwidth>
         ....QOS settings...
        </bandwidth>
    </interface>

VIF_TYPE_OVS

Primary method:

   <interface type="bridge">
       <source bridge="br0"/>
       <target dev="vnet0"/>
       <portprofile type="openvswitch">
         <parameters
	       interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'
	       profileid="something"/>
       </portprofie>
    </interface>

Or if firewall filtering is needed, it uses

   <interface type="bridge">
       <source bridge="br0"/>
       <target dev="vnet0"/>
       <filterref name="nwfilter"/>
    </interface>

VIF_TYPE_IVS

Either

   <interface type="ethernet">
       <target dev="vnet0"/>
    </interface>

Or if firewall filtering is needed, it uses

   <interface type="bridge">
       <source bridge="br0"/>
       <target dev="vnet0"/>
    </interface>

VIF_TYPE_DVS

VMWare specific, not used by libvirt

VIF_TYPE_IOVISOR

   <interface type="ethernet">
       <target dev="vnet0"/>
    </interface>

VIF_TYPE_BRIDGE

   <interface type="bridge">
       <source bridge="br0"/>
       <target dev="vnet0"/>
       <filterref name="nwfilter"/>
    </interface>

VIF_TYPE_802_QBG

  <interface type="direct">
      <source dev="eth0">
      <portprofile type="802.1qbg">
        <parameters
	    managerid="11"
	    typeid="1193047"
	    typeidversion="2"
	    instanceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/>
      </portprofile>
   </interface>

VIF_TYPE_802_QBH

  <interface type="direct">
      <source dev="eth0" mode="vepa">
      <portprofile type="802.1qbh">
        <parameters profileid="manager"/>
      </portprofile>
   </interface>

VIF_TYPE_HW_VEB

  <interface type="direct">
      <source dev="eth0" mode="passthrough">
   </interface>

Or

  <interface type="hostdev">
      <source dev="00:02:10.2"/>
      <vlan>3</vlan>
   </interface>


VIF_TYPE_MLNX_DIRECT

  <interface type="direct">
      <source dev="eth0" mode="passthrough">
   </interface>


VIF_TYPE_MIDONET

   <interface type="ethernet">
       <target dev="vnet0"/>
    </interface>

VIF_TYPE_VHOSTUSER

   <interface type="vhostuser">
       <source type="unix" path="/some/sock" mode="0775"/>
    </interface>

VIF_TYPE_VROUTER

  <interface type="ethernet">
       <target dev="vnet0"/>
    </interface>

VIF_TYPE_OTHER

Dummy placeholder, not used by libvirt.

Proposed: VIF_TYPE_MACVTAP

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