共计 1694 个字符,预计需要花费 5 分钟才能阅读完成。
背景
家里的 PVE 版本已经将近一年半未更新过了,近期浏览更新日志,发现许多新特性值得琢磨。遂进行版本更新。
实践
参考链接:从7升级到8
首先需从7.3 升级到 7.4 的最新版本,之后才可升级到 8。
修改软件包存储库地址:
# vim /etc/apt/sources.list
# 确保不存在其他的PVE存储库条目,只添加下面这行
deb http://download.proxmox.com/debian/ceph-quincy bullseye main
执行次要版本升级并重启
apt update
apt list --upgradable
apt upgrade
reboot
检查版本:
root@pyw:~# pveversion
接下来关闭运行中的虚拟机和容器等工作负载后,再运行升级检查,确保没有报错。
warning 可适当忽略。
本案例中没有使用ceph,不需要做ceph相关操作。
pve7to8
由于是非订阅版本PVE,需配置非订阅存储库用于拉取和更新 8 的软件包:
# vim /etc/apt/sources.list
# 确保不存在其他的PVE存储库条目
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 http://security.debian.org/debian-security bookworm-security main contrib
升级,过程中命令行会出现多次交互,注意执行交互动作。升级完毕后重启
apt update
apt list --upgradable
apt dist-upgrade
reboot
检查版本:
root@pyw:~# pveversion
pve-manager/8.2.2/9355359cd7afbae4 (running kernel: 6.8.4-3-pve)
web控制台检查具体运行状态,会报错 无有效订阅
。
此时可修改回原来的源,我之前配置的是清华源:
# cat /etc/apt/sources.list
deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm main contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian bookworm-updates main contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib
# rm /etc/apt/sources.list.d/pve-enterprise.list.dpkg-dist
以及需要修改部分配置文件:
# 备份
# cp /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js-bak-2024-0513
# 修改前
# vim /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js
if (res === null || res === undefined || !res || res
.data.status.toLowerCase() !== 'active') {
# 修改后
if (false) {
最终效果:
总结
执行更新时,注意关闭虚拟机等工作负载。
配置文件修改前,记得先备份。
引用链接
正文完
发表至: Linux
2024-05-13