折腾虚拟机PVE系列: 04.升级PVE系统为8.x

注意

升级前, 需要提前备份你的虚拟机
参考文章折腾虚拟机PVE系列05: 备份虚拟机

方式1: 命令行升级

升级PVE到7.x最新版本

备份apt源文件

1
cp /etc/apt/sources.list /etc/apt/sources.list.bak 

修改apt源, 添加PVE7.x清华源

1
vim /etc/apt/sources.list

7.x清华源

1
2
3
4
5
6
# 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

修改企业源

1
vim /etc/apt/sources.list.d/pve-enterprise.list

把默认的源注释掉, 添加pve7.x清华源

7.x清华源企业源

1
2
# 7.x清华源
deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian bullseye pve-no-subscription

更新系统

1
apt update && apt dist-upgrade -y

升级完成 重启

1
reboot

升级PVE7.x为8.x

设置8.x源

编辑PVE8.x需要的源

1
vim /etc/apt/sources.list

编辑PVE8.x需要的源

1
2
3
4
5
6
7
# 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

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

编辑企业源

1
vim /etc/apt/sources.list.d/pve-enterprise.list

将7.x的企业源删除, 然后添加8.x的源

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

修复更新时401错误

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

修复更新时401错误

下载官方授权加密证书

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

下载官方授权加密证书

升级PVE为8.x

验证升级是否有问题

1
pve7to8 --full

Run the Proxmox 7 to 8 upgrade checklist program

  • FAILURES: 检查发现的错误, 有问题需要改进的地方.

如果验证没有问题,可以升级pve

1
2
apt update 
apt dist-upgrade

如果中途报错, 试下执行以下命令

1
2
apt-get update --fix-missing
apt dist-upgrade

方式2: 下载PVE 8.x系统镜像,重新安装系统

  1. 备份虚拟机
  2. 参考折腾PVE虚拟机系列: 01.安装PVE到PVE官方网站下载8.x版本镜像, 重新安装即可

折腾虚拟机PVE系列: 04.升级PVE系统为8.x
https://blog.9001001.xyz/posts/97814c8be1dd/
作者
夏日雪糕
发布于
2023年9月1日
许可协议