20230425173504.jpg

去虚拟化

编辑文件

nano /etc/pve/qemu-server/1XX.conf

输入参数

args: -cpu 'host,-hypervisor,+kvm_pv_unhalt,+kvm_pv_eoi,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex,hv_runtime,hv_relaxed,kvm=off,hv_vendor_id=intel'

NVME直通

编辑文件

nano /etc/pve/qemu-server/1XX.conf

输入参数

args: -set device.hostpci0.x-msix-relocation=bar2

添加Vendor-Reset

AMD显卡直通会出现第一次启动VM之后,如果关闭或重启VM,则显卡就会工作不正常、掉驱动甚至不工作的问题,这是由于AMD Reset Bug导致VM关机后显卡不能正确重置,大多数主机开机只能使用一次,第二次尝试使用显卡则会导致VM启动失败/VM宿主机都卡死

下载Kernel Header

https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/dists/bullseye/pve-no-subscription/binary-amd64/

安装 Vendor-Reset

apt install pve-headers-$(uname -r)
apt install git dkms build-essential

下载vender-reset驱动并编译
git clone https://github.com/gnif/vendor-reset.git
cd vendor-reset
dkms install .

将驱动添加到modules管理中
echo "vendor-reset" >> /etc/modules
update-initramfs -u

重启后运行
dmesg | grep vendor
如果有输出,则表示安装成功
[    8.851280] vendor_reset_hook: installed

VirtIO Windows驱动

virtio-win.zip

Last modification:November 12, 2023
If you think my article is useful to you, please feel free to appreciate