Libvirt Openvswitch: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Thomas (Diskussion | Beiträge) |
Thomas (Diskussion | Beiträge) |
||
| Zeile 38: | Zeile 38: | ||
==XML Interface in der VM== | ==XML Interface in der VM== | ||
<pre> | <pre> | ||
| − | <interface type=' | + | <interface type='bridge'> |
<mac address='52:54:00:ce:c8:d1'/> | <mac address='52:54:00:ce:c8:d1'/> | ||
| − | <source network='ovs-network' portgroup=' | + | <source network='ovs-network' portgroup='vlan2' bridge='vmbr0'/> |
| + | <vlan> | ||
| + | <tag id='2'/> | ||
| + | </vlan> | ||
| + | <virtualport type='openvswitch'> | ||
| + | <parameters interfaceid='9564f940-6516-4a95-864f-b0c89a8eac95'/> | ||
| + | </virtualport> | ||
| + | <target dev='vnet0'/> | ||
<model type='rtl8139'/> | <model type='rtl8139'/> | ||
| + | <alias name='net0'/> | ||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> | <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> | ||
| − | </interface> | + | </interface> |
</pre> | </pre> | ||
*[[Open Vswitch]] | *[[Open Vswitch]] | ||
Version vom 12. Oktober 2017, 21:13 Uhr
Openswitch integration
ovs-network.xml
<network connections='1'>
<name>ovs-network</name>
<forward mode='bridge'/>
<bridge name='vmbr0'/>
<virtualport type='openvswitch'/>
<portgroup name='vlan1'>
<vlan>
<tag id='1'/>
</vlan>
</portgroup>
<portgroup name='vlan2'>
<vlan>
<tag id='2'/>
</vlan>
</portgroup>
<portgroup name='vlan252'>
<vlan>
<tag id='252'/>
</vlan>
</portgroup>
<portgroup name='vlan-all'>
<vlan trunk='yes'>
<tag id='2'/>
<tag id='252'/>
</vlan>
</portgroup>
</network>
Aktivieren
- virsh net-define openswitch.xml
- virsh net-start ovs-network
- virsh net-autostart ovs-network
- virsh net-list --all
XML Interface in der VM
<interface type='bridge'>
<mac address='52:54:00:ce:c8:d1'/>
<source network='ovs-network' portgroup='vlan2' bridge='vmbr0'/>
<vlan>
<tag id='2'/>
</vlan>
<virtualport type='openvswitch'>
<parameters interfaceid='9564f940-6516-4a95-864f-b0c89a8eac95'/>
</virtualport>
<target dev='vnet0'/>
<model type='rtl8139'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>