OpenStack Mitaka Neutron SR-IOV配置

### 一、在所有节点(控制节点、计算节点)
1、修改BIOS

```
BOIS里面开启SR-IOV功能
开启 VT-d (inter virtualization technology)和 SR-IOV
```

2、修改系统配置

```
# cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed ‘s, release .*$,,g‘ /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet intel_iommu=on ixgbe.max_vfs=16"
GRUB_DISABLE_RECOVERY="true"
其中intel_iommu=on ixgbe.max_vfs=16是新添加的
```

```
grub2-mkconfig -o /boot/grub2/grub.cfg
```

3、安装配置软件包

```
yum -y install openstack-neutron-sriov-nic-agent.noarch

```

4、所有节点全部重启

为了保证控制节点集群稳定性,控制节点请一台一台重启

### 二、控制节点配置

```
# 增加sriov支持
vi /etc/neutron/plugins/ml2/ml2_conf.ini

mechanism_drivers = openvswitch,sriovnicswitch

# 查看网卡
lspci -nn | grep -i ethernet
[[email protected] ~]# lspci -nn | grep -i ethernet
04:00.0 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01)
04:00.1 Ethernet controller [0200]: Intel Corporation I350 Gigabit Network Connection [8086:1521] (rev 01)...
08:12.6 Ethernet controller [0200]: Intel Corporation 82599 Ethernet Controller Virtual Function [8086:10ed] (rev 01)
08:13.0 Ethernet controller [0200]: Intel Corporation 82599 Ethernet Controller Virtual Function [8086:10ed] (rev 01)
08:13.2 Ethernet controller [0200]: Intel Corporation 82599 Ethernet Controller Virtual Function [8086:10ed] (rev 01)
08:13.4 Ethernet controller [0200]: Intel Corporation 82599 Ethernet Controller Virtual Function [8086:10ed] (rev 01)
08:13.6 Ethernet controller [0200]: Intel Corporation 82599 Ethernet Controller Virtual Function [8086:10ed] (rev 01)
82:00.0 Ethernet controller [0200]: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] (rev 0...
82:10.0 Ethernet controller [0200]: Intel Corporation 82599 Ethernet Controller Virtual Function [8086:10ed] (rev 01)
82:13.6 Ethernet controller [0200]: Intel Corporation 82599 Ethernet Controller Virtual Function [8086:10ed] (rev 01)

# 配置PCI
vi /etc/neutron/plugins/ml2/ml2_conf_sriov.ini

[ml2_sriov]
supported_pci_vendor_devs = 8086:10ed

# 增加sriov配置文件
vi /usr/lib/systemd/system/neutron-server.service

--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini
--config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini

# 增加调度算法支持sriov
vi /etc/nova/nova.conf

[DEFAULT]
scheduler_available_filters=nova.scheduler.filters.all_filters
scheduler_default_filters=RetryFilter,AvailabilityZoneFilter,RamFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,CoreFilter, PciPassthroughFilter

# 绑定物理网卡
vi /etc/neutron/plugins/ml2/sriov_agent.ini
[sriov_nic]
physical_device_mappings = external:enp130s0

# 重启服务
pcs resource restart openstack-nova-consoleauth-clone
pcs resource restart neutron-server-clone

```

### 三、计算节点配置

```
# 计算节点开启SR-IOV agent
vi /etc/neutron/plugins/ml2/sriov_agent.ini

[securitygroup]
firewall_driver = neutron.agent.firewall.NoopFirewallDriver
[sriov_nic]
physical_device_mappings = external:enp130s0
exclude_devices =

# 计算节点开放白名单
vi /etc/nova/nova.conf

pci_passthrough_whitelist = [{"devname":"enp130s0","physical_network":"external"}]

# 重启服务
systemctl start neutron-sriov-nic-agent
systemctl enable neutron-sriov-nic-agent

systemctl restart openstack-nova-compute

```

### 四、测试

```
# 创建相关主机
neutron port-create <net-id> --binding:vnic-type direct
#nova boot --flavor m1.large --image <image>--nic port-id=<port1> --nic port-id=<port2> <vm name>

ip link show p4p1

[[email protected] ~]# ip link show enp130s0
5: enp130s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
    link/ether 00:e0:ed:2e:20:c6 brd ff:ff:ff:ff:ff:ff
    vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 2 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 3 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 4 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 5 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 6 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 7 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 8 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 9 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 10 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 11 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 12 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 13 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 14 MAC 00:00:00:00:00:00, spoof checking on, link-state auto
    vf 15 MAC fa:16:3e:73:2c:ee, vlan 46, spoof checking on, link-state auto
```

  

原文地址:https://www.cnblogs.com/wanstack/p/8757379.html

时间: 2024-10-14 14:33:10

OpenStack Mitaka Neutron SR-IOV配置的相关文章

使用Fuel 9.0快速部署Openstack Mitaka

关于什么是Fuel以及Fuel的作用和构架可以参考下面Openstack官方给出的Wiki链接. https://wiki.openstack.org/wiki/Fuel. 在安装部署之前,先看看官方给出的Fuel 9.0版本特性. Mirantis OpenStack is distributed as a single commercially supportedpackage in ISO format. The 9.0 release features: ·       Enhanced

CENTOS7 安装openstack mitaka版本(最新整理完整版附详细截图和操作步骤,添加了cinder和vxlan)

CENTOS7 安装openstack mitaka版本(最新整理完整版附详细截图和操作步骤,添加了cinder和vxlan,附上个节点的配置文件) 实验环境准备: 为了更好的实现分布式mitaka版本的效果.我才有的是VMware的workstations来安装三台虚拟机,分别来模拟openstack的controller节点 compute节点和cinder节点.(我的宿主机配置为 500g 硬盘 16g内存,i5cpu.强烈建议由条件的朋友将内存配置大一点,因为我之前分配的2g太卡.) 注

OpenStack Mitaka Horiozn 主题开发

一.写在前面 这篇文章主要介绍了OpenStack Mitaka Horizo主题的开发.这里只是说明horiozn主题包的开发逻辑,不具体阐述css.js.html文件的开发, 仅仅是说明horizon主题开发的方式,因为时间仓促以及个人理解有限,固有错误的地方请指出,后续将会不定期的完善,谢谢! 如果转载,请保留作者信息. 邮箱地址:[email protected] 主题下载地址:http://www.smallartisan.site/?p=38 二.环境准备 注意:如果没有特殊说明,一

OpenStack Mitaka HA部署方案(随笔)

[Toc] --- title: Openstack Mitaka 集群安装部署 date: 2017-03-04-14 23:37 tags: Openstack --- ==openstack运维开发群:94776000 欢迎牛逼的你== ### Openstack Mitaka HA 实施部署测试文档 #### 一.环境说明 ##### 1.主机环境 ``` controller(VIP) 192.168.10.100 controller01 192.168.10.101, 10.0.0

CENTOS7.2使用RDO方式安装OpenStack Mitaka笔记

1.配置/etc/hosts 192.168.13.108 openstack 2.配置OpenStack Mitaka安装源 [[email protected] ~]# sudo yum install -y centos-release-openstack-mitaka [[email protected] ~]# yum clean all; yum makecache; yum update 3.安装packstack,开始安装OpenStack [[email protected]

openstack项目【day24】:OpenStack mitaka部署

前言: openstack的部署非常简单,简单的前提建立在扎实的理论功底,本人一直觉得,玩技术一定是理论指导实践,网上遍布个种搭建方法都可以实现一个基本的私有云环境,但是诸位可曾发现,很多配置都是重复的,为何重复?到底什么位置该不该配?具体配置什么参数?很多作者本人都搞不清楚,今天本人就是要在这里正本清源. 介绍:本次案列为基本的三节点部署,集群案列后期有时间再整理 一:网络: 1.管理网络:172.16.209.0/24 2.数据网络:1.1.1.0/24 二:操作系统:CentOS Linu

使用Fuel 9.0快速部署Openstack Mitaka(其实也就用了五六个小时吧)

关于什么是Fuel以及Fuel的作用和构架可以参考下面Openstack官方给出的Wiki链接. https://wiki.openstack.org/wiki/Fuel. 在安装部署之前,先看看官方给出的Fuel 9.0版本特性. Mirantis OpenStack is distributed as a single commercially supportedpackage in ISO format. The 9.0 release features: ·       Enhanced

OpenStack Mitaka HA高可用搭建

OpenStack Mitaka HA高可用搭建mini试看版version 1.0环境虚拟机列表:10.1.1.120 controller1 controller1.test.com10.1.1.121 controller2 controller2.test.com10.1.1.122 controller3 controller3.test.com10.1.1.133 compute1 compute1.test.com10.1.1.134 glance-backend backend.

Openstack Mitaka for Centos7.2 部署指南(一)

本文主要参考 https://www.zybuluo.com/ncepuwanghui/note/389373 OpenStack Mitaka for Ubuntu 16.04 LTS 部署指南 http://docs.openstack.org/mitaka/install-guide-rdo/ 官方文档 把上面的Ubuntu 换成Centos,其他详情请看上面的部署指南 本文主要参考 https://www.zybuluo.com/ncepuwanghui/note/389373 Open