PVE7.x升级8.0方法

准备工作:

按照PVE官方升级页面提示,7.x的PVE必须升级到目前最新(目前最新的是7.4-15)

使用官方源,或者国内源(如清华),升级PVE7.x至最新

PVE换源(如已做过请忽略):

(1)更换为国内清华源:

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

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

编辑sources.list

nano /etc/apt/sources.list

粘贴一下内容

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

ctrl+x 点y 回车保存退出


(2)编辑pve企业源:

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

将其中原有的proxmox句首加# 注释掉,变为:#deb https://enterprise.proxmox.com/debian/pve bullseye pve-enterprise

添加以下清华源:

deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bullseye pve-no-subscription

ctrl+x y 回车保存退出


更新并升级

apt update && apt dist-upgrade -y


重启reboot后观察是否成功升级到最新的PVE7.x(目前最新的是7.4-15)



——————————————————————分割线:下面正式开始升级8.0———————————————————


方法一:命令行直接升级PVE7.x到8.0


1、升级8.0开始更换8.0的源


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

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


编辑sources.list以下8.0的源二选一

nano /etc/apt/sources.list


(1)国内清华源速度较快,偶有出错可以尝试用--fix--update修复。如果不行可以更换下面官方源来解决(速度很慢)


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

# security updates

# deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware



(2)以下官方源备用,如果清华源报错无法解决,可以尝试更换为官方源,速度较慢上网问题自己想办法解决


deb http://ftp.debian.org/debian bookworm main contrib

deb http://ftp.debian.org/debian bookworm-updates main contrib

# Proxmox VE pve-no-subscription repository provided by proxmox.com,

# NOT recommended for production use

deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription

# security updates

deb https://security.debian.org/debian-security bookworm-security main contrib non-free


编辑pve企业源:

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

将其中原有的proxmox句首加# 注释掉,变为:#deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise

添加以下清华源:

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

ctrl+x y 回车保存退出



2、修复源401错误

echo "deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription" > /etc/apt/sources.list.d/ceph.list


或者用国内中科大的ceph源,和以上proxmox的源,二选一


echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription" > /etc/apt/sources.list.d/ceph.list




3、下载官方证书

wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg


4、运行检测,看有无严重问题

pve7to8 --full


5、检查无误后开始升级


更新列表并升级

apt update && apt dist-upgrade -y


过长较漫长,期间会多次跳出提醒是否修改包括lvm.conf、issue、gurb、openssh等等服务和配置,一般来说回车(保持现状))即可。


如果报错运行

apt-get update --fix-missing

修复后重新运行

apt dist-upgrade -y


6、升级无明显报错后,重启PVE

reboot


重启后观察PVE的版本号是否为8.0.3(目前最新版)内核为6.2.16-3 如无异常升级成功

评论

此博客中的热门博文

PVE8.0最新优化方案和qm disk import命令。

如何使用Fail2Ban 保护云服务器和网站安全 对接NGINX站点 拒绝暴力破解!(转载自科技lion 官方博客)

免费订阅