Neutron配置OVS-DPDK时,所做的一些配置,这个是我同事写的,我就表脸的拿过来了。
neutron-openvswitch-agent + DPDK
# 配置 /etc/neutron/plugins/ml2/openvswitch_agent.ini
##为加速Overlay, 物理网卡加入br-tun, IP配置到br-tun
[ovs]
vhostuser_socket_dir = /var/run/openvswitch/
datapath_type = netdev
bridge_mappings = physnet1:br-eth1
tunnel_bridge = br-tun
local_ip = 192.168.200.132
of_interface = ovs-ofctl
OVN + DPDK
# 配置 ovn-controller
ovs-vsctl set open . external_ids=ovn-remote:tcp:$controller_ip:6642
ovs-vsctl set open . external_ids=ovn-encap-ip:$local_host_ip
ovs-vsctl set open . external_ids=ovn-encap-type:geneve
ovs-vsctl set open . external_ids:datapath-type="netdev"
ovs-vsctl set open . external_ids:iface-types="dpdkvhostuser"
创建虚拟机
OVS-DPDK使用hugepages和虚拟机通信,所以启动ovs-dpdk之后,想要创建虚拟机之前,需要创建一个使用hugepage的flavor。
nova flavor-key <FLAVOR> set hw:mem_page_size=large