在Proxmox VE 7.2 中开启vGPU_unlock,实现显卡虚拟化

在Proxmox VE 7.2 中开启vGPU_unlock,实现显卡虚拟化

一:参考7.1安装vGPU_unlock

https://foxi.buduanwang.vip/virtualization/1683.html/

 

二: 配置软件源

  1. rm /etc/apt/sources.list
  2. rm /etc/apt/sources.list.d/*
  3. echo “deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free”>>/etc/apt/sources.list
  4. echo “deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free”>>/etc/apt/sources.list
  5. echo “deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free”>>/etc/apt/sources.list
  6. echo “deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free”>>/etc/apt/sources.list
  7. echo “deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bullseye pve-no-subscription”>>/etc/apt/sources.list

三:安装软件包

  1. apt update && apt install dkms git build-essential pve-kernel-5.15 pve-headers-5.15 dkms cargo jq uuid-runtime -y

安装mdevctl

  1. wget -P /opt/ http://ftp.br.debian.org/debian/pool/main/m/mdevctl/mdevctl_0.81-1_all.deb
  2. dpkg -i /opt/mdevctl_0.81-1_all.deb

四:配置内核

  1. echo vfio >> /etc/modules
  2. echo vfio_iommu_type1 >> /etc/modules
  3. echo vfio_pci >> /etc/modules
  4. echo vfio_virqfd >> /etc/modules
  5. echo “blacklist nouveau” >> /etc/modprobe.d/blacklist.conf
  6. echo “options kvm ignore_msrs=1” > /etc/modprobe.d/kvm.conf
  7. update-initramfs -k all -u

五:配置引导

  1. #编辑grub,请不要盲目改。根据自己的环境,选择设置
  2. nano /etc/default/grub
  3. #在里面找到:
  4. GRUB_CMDLINE_LINUX_DEFAULT=”quiet”
  5. #然后修改为:
  6. GRUB_CMDLINE_LINUX_DEFAULT=”quiet intel_iommu=on iommu=pt”
  7. #如果是amd cpu请改为:
  8. GRUB_CMDLINE_LINUX_DEFAULT=”quiet amd_iommu=on iommu=pt”
  9. #更新引导
  10. update-grub

重新启动

六:安装驱动

下载驱动文件

  1. wget https://mirrors.apqa.cn/d/vGPU/vgpu_unlock/drivers/NVIDIA-Linux-x86_64-510.47.03-vgpu-kvm-custom.run -P /opt

安装驱动

  1. sh -c /opt/NVIDIA-Linux-x86_64-510.47.03-vgpu-kvm-custom.run –dkms

电脑萤幕画面

描述已自动生成

安装vgpu_unlock

  1. cd /opt && git clone https://github.com/mbilker/vgpu_unlock-rs.git
  2. cd /opt/vgpu_unlock-rs
  3. cargo build –release
  4. mkdir /etc/systemd/system/{nvidia-vgpud.service.d,nvidia-vgpu-mgr.service.d}
  5. echo -e “[Service]\nEnvironment=LD_PRELOAD=/opt/vgpu_unlock-rs/target/release/libvgpu_unlock_rs.so” > /etc/systemd/system/nvidia-vgpud.service.d/vgpu_unlock.conf
  6. echo -e “[Service]\nEnvironment=LD_PRELOAD=/opt/vgpu_unlock-rs/target/release/libvgpu_unlock_rs.so” > /etc/systemd/system/nvidia-vgpu-mgr.service.d/vgpu_unlock.conf
  7. systemctl daemon-reload

重启主机

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇