按照官方教程进行升级操作
确保 PVE 所有节点全部升级至 v8 的最新版本 PVE 8.4.1
升级前务必准备好备份并确保 PVE 中所有 VM 的备份,备份至外部存储,避免可能出现的意外
升级前执行 pve8to9 脚本,使用此官方脚本可以提供有关潜在问题的提示和警告
执行 pve8to9 清单脚本
执行 pve8to9 --full
如下
root@pve:~# pve8to9 --full
= CHECKING VERSION INFORMATION FOR PVE PACKAGES =
Checking for package updates..
PASS: all packages up-to-date
Checking proxmox-ve package version..
PASS: proxmox-ve package has version >= 8.4-0
Checking running kernel version..
PASS: running kernel '6.8.12-9-pve' is considered suitable for upgrade.
= CHECKING CLUSTER HEALTH/SETTINGS =
SKIP: standalone node.
= CHECKING HYPER-CONVERGED CEPH STATUS =
SKIP: no hyper-converged ceph setup detected!
= CHECKING CONFIGURED STORAGES =
PASS: storage 'local' enabled and active.
PASS: storage 'local-lvm' enabled and active.
INFO: Checking storage content type configuration..
PASS: no storage content problems found
PASS: no storage re-uses a directory for multiple content types.
INFO: Check for usage of native GlusterFS storage plugin...
PASS: No GlusterFS storage found.
INFO: Checking whether all external RBD storages have the 'keyring' option configured
SKIP: No RBD storage configured.
= VIRTUAL GUEST CHECKS =
INFO: Checking for running guests..
PASS: no running guest detected.
INFO: Checking if LXCFS is running with FUSE3 library, if already upgraded..
SKIP: not yet upgraded, no need to check the FUSE library version LXCFS uses
INFO: Checking for VirtIO devices that would change their MTU...
PASS: All guest config descriptions fit in the new limit of 8 KiB
INFO: Checking container configs for deprecated lxc.cgroup entries
PASS: No legacy 'lxc.cgroup' keys found.
INFO: Checking VM configurations for outdated machine versions
PASS: All VM machine versions are recent enough
= MISCELLANEOUS CHECKS =
INFO: Checking common daemon services..
PASS: systemd unit 'pveproxy.service' is in state 'active'
PASS: systemd unit 'pvedaemon.service' is in state 'active'
PASS: systemd unit 'pvescheduler.service' is in state 'active'
PASS: systemd unit 'pvestatd.service' is in state 'active'
INFO: Checking for supported & active NTP service..
PASS: Detected active time synchronisation unit 'chrony.service'
INFO: Checking if the local node's hostname 'pve' is resolvable..
INFO: Checking if resolved IP is configured on local node..
PASS: Resolved node IP '192.168.137.9' configured and active on single interface.
INFO: Check node certificate's RSA key size
PASS: Certificate 'pve-root-ca.pem' passed Debian Busters (and newer) security level for TLS connections (4096 >= 2048)
PASS: Certificate 'pve-ssl.pem' passed Debian Busters (and newer) security level for TLS connections (2048 >= 2048)
INFO: Checking backup retention settings..
PASS: no backup retention problems found.
INFO: checking CIFS credential location..
PASS: no CIFS credentials at outdated location found.
INFO: Checking permission system changes..
INFO: Checking custom role IDs
PASS: no custom roles defined
INFO: Checking node and guest description/note length..
PASS: All node config descriptions fit in the new limit of 64 KiB
INFO: Checking if the suite for the Debian security repository is correct..
PASS: found no suite mismatch
INFO: Checking for existence of NVIDIA vGPU Manager..
PASS: No NVIDIA vGPU Service found.
INFO: Checking bootloader configuration...
WARN: systemd-boot meta-package installed but the system does not seem to use it for booting. This can cause problems on upgrades of other boot-related packages. Consider removing 'systemd-boot'
PASS: bootloader packages installed correctly
INFO: Check for dkms modules...
SKIP: could not get dkms status
INFO: Check for legacy 'filter' or 'group' sections in /etc/pve/notifications.cfg...
INFO: Check for legacy 'notification-policy' or 'notification-target' options in /etc/pve/jobs.cfg...
PASS: No legacy 'notification-policy' or 'notification-target' options found!
INFO: Check for LVM autoactivation settings on LVM and LVM-thin storages...
PASS: all guest volumes on storage 'local-lvm' have autoactivation disabled
PASS: No volumes were found that could potentially have issues due to the disabling of LVM autoactivation.
INFO: Check space requirements for RRD migration...
du: cannot access '/var/lib/rrdcached/db/pve2-vm': No such file or directory
command 'du -scb /var/lib/rrdcached/db/pve2-vm' failed: exit code 1
可以发现输出提示
WARN: systemd-boot meta-package installed but the system does not seem to use it for booting. This can cause problems on upgrades of other boot-related packages. Consider removing 'systemd-boot'
此处卸载 systemd-boot
包
root@pve:~# apt remove systemd-boot
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
systemd-boot
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 250 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 61817 files and directories currently installed.)
Removing systemd-boot (252.38-1~deb12u1) ...
Processing triggers for man-db (2.11.2-2) ...
再次使用 pve8to9
脚本检查,可见已无该 warning
root@pve:~# pve8to9 --full
= CHECKING VERSION INFORMATION FOR PVE PACKAGES =
Checking for package updates..
PASS: all packages up-to-date
Checking proxmox-ve package version..
PASS: proxmox-ve package has version >= 8.4-0
Checking running kernel version..
PASS: running kernel '6.8.12-9-pve' is considered suitable for upgrade.
= CHECKING CLUSTER HEALTH/SETTINGS =
SKIP: standalone node.
= CHECKING HYPER-CONVERGED CEPH STATUS =
SKIP: no hyper-converged ceph setup detected!
= CHECKING CONFIGURED STORAGES =
PASS: storage 'local' enabled and active.
PASS: storage 'local-lvm' enabled and active.
INFO: Checking storage content type configuration..
PASS: no storage content problems found
PASS: no storage re-uses a directory for multiple content types.
INFO: Check for usage of native GlusterFS storage plugin...
PASS: No GlusterFS storage found.
INFO: Checking whether all external RBD storages have the 'keyring' option configured
SKIP: No RBD storage configured.
= VIRTUAL GUEST CHECKS =
INFO: Checking for running guests..
PASS: no running guest detected.
INFO: Checking if LXCFS is running with FUSE3 library, if already upgraded..
SKIP: not yet upgraded, no need to check the FUSE library version LXCFS uses
INFO: Checking for VirtIO devices that would change their MTU...
PASS: All guest config descriptions fit in the new limit of 8 KiB
INFO: Checking container configs for deprecated lxc.cgroup entries
PASS: No legacy 'lxc.cgroup' keys found.
INFO: Checking VM configurations for outdated machine versions
PASS: All VM machine versions are recent enough
= MISCELLANEOUS CHECKS =
INFO: Checking common daemon services..
PASS: systemd unit 'pveproxy.service' is in state 'active'
PASS: systemd unit 'pvedaemon.service' is in state 'active'
PASS: systemd unit 'pvescheduler.service' is in state 'active'
PASS: systemd unit 'pvestatd.service' is in state 'active'
INFO: Checking for supported & active NTP service..
PASS: Detected active time synchronisation unit 'chrony.service'
INFO: Checking if the local node's hostname 'pve' is resolvable..
INFO: Checking if resolved IP is configured on local node..
PASS: Resolved node IP '192.168.137.9' configured and active on single interface.
INFO: Check node certificate's RSA key size
PASS: Certificate 'pve-root-ca.pem' passed Debian Busters (and newer) security level for TLS connections (4096 >= 2048)
PASS: Certificate 'pve-ssl.pem' passed Debian Busters (and newer) security level for TLS connections (2048 >= 2048)
INFO: Checking backup retention settings..
PASS: no backup retention problems found.
INFO: checking CIFS credential location..
PASS: no CIFS credentials at outdated location found.
INFO: Checking permission system changes..
INFO: Checking custom role IDs
PASS: no custom roles defined
INFO: Checking node and guest description/note length..
PASS: All node config descriptions fit in the new limit of 64 KiB
INFO: Checking if the suite for the Debian security repository is correct..
PASS: found no suite mismatch
INFO: Checking for existence of NVIDIA vGPU Manager..
PASS: No NVIDIA vGPU Service found.
INFO: Checking bootloader configuration...
PASS: bootloader packages installed correctly
INFO: Check for dkms modules...
SKIP: could not get dkms status
INFO: Check for legacy 'filter' or 'group' sections in /etc/pve/notifications.cfg...
INFO: Check for legacy 'notification-policy' or 'notification-target' options in /etc/pve/jobs.cfg...
PASS: No legacy 'notification-policy' or 'notification-target' options found!
INFO: Check for LVM autoactivation settings on LVM and LVM-thin storages...
PASS: all guest volumes on storage 'local-lvm' have autoactivation disabled
PASS: No volumes were found that could potentially have issues due to the disabling of LVM autoactivation.
INFO: Check space requirements for RRD migration...
du: cannot access '/var/lib/rrdcached/db/pve2-vm': No such file or directory
command 'du -scb /var/lib/rrdcached/db/pve2-vm' failed: exit code 1
更新存储库并升级
root@pve:~# apt update
Hit:1 https://mirrors.ustc.edu.cn/debian bookworm InRelease
Get:2 https://mirrors.ustc.edu.cn/debian bookworm-updates InRelease [55.4 kB]
Hit:3 https://mirrors.ustc.edu.cn/debian-security bookworm-security InRelease
Hit:4 https://mirrors.ustc.edu.cn/proxmox/debian/pve bookworm InRelease
Fetched 55.4 kB in 1s (58.4 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
root@pve:~# apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
检查 PVE 版本
root@pve:~# pveversion
pve-manager/8.4.8/88beaf427bb10dad (running kernel: 6.8.12-9-pve)
替换 bookworm
为 trixie
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
# 为企业授权时需要执行以下命令
# sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/pve-enterprise.list
添加 PVE 9 存储库,注意国内需要换源,此处为 USTC 源
cat > /etc/apt/sources.list.d/proxmox.sources << EOF
Types: deb
URIs: https://mirrors.ustc.edu.cn/proxmox/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF
若是企业授权
cat > /etc/apt/sources.list.d/pve-enterprise.sources << EOF
Types: deb
URIs: https://enterprise.proxmox.com/debian/pve
Suites: trixie
Components: pve-enterprise
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF
若使用 Ceph,则也要更新存储库
cat > /etc/apt/sources.list.d/ceph.sources << EOF
Types: deb
URIs: https://enterprise.proxmox.com/debian/ceph-squid
Suites: trixie
Components: enterprise
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF
更新包索引
apt update
更新至 Debian 13 同 PVE 9
apt dist-upgrade
升级过程中,系统会要求对一些配置文件进行更改
/etc/issue
--> N
默认选择否
/etc/lvm/lvm.conf
-->Y
默认选择为否,但建议选择为是
Configuration file '/etc/lvm/lvm.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** lvm.conf (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/lvm/lvm.conf ...
Installing new version of config file /etc/lvm/lvmlocal.conf ...
Installing new version of config file /etc/lvm/profile/vdo-small.profile ...
/etc/ssh/sshd_config
--> N
默认选择为否,同往常升级一样不要选择为是,避免 sshd 配置更改后无法通过 SSH 进行连接
/etc/default/grub
--> N
默认选择为否,保留当前安装的版本
检查更新结果并重新启动至最新内核
更新结束后使用 pveversion
检查版本
root@pve:~# pveversion
pve-manager/9.0.3/025864202ebb6109 (running kernel: 6.14.8-2-pve)
然后 reboot
重新启动系统以更新至最新内核