优化:
PVE扩容:
lvremove pve/data
(输入Y)
lvextend -l +100%FREE -r pve/root
(再点击数据中心 – 存储 – local-lvm – 移除,再双击local,把内容里的所有选项都选中)取消订阅:
sed -i.backup -z "s/res === null || res === undefined || \!res || res\n\t\t\t.data.status.toLowerCase() \!== 'active'/false/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service硬件直通:
#若你的CPU为Intel:
sed -i '/^GRUB_CMDLINE_LINUX_DEFAULT/c\GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream"' /etc/default/grub
#若你的CPU为AMD修改为
sed -i '/^GRUB_CMDLINE_LINUX_DEFAULT/c\GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt pcie_acs_override=downstream"' /etc/default/grub增加所需模块:
vi /etc/modules
(按I进入编辑模式)
(添加以下内容:)
echo -e "vfio\nvfio_iommu_type1\nvfio_pci\nvfio_virqfd" | tee -a /etc/modules
(ESC退出编辑,输入:wq!保存并退出)更新配置和重启:
update-grub
update-initramfs -u -k all
reboot验证:
dmesg | grep iommu查看可直通硬件列表:
lspci硬盘直通:
查看硬盘信息:
ls -i /dev/disk/by-id/挂载硬盘到虚拟机:
qm set 100 --ide2 /dev/disk/by-id/ata-xxxxxxx