</interface>
...
</devices>
+ ...</pre>
+
+ <p>
+ On hosts that support Open vSwitch on the kernel side and have the
+ Midonet Host Agent configured, it is also possible to connect to the
+ 'midonet' bridge device by adding a
+ <code><virtualport type='midonet'/></code> to the
+ interface definition. (<span class="since">Since
+ 1.2.13</span>). The Midonet virtualport type requires an
+ <code>interfaceid</code> attribute in its
+ <code><parameters></code> element. This interface id is the UUID
+ that specifies which port in the virtual network topology will be bound
+ to the interface.
+ </p>
+<pre>
+ ...
+ <devices>
+ ...
+ <interface type='bridge'>
+ <source bridge='br0'/>
+ </interface>
+ <interface type='bridge'>
+ <source bridge='br1'/>
+ <target dev='vnet7'/>
+ <mac address="00:11:22:33:44:55"/>
+ </interface>
+ <interface type='bridge'>
+ <source bridge='midonet'/>
+ <virtualport type='midonet'>
+ <parameters interfaceid='0b2d64da-3d0e-431e-afdd-804415d6ebbb'/>
+ </virtualport>
+ </interface>
+ ...
+ </devices>
...</pre>
<h5><a name="elementsNICSSlirp">Userspace SLIRP stack</a></h5>
</optional>
</element>
</group>
+ <group>
+ <element name="virtualport">
+ <attribute name="type">
+ <value>midonet</value>
+ </attribute>
+ <element name="parameters">
+ <attribute name="interfaceid">
+ <ref name="UUID"/>
+ </attribute>
+ </element>
+ </element>
+ </group>
<group>
<!-- use this when no type attribute is present -->
<element name="virtualport">
virBufferAsprintf(buf, " instanceid='%s'", uuidstr);
}
if (virtPort->interfaceID_specified &&
- (type == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH ||
+ (type == VIR_NETDEV_VPORT_PROFILE_MIDONET ||
+ type == VIR_NETDEV_VPORT_PROFILE_OPENVSWITCH ||
type == VIR_NETDEV_VPORT_PROFILE_NONE)) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
}
}
break;
+
+ case VIR_NETDEV_VPORT_PROFILE_MIDONET:
+ if (!virtport->interfaceID_specified)
+ missing = "interfaceid";
+ break;
}
if (missing) {
--- /dev/null
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <interface type='bridge'>
+ <mac address='00:11:22:33:44:55'/>
+ <source bridge='midonet'/>
+ <virtualport type='midonet'>
+ <parameters interfaceid='09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f'/>
+ </virtualport>
+ <model type='virtio'/>
+ </interface>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
DO_TEST("net-virtio-network-portgroup");
DO_TEST("net-hostdev");
DO_TEST("net-hostdev-vfio");
+ DO_TEST("net-midonet");
DO_TEST("net-openvswitch");
DO_TEST("sound");
DO_TEST("sound-device");