/// If you are using GRUB
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
/// Then save the changes and update grub
update-grub
3、加载必要的模块,修改,/etc/modules
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
/// Note that in the 5.4 based kernels some of those modules are already built into the kernel directly. 5.4版本的内核,有的模块已经加载了,不过,为了保险期间,这几个可添加一下
4、重启设备
reboot
5、检查状态
dmesg | grep -e DMAR -e IOMMU
/// There should be a line that looks like "DMAR: IOMMU enabled". If there is no output, something is wrong. 如果显示 DMAR: IOMMU enabled,则表示开启成功,如果有其他提示,估计就是报错了。
root@pve:/etc/network# cat interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
iface enp1s0 inet manual
iface enp2s0 inet manual
iface enp3s0 inet manual
iface enp4s0 inet manual
auto bond0
iface bond0 inet manual
bond-slaves enp2s0 enp3s0 enp4s0
bond-miimon 100
bond-mode balance-rr
auto vmbr0
iface vmbr0 inet static
address 10.25.50.75/24
gateway 10.25.50.1
bridge-ports bond0
bridge-stp off
bridge-fd 0
root@pve:/etc/network#