2024年5月12日1年前 网站管理 1.更换国内源apt install apt-transport-https ca-certificates vim /etc/apt/sources.list 或者 nano /etc/apt/sources.list源 1:中科大的 deb https://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware deb https://mirrors.ustc.edu.cn/proxmox/debian/pve bookworm pve-no-subscription源 2:清华大学的(未测试) deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/pve bookworm pve-no-subscription源 3:官方源 deb http://deb.debian.org/debian bookworm main contrib non-free deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free deb http://deb.debian.org/debian bookworm-updates main contrib non-free deb http://deb.debian.org/debian bookworm-backports main contrib non-free deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription新增一个ceph的源vim /etc/apt/sources.list.d/ceph.list deb http://download.proxmox.com/debian/ceph-quincy bookworm main保存并退出,输入以下命令nano /etc/apt/sources.list.d/pve-enterprise.list用以下内容替换原代码并保存退出deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bullseye pve-no-subscription3.apt update && apt dist-upgrade -y 期间可能会有提示,按 Y 回车或者 ok 就行2.配置显卡直通nano /etc/default/grub其中一行是GRUB_CMDLINE_LINUX_DEFAULT="quiet“,修改这一行为如下内容,保存并退出GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt video=efifb:off "使用以下命令打开要修改的文件nano /etc/modules添加如下内容vfio vfio_iommu_type1 vfio_pci vfio_virqfd保存退出后更新服务update-initramfs -u update-grub然后重启pve系统reboot5.创建虚拟机自己命名虚拟机名称选择之前上传的镜像文件机型选择q35并开启Qemu代理分配磁盘大小配置CPU核心数,按照自己物理机的CPU进行分配配置虚拟机内存,物理为32GB,这里给分配了24X1024MB的内存容量一定要取消勾选防火墙选项确认安装6.添加显卡设备在PCI设备中找到自己的GPU设备型号然后勾选所有功能、ROM-Bar、PCI-Express复选框,点击添加7.打开虚拟机正常换源装显卡驱动8.重启后使用终端命令nvidia-smi测试显卡是否正常9.添加虚拟网卡(非必要)添加后在虚拟机的硬件中添加 成长就是不断打破并重建三观
创建帐户或登录后发表意见