Openstack linuxbridge改ovs(O版)

一,卸载linuxbridge

systemctl stop neutron-linuxbridge-agent
yum remove openstack-neutron-linuxbridge

二,清理数据

source /root/admin-openrc.sh
openstack network agent delete `openstack network agent list | grep -i "Linux bridge agent" | awk '{print $2}'`

三,安装ovs

# 把openvswitch的包拷贝到yum本地仓库目录,并createrepo
yum -y install openstack-neutron-openvswitch
systemctl restart neutron-openvswitch-agent
systemctl enable neutron-openvswitch-agent

四,配置ovs

ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex ens37
ifconfig ens37 192.168.1.1/24

cat >> /etc/rc.d/rc.local <<EOF
echo ovs-vsctl add-br br-ex
ovs-vsctl add-port br-ex ens37
ifconfig eth0 192.168.1.1/24
EOF

chmod +x /etc/rc.d/rc.local

五,配置neutron

vim /etc/neutron/plugins/ml2/ml2_conf.ini
    mechanism_drivers = openvswitch,l2population
    
cat /etc/neutron/l3_agent.ini| grep -v ^# | grep -v ^$
[DEFAULT]
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
[agent]
[ovs]

cat /etc/neutron/dhcp_agent.ini | grep -v ^# | grep -v ^$
[DEFAULT]
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
[agent]
[ovs]

cat /etc/neutron/plugins/ml2/openvswitch_agent.ini | grep -v ^# | grep -v ^$
[DEFAULT]
[agent]
tunnel_types = vxlan
l2_population = True
[ovs]
bridge_mappings = provider:br-ex
tunnel_bridge = br-tun
local_ip = 192.168.108.100
integration_bridge = br-int
enable_tunneling = True
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True
[xenapi]

六,重启服务

systemctl restart neutron-openvswitch-agent.service  neutron-server.service  neutron-dhcp-agent.service  neutron-metadata-agent.service neutron-l3-agent.service

本文链接:

http://blog.ps-ef.cn/OpenStack/71.html
1 + 6 =
快来做第一个评论的人吧~