libvirtError: Unable to add bridge br0 port vnet0: Operation not supported

Open vSwitch + KVM 启动虚拟机时,报错:
libvirtError: Unable to add bridge brvlan1786 port vnet1: Operation not supported

问题描述:
操作系统 Ubuntu14.04
安装完OVS,KVM
创建一个bridge brvlan1786
通过virt-manager启动一个虚机kvm1,并把网络接口挂到bridge上
网卡设置如下:
libvirtError: Unable to add bridge br0 port vnet0: Operation not supported_第1张图片
点击启动虚机时,报如下错误:
libvirtError: Unable to add bridge br0 port vnet0: Operation not supported_第2张图片

问题原因:
启动虚拟机时 libvirt 会尝试 linux 默认的LinuxBridge,而不是openvswitch

解决方案:

virsh edit kvm1

interface部分加上

type='openvswitch' />

也就是改动为

type='bridge'>
      '52:54:00:9a:4e:ac'/>
      'brvlan1786'/>
      type='openvswitch' />
      type='virtio'/>
      
type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>

保存后,再启动就没问题了

你可能感兴趣的:(KVM,OpenvSwitch)