### 一、在所有节点(控制节点、计算节点)
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
[root@controller01 ~]# 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 [root@compute04 ~]# 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
```

  

最新文章

  1. Echarts图表控件使用总结2(Line,Bar)—问题篇
  2. 用php输入表格内容
  3. JavaScript 同名方法的处理
  4. Java基础知识强化之集合框架笔记72:集合特点和数据结构总结
  5. Bluestacks 安卓模拟器利器
  6. ShareSDK 社会化分享 集成步骤
  7. java 读取固定目录下的文件(和上篇差点儿相同)
  8. JavaScript Set Cursor Style
  9. Java 新特性(4) - JDK 8 新特性
  10. 实现透明渐变的Activity
  11. 【转】程序员必须知道的几个Git代码托管平台
  12. java基础 —— properties 使用
  13. 【Alpha】测试报告
  14. 【SoftwareTesting】Lab 1
  15. Mysql优化_慢查询开启说明及Mysql慢查询分析工具mysqldumpslow用法讲解
  16. Git的学习与使用
  17. poj 2976(二分搜索+最大化平均值)
  18. 牛客网校招全国统一模拟笔试(二月场)- Java方向
  19. 尚硅谷redis学习5-初识redis.conf
  20. Effective STL读书笔记

热门文章

  1. 转载 C#开发串口总结,并提炼串口辅助类到公用类库中
  2. Element 中表单非必填数据项 必须为数字的验证问题
  3. VS和IE或者360兼容模式简单调试js方法
  4. java中全面的单例模式多种实现方式总结
  5. linux环境上运行.net core 初探
  6. vuejs模仿实现一个电影分享类网站
  7. mybatis-3 Dynamic SQL
  8. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.3
  9. Python面试题目之(针对dict或者set数据类型)边遍历 边修改 报错dictionary changed size during iteration
  10. Calling Convention的总结