Skip to content

通过知识获得解放,通过技术获得自由

Menu
  • 专题目录
  • 液压相关
    • 液压技术
    • 液压相邻技术
    • 液压应用
  • 计算机相关
    • 计算机和软件
    • 网络和网站技术
  • 哲学
  • 关于本站
Menu

PVE 直通设置iommu[0]

Posted on 2023年11月14日 by
在PVE上要发挥虚拟机的千兆网卡的性能,需要在配置网卡是注意选择半虚拟化网卡,之前选择的E1000会随着网络负载的升高,明显的增加CPU负载,采用半虚拟化网卡,这个现象降低了很多。PVE下采用网卡直通除了进一步的提升网络性能,就是需要减少cpu的负载。

PVE的网卡直通较ESXI设置困难,而且存在ROS下对I211网卡不识别的问题,因此对于使用ROS作为主力的设备需要注意这一点,采用ikuai作为主力设备是能够识别的。另外PVE每个虚拟机只能识别4个PCI设备。

  • PVE的网卡直通主机上的设置

修改grub(与centos稍有差异)。编辑文件 /etc/default/grub

修改行 GRUB_CMDLINE_LINUX_DEFAULT="quiet 使其为 GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

命令: update-grub

 

  • 重启检验其效果,

用以下指令验证其有效性。

dmesg | grep iommu

 

 

  • 非必须——修改文件 /etc/modules 加入如下的行(默认为空):

默认如下:

添加如下内容:

 

update-initramfs -u -k all

重启

  • 查找网卡ID

lspci |grep net

设置完成下,需要重启PVE主机,在进行下一步的操作。

  • 在相应的虚拟机下添加PCI网络设备。

或者也可以按照以下代码实现

打开文件 /etc/pve/nodes/fanlog/qemu-server/103.conf 103为PVE下的虚拟机的id。必须手工添加以下内容:

machine:i440fx
hostpci0:02:00.0,pcie=1  # 网卡 1
hostpci1:02:00.1,pcie=1  # 网卡 2

参考资料:

  1. https://www.codercto.com/a/44311.html
  2. https://foxi.buduanwang.vip/yj/561.html/

欢迎回来

希望本站对你有所帮助!

如有疑问请联系info@fanlog.org
2023 年 11 月
一二三四五六日
 12345
6789101112
13141516171819
20212223242526
27282930 
« 6 月    

AI辅助 (17)

© 2025 | Powered by Superbs Personal Blog theme
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT