禁用host加載顯示卡 例如:
echo "blacklist radeon" >> /etc/modprobe.d/blacklist.conf echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf echo "blacklist nvidia" >> /etc/modprobe.d/blacklist.conf echo "blacklist nvidiafb" >> /etc/modprobe.d/blacklist.conf echo "blacklist amdgpu" >> /etc/modprobe.d/blacklist.conf echo "blacklist snd_hda_intel" >> /etc/modprobe.d/blacklist.conf echo "blacklist snd_hda_codec_hdmi" >> /etc/modprobe.d/blacklist.conf echo "blacklist i915" >> /etc/modprobe.d/blacklist.conf #查找自己的顯示卡硬體ID lspci output:83:00.0 3D controller: NVIDIA Corporation GP106 [P106-090] (rev a1) lspci -n -s 01:00 output: 01:00.0 0300: 10de:1381 (rev a2) 01:00.1 0403: 10de:0fbc (rev a1) #添加顯卡ID到直通組 echo "options vfio-pci ids=10de:1381,10de:0fbc" > /etc/modprobe.
参考:
这个方案可行
内容可行
硬盘直通
proxmox中備份位置 /var/lib/vz/dump
筆者proxmox ve版本:6.2-11
由於lxc容器默認無法使用tun網卡
編輯lxc容器的設定檔:
/etc/pve/lxc/<your lxc container id>.conf 假定lxc容器名稱爲102,即爲:
vim /etc/pve/lxc/102.conf 在文本中,加入以下內容,即可啓用tun網卡
lxc.mount.entry = /dev/net/tun dev/net/tun none bind,create=file lxc.mount.entry: /dev/net dev/net none bind,create=dir lxc.cgroup.devices.allow: c 10:200 rwm lxc.apparmor.profile: generated lxc.apparmor.allow_nesting: 1