openvswitch 桥接到kvm
1.定义桥接网络
新建网络配置文件
sudo vi /etc/libvirt/qemu/networks/ovs-br0.xml
<network>
<name>ovs-br0</name>
<forward mode='bridge'/>
<bridge name='ovs-br0'/>
<virtualport type='openvswitch'/>
</network>
ovs-br0 为openvswitch 的桥名称
2.新建网络
sudo virsh net-define /etc/libvirt/qemu/networks/ovs-br0.xml
3.启动kvm桥接网络 ovs-br0
virsh net-start ovs-br0
4.设置kvm的桥接网络 ovs-br0 开机自动启动
virsh net-autostart ovs-br0
5.验证新创建的网络配置
$ virsh net-list
Name State Autostart Persistent
----------------------------------------------------------
ovs-br0 active yes yes