欢迎光临
我们一起折腾,但避免熬夜!

PVE all in one保姆级安装教程

本文可以结合博主操作视频参考安装,更便于理解。

pve主页图

一、PVE系统安装

1、PVE下载相关软件

  • 1. PVE系统官网下载:点此下载
  • 2. 写盘工具下载:
    推荐Ventoy点此下载
    Ventoy在折腾各种系统时无需反复地格式化U盘,你只需要把 ISO/WIM/IMG/VHD(x)/EFI 等类型的文件直接拷贝到U盘里面就可以启动了。
    若出现“no device with valid ISO found”等等错误无法安装也可用其他的试试:
    如rufus:点次下载、balenaEtcher:点此下载
  • 3. virtIO驱动ISO:点此下载

2、PVE系统写盘

建议找一个16G以上的U盘,按照Ventoy官方文档写盘,写盘结束后将下载的PVE系统拷贝进U盘。

其他工具rufus、balenaEtcher类似。

3、BLOS设置

开机按快捷键进入BLOS

  • intel主板开启VT,VT-D,来电自启动和选择U盘启动
  • AMD主板开启IOMMU,SVM,来电自启动和选择U盘启动
  • 开启硬盘热拔插
  • 开启Above4G,SR-IOV(若有)
  • 开启网络唤醒(若需要)
  • 打开UEFI引导,关闭CSM兼容模式(DG1等纯UEFI类的显卡需要)

4、安装PVE系统

详细安装教程见视频。

PVE IP:192.168.66.254/24 (网段和IP按照自己的喜好设置即可)
子网掩码:255.255.255.0
网关:192.168.66.1
DNS:192.168.66.1

安装后登陆地址(登录电脑需要在同网段):https://192.168.66.254:8006
用户名:root
密码:你设置的

5、给PVE的扩容

在shell里边输入:

lvremove pve/data

点击y后,在输入:

lvextend -l +100%FREE -r pve/root

再点击数据中心 – 存储 – local-lvm – 移除,再双击local,把内容里的所有选项都选中。

6、去除PVE无有效订阅提示

pve6.3版本到pve7版本可以执行:

sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service

pve8版本可以执行:

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

7、开启PVE直通功能

shell里输入如下命令:

nano /etc/default/grub

找到下面这行:

GRUB_CMDLINE_LINUX_DEFAULT="quiet"

若你的CPU为Intel修改为:

#若你的CPU为Intel修改为:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"

#若你的CPU为AMD修改为
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on"

按Ctrl+X -> Y – >回车退出

增加所需模块,修改文件/etc/modules,输入如下命令:

nano /etc/modules

再文件中添加下述内容:

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

按Ctrl+X -> Y – >回车退出

更新上述配置信息并重启PVE:

update-grub
update-initramfs -u -k all  
reboot

验证是否已开启iommu,输入:

dmesg | grep iommu

看看可直通设备是否存在:

find /sys/kernel/iommu_groups/ -type l 

二、虚拟机安装

1、安装iKuai虚拟机

下载iKuai官方镜像:点此下载

添加要直筒的网卡,对应好网口,设置wan、lan

确认PVE的网关为192.168.66.1(主路由iKuai的IP)
DNS可用阿里223.5.5.5和腾讯119.29.29.29
进入Shell ping下试试网络是否正常

2、给PVE换源

目前使用DG1直通硬解的目前不要进行换源,更新PVE配置后DG1直通后无法驱动!!

这里需要iKuai和PVE联网正常才可以操作。

国内清华源和中科大较快,可根据地理位置选一个即可

将自带的源文件sources.list备份

cp /etc/apt/sources.list /etc/apt/sources.list_bak

编辑sources.list文件,注释掉自带的源,添加国内源:

nano /etc/apt/sources.list

6.x清华源:

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian buster pve-no-subscription

7.x国内源:

#清华源:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bullseye pve-no-subscription

#中科大源:
deb https://mirrors.ustc.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.ustc.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.ustc.edu.cn/debian-security bullseye-security main contrib 
deb https://mirrors.ustc.edu.cn/proxmox/debian bullseye pve-no-subscription

8.x国内源:

#清华源:
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm 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/debian-security bookworm-security main contrib non-free non-free-firmware

#中科大源:
deb https://mirrors.ustc.edu.cn/debian/ bookworm 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/debian-security bookworm-security main contrib non-free non-free-firmware

编辑PVE企业源,原句前加#注释掉自带源:

nano /etc/apt/sources.list.d/pve-enterprise.list

添加清华源或中科大源,二选一:

#清华源
deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bookworm pve-no-subscription

#中科大源
deb https://mirrors.ustc.edu.cn/proxmox/debian bookworm pve-no-subscription

按Ctrl+X -> Y – >回车退出。

修复源401错误,原句前加#注释掉:

nano /etc/apt/sources.list.d/ceph.list

添加中科大ceph源:

deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription

按Ctrl+X -> Y – >回车退出。

更新生效:

apt update && apt dist-upgrade -y

更新LXC源(若不需要可跳过)

备份APLInfo.pm

cp /usr/share/perl5/PVE/APLInfo.pm /usr/share/perl5/PVE/APLInfo.pm_back

更换为清华源:

sed -i 's|http://download.proxmox.com|https://mirrors.tuna.tsinghua.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm

重启服务:

systemctl restart pvedaemon.service

重启PVE

reboot

3、安装iStoreOS或OpenWrt虚拟机

iStoreOS是基于OpenWrt开发的,大家看个人喜好,我这里以iStoreOS为例。

下载iStoreOS镜像:点此下载

img文件挂载(如果你没有扩容的话的你可能需要在下面命令的后边加上-lvm):

#pve虚拟机id和img文件路径替换为自己的
qm importdisk pve虚拟机id img文件路径 local

#如:
qm importdisk 100 /var/lib/vz/template/iso/istoreos.img local

修改IP

输入以下命令快速设置:

quickstart

#或直接编辑
vi /etc/config/network

#切换光标至 option ipaddr ‘192….’
#按i键,修改IP
#按Esc键,输入:wq 回车
#输入reboot回车重启

注:也可以挂载为USB文件(前边已操作此处可忽略):

#pve虚拟机idimg文件路径替换为自己的
vi /etc/pve/qemu-server/pve虚拟机id.conf

#再打开的文件中添加:
args: -device 'nec-usb-xhci,id=usb-bus0,multifunction=on' -drive 'file=img文件路径,media=disk,format=raw,if=none,id=drive-disk-bootloader' -device 'usb-storage,bus=usb-bus0.0,port=1,drive=drive-disk-bootloader,id=usb-disk-bootloader,bootindex=999,removable=on'

4、安装TrueNAS虚拟机

下载TrueNAS官方OS系统:https://www.truenas.com/

TrueNAS第三方应用源:点此前往

5、PVE直通驱动DG1给SA6400

参考皮蛋熊大佬的教程:《PVE直通DG1并使用SA6400驱动DG1教程》

核显驱动查验:

ls -la /dev/dri
#或
ls /dev/dri

#检查lsmod i915模块
lsmod | grep i915

#检查dmesg i5固件
dmesg | grep i915

6、自编译安装群晖虚拟机

DG1目前需要添加一个触发定时任务,用户选root,输入以下任务脚本:

cd /volume1/docker/i915_debug
./install.sh

使用ARPL自编译引导,巴西大佬已停更,后继者国内大佬RR引导也已在github删库,目前只在群内小范围分享,大家可以想办法加群。
我这里的可能不是最新版,需要的可以加频道群下载。

大佬已重新上线了RR引导:点击此处下载

7、安装Windows虚拟机

我这里使用的不忘初心我的镜像。

8、安装LXP容器

看大家需要和习惯安装。

N大Jellyfin Docker版镜像:

 docker pull nyanmisaka/jellyfin:latest

三、尾巴

设置开机启动顺序之类…

赞(1) 打赏
未经允许不得转载:番茄科技-电脑,手机,网络知识,应用分享 » PVE all in one保姆级安装教程
分享到: 更多 (0)

评论 抢沙发

电脑 手机 网络知识 应用分享

YouTube哔哩哔哩

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏