最新的PVE直通Nvidia独显已经很方便了,不用再搞/etc/modprobe.d/vfio.conf文件了,简单说一下。核显暂时没折腾。

直通环境

首先你要看过我的安装PVE并开启硬件直通这篇blog并做好直通环境。

屏蔽显卡驱动

编辑这个文件

1
nano /etc/modprobe.d/pve-blacklist.conf

按需屏蔽

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# This file contains a list of modules which are not supported by Proxmox VE                          2
# nidiafb see bugreport https://bugzilla.proxmox.com/show_bug.cgi?id=701

# Nvidia
blacklist nvidiafb
blacklist nouveau
blacklist nvidia

# AMD
blacklist amdgpu
blacklist radeon

# Intel UHD
blacklist snd_hda_codec_hdmi
blacklist snd_hda_intel
blacklist snd_hda_codec
blacklist snd_hda_core

options nouveau modeset=0

创建虚拟机并添加直通

虚拟机机型选q35,用UEFI,勾上Qemu代理,显示设备在装好系统以后改成none

添加pci设备,选中你的GPU,主GPU所有功能PCI-Express这三个选项全勾上。

进Windows系统,联网,一会儿驱动就会自动安装好的。

参考文章

PVE系统,独立显卡直通
PVE 7.3 优化和显卡直通