SR-IOV无法通信问题

虚拟机调用了PCI host device, 但是开启虚拟机时报错
host doesn’t support passthrough of host PCI device

需要在几个地方添加intel_iommu=on

【第一个地方】
	[root@localhost centos]# 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="crashkernel=auto rd.lvm.lv=vg_localhost/lv_root rd.lvm.lv=vg_localhost/lv_swap rhgb quiet intel_iommu=on isolcpus=2,4,6,8 nohz_full=2,4,6,8 rcu_nocbs=2,4,6,8 intel_pstate=disable
	"GRUB_DISABLE_RECOVERY="true"
【第二个地方】

[root@localhost centos]# cat /boot/efi/EFI/centos/grub.cfg

menuentry ‘CentOS Linux (3.10.0-1160.53.1.el7.x86_64) 7 (Core)’ --class centos --class gnu-linux --class gnu --class os --unrestricted KaTeX parse error: Expected '}', got 'EOF' at end of input: …' if [ xfeature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 d614ba29-ce3f-4bb3-a5fd-df954c6f105f
else
search --no-floppy --fs-uuid --set=root d614ba29-ce3f-4bb3-a5fd-df954c6f105f
fi
linuxefi /vmlinuz-3.10.0-1160.53.1.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on LANG=zh_CN.UTF-8
initrdefi /initramfs-3.10.0-1160.53.1.el7.x86_64.img
}
menuentry ‘CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core)’ --class centos --class gnu-linux --class gnu --class os --unrestricted KaTeX parse error: Expected '}', got 'EOF' at end of input: …' if [ xfeature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 d614ba29-ce3f-4bb3-a5fd-df954c6f105f
else
search --no-floppy --fs-uuid --set=root d614ba29-ce3f-4bb3-a5fd-df954c6f105f
fi
linuxefi /vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on LANG=zh_CN.UTF-8
initrdefi /initramfs-3.10.0-957.el7.x86_64.img
}
menuentry ‘CentOS Linux (0-rescue-7b4211c6b26e4d958ab49df27ae76e62) 7 (Core)’ --class centos --class gnu-linux --class gnu --class os --unrestricted KaTeX parse error: Expected '}', got 'EOF' at end of input: …' if [ xfeature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 d614ba29-ce3f-4bb3-a5fd-df954c6f105f
else
search --no-floppy --fs-uuid --set=root d614ba29-ce3f-4bb3-a5fd-df954c6f105f
fi
linuxefi /vmlinuz-0-rescue-7b4211c6b26e4d958ab49df27ae76e62 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet intel_iommu=on
initrdefi /initramfs-0-rescue-7b4211c6b26e4d958ab49df27ae76e62.img
}

【第三个地方】

执行grub2-mkconfig -o /boot/grub2/grub.cfg
这个文件应该跟cat /boot/efi/EFI/centos/grub.cfg的内容一样

修改完成后需要重启设备。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值