Keep guests running during the PVE 8 to 9 upgrade and complete the help menu

- The upgrade no longer restarts pve-manager while preparing the host, so running guests are not stopped
- The upgrade stops before touching any repository when the Proxmox VE 8 update fails or is cancelled
- The unattended mode continues into the upgrade instead of exiting after the mode question
- Without a subscription, the enterprise repository added by pve-manager 9 is left disabled after the upgrade
- grub-efi-amd64 is installed with its output visible in interactive mode
- Help menu: qm unlock and pct unlock entries in the VM/CT section, renumbered items and aligned labels
- Help menu: pvesm scan nfs takes the server address, and pveupgrade is described as the interactive upgrade
- Help menu: an empty choice no longer runs the previous command
- translate() finds catalog entries for texts with leading or trailing spaces and keeps the padding
- Spanish help menu texts use the tú form and the Intro key
- New help and upgrade messages translated into all languages
This commit is contained in:
MacRimi
2026-10-18 15:56:35 +02:00
parent c3cb726cbf
commit 2d48b87ac1
11 changed files with 201 additions and 104 deletions
+19 -9
View File
@@ -36,8 +36,8 @@
# broken repo config).
# - dist-upgrade with --force-confdef --force-confold in
# unattended mode; user-driven dpkg prompts in interactive mode.
# - Post-upgrade: installs grub-efi-amd64 on EFI hosts, restarts
# pve-manager, re-runs pve8to9 to surface residual issues.
# - Post-upgrade: installs grub-efi-amd64 on EFI hosts and
# re-runs pve8to9 to surface residual issues.
# - Reboot prompt at the end.
# - Full log written to /var/log/pve8-a-pve9-<timestamp>.log.
# ==========================================================
@@ -117,7 +117,7 @@ ask_run_mode() {
msg_ok "$(translate "Run mode: Unattended")"
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
exit 0
return 0
fi
@@ -625,7 +625,14 @@ apt_upgrade() {
exit 1
else
bash "$LOCAL_SCRIPTS/global/update-pve8.sh"
local update_rc=0
bash "$LOCAL_SCRIPTS/global/update-pve8.sh" || update_rc=$?
if [[ $update_rc -eq 3 ]]; then
exit 0
elif [[ $update_rc -ne 0 ]]; then
msg_error "$(translate "The Proxmox VE 8 update did not finish. The upgrade to Proxmox VE 9 was not started.")"
exit 1
fi
hash -r
fi
@@ -641,10 +648,6 @@ regenerate_pve_cache() {
mkdir -p /var/lib/pve-manager
chmod 755 /var/lib/pve-manager
systemctl restart pve-manager 2>/dev/null || true
sleep 2
timeout 10 pvesh get /nodes/localhost/apt/update 2>/dev/null || true
msg_ok "$(translate "PVE cache regenerated")"
@@ -1009,6 +1012,13 @@ else
bash -lc "apt-get dist-upgrade"
fi
# pve-manager 9 ships pve-enterprise.sources during the upgrade.
if [[ "$REPO_MODE" == "no-subscription" && -f /etc/apt/sources.list.d/pve-enterprise.sources ]] \
&& ! grep -qi '^Enabled:[[:space:]]*\(false\|no\)' /etc/apt/sources.list.d/pve-enterprise.sources; then
disable_enterprise_repo_if_present
msg_ok "$(translate "Enterprise Proxmox repository disabled")"
fi
# ==========================================================
@@ -1029,7 +1039,7 @@ if [[ -d /sys/firmware/efi ]]; then
run_step \
"Installing grub-efi-amd64" \
"grub-efi-amd64 installed or already present" \
"apt-get install grub-efi-amd64 >/dev/null 2>&1"
"apt-get install -y grub-efi-amd64 >/dev/null 2>&1"
fi
fi