Proxmox VE,作为一款开源虚拟化平台,其升级对许多企业和个人开发者至关重要。本文以现有的Proxmox VE 7.4为基础,详细指导如何升级至Proxmox VE 8.0。
一、前提条件
在开始升级到Proxmox VE 8.0之前,必须确保满足以下先决条件:
- 更新到最新版本:确保所有节点都升级到Proxmox VE 7.4。
- 有效且已测试的备份:备份所有虚拟机和容器。
- 足够的磁盘空间:根挂载点上至少有5GB的可用空间。
- ……
二、准备工作
a. 更新Proxmox VE至最新版本
同步所有节点到最新的Proxmox VE版本,以确保升级过程的稳定性和一致性
apt update
apt dist-upgrade
pveversion
b. 更新Debian基础仓库至Bookworm
确保Debian基础仓库指向新版本Bookworm,从而可以获得新版本所需的软件包。您已经提供了详细的代码示例和国外、国内的镜像源。
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/*.list
对于 Debian 12 以后的版本,所有 Debian 可以分发的打包的非自由固件二进制文件(non-free),比如某些驱动,都被转移到 Debian Archive 中的一个新组件,称为非自由固件(non-free-firmware)。如果您从旧版的 Debian 升级,并且需要这些固件二进制文件,您应该更新您系统上的 /etc/apt/sources.list
,以使用这个新组件(来源):
sed -i 's/non-free/non-free non-free-firmware/g' /etc/apt/sources.list
sed -i 's/non-free/non-free non-free-firmware/g' /etc/apt/sources.list.d/*.list
以下是/etc/apt/sources.list
文件内容示例:
#国外debian官方源
deb http://ftp.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://ftp.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://ftp.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
deb-src http://ftp.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://ftp.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://ftp.debian.org/debian bookworm-backports main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
#国内清华镜像源
deb http://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib non-free non-free-firmware
deb http://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
deb http://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib non-free non-free-firmware
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware
c. 添加Proxmox VE 8软件包仓库
确保可以访问Proxmox VE 8的特定软件包
echo "deb https://mirrors.tuna.tsinghua.edu.cn/proxmox/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-enterprise.list
d. 更新Ceph包仓库
对于无订阅的仓库,请参见软件包仓库。与先前提到的注释或移除PVE 7.x仓库不同,可以运行以下命令来更新到Proxmox VE 8仓库:
echo "deb http://download.proxmox.com/debian/ceph-quincy bookworm no-subscription" > /etc/apt/sources.list.d/ceph.list
wget https://enterprise.proxmox.com/debian//proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
三、升级PVE8.0
使用pve7to8
脚本来检查系统是否可以升级到PVE 8.0
pve7to8 --full
下面的命令将Proxmox VE系统升级至8.0版本:
注:期间会遇到多次选择,没用特殊需求一路回车即可
apt dist-upgrade
# 输出应为 Proxmox VE 8.0
pveversion
评论区