Proxmox System Update

Utilities~5 minView script

Delegates to a single worker (update-pve-safe.sh) that detects the running Proxmox major version. Configured repositories are read through the Proxmox API and preserved; an unsubscribed host with only Enterprise is asked before switching to no-subscription. The worker upgrades packages and rebuilds ProxMenux-managed DKMS drivers for a staged kernel. The wrapper offers a reboot when the system reboot marker exists or the newest installed kernel differs from the running kernel. Also available from Update Now in the ProxMenux Monitor header when pending updates are detected.

What this does

Brings the host to the latest patch level of its current major version. Does not upgrade across major versions — for PVE 8 → PVE 9 see Upgrade PVE 8 to PVE 9.

The official Proxmox recommendation

Proxmox's own upgrade guidance for a running host (within the same major version) is to run:

apt update && apt full-upgrade -y

That one line is the official command on any current Proxmox release. The hard part isn't the upgrade itself; it's making sure the repositories are clean, the right ones are enabled, and the host is in a sensible state afterwards.

What ProxMenux runs on top — verified against the script

Uses the same apt full-upgrade operation, with repository checks, DKMS rebuilding and post-update cleanup. The steps below correspond to scripts/utilities/proxmox_update.sh and its single worker scripts/global/update-pve-safe.sh:

  • Detects the PVE major version inside the worker (pveversion | grep -oP 'pve-manager/\K[0-9]+'). A single worker handles PVE 8 and PVE 9; configured repositories are preserved unless an unsubscribed host accepts the offered switch.
  • Keeps the configured repositories. ensure_repositories reads the repositories through the Proxmox repository API, together with the subscription status. A host with an active subscription, or one that already uses the no-subscription or test repository, is left unchanged. A host with no active subscription whose only Proxmox repository is Enterprise is asked whether to switch to no-subscription; declining stops the update with no source changed.
  • Runs the upgrade non-interactively with DEBIAN_FRONTEND=noninteractive and --force-confdef --force-confold. For dpkg conffile decisions, it accepts the default action when one exists; otherwise it keeps the existing configuration file.
  • Skips forcing optional utilities. The safe worker does not push zfsutils-linux, chrony, ifupdown2 or similar packages onto the host — a Proxmox install that opted out of any of them keeps its choice. Missing packages are surfaced by the higher-level installer flows, not by the update path.
  • LVM metadata check and repair. Detects old PV headers and runs vgck --updatemetadata and vgchange -ay for the affected volume groups. This can change LVM metadata; it is not a warning-only scan.
  • Cleans up afterwards: apt-get autoremove -y + apt-get autoclean -y.
  • DKMS rebuild before the reboot prompt. The worker calls pmx_rebuild_dkms_after_kernel when a newer installed kernel is staged. The wrapper checks /var/run/reboot-required and also uses dpkg-query to compare the kernel reported by uname -r with the newest installed proxmox-kernel-*-pve-signed / pve-kernel-*-pve package. The marker may be absent on hosts without needrestart; the kernel comparison still works in that case.

In one sentence

Updates host packages, preserves configured repositories unless you accept a switch, checks LVM metadata, rebuilds managed DKMS drivers, cleans up with autoremove/autoclean and offers a reboot when needed.

Confirmation dialog

Selecting the option opens a summary of what the worker will do, requiring an explicit confirmation:

Proxmox System Update confirmation dialog with repository checks, package updates and cleanup

How the wrapper routes

proxmox_update.sh
pveversion | grep -oP 'pve-manager/\K[0-9]+'
Single safe worker
update-pve-safe.sh (detects PVE 8 / 9 internally)
Post-update
apt-get autoremove apt-get autoclean Reboot prompt if needed

What the worker does

One worker (scripts/global/update-pve-safe.sh) handles PVE 8 (bookworm) and PVE 9 (trixie). It detects the major version internally and checks the existing repository configuration without rewriting the Debian base sources. The stages are:

  1. Sanity checks. Verifies at least ~1 GB free in /var/cache/apt/archives. Aborts early with a clear message when it fails, so the run doesn't die in the middle of an apt transaction.
  2. Repository check. ensure_repositories reads the repositories and the subscription status. On a host with a usable Proxmox repository it changes nothing; on a host with no active subscription and only the Enterprise repository it asks before switching to no-subscription, and stops the update when the answer is no.
  3. Apt update with GPG auto-recovery. On NO_PUBKEY for any repo (yours or a third-party one) the worker imports the missing key and retries automatically before failing.
  4. Pending upgrades + security count. Reports how many packages will change and how many of those come from the security suite, so the confirmation dialog has real numbers to show.
  5. Confirmation dialog. After refreshing package lists, the worker asks for an explicit yes before running the package upgrade.
  6. apt full-upgrade. Uses DEBIAN_FRONTEND=noninteractive and --force-confdef --force-confold. Dpkg follows its default action for conffile decisions when available and otherwise retains the existing file.
  7. LVM sanity check. lvm_repair_check refreshes VG metadata when disks passed through to guest VMs (DSM, TrueNAS, storage appliances) come back with old PV headers.
  8. DKMS rebuild for ProxMenux-managed drivers. When the upgrade staged a new kernel, pmx_rebuild_dkms_after_kernel reads components_status.json for the drivers ProxMenux installed (currently nvidia_driver → module nvidia, coral_driver → module gasket), installs the matching kernel headers (proxmox-headers-<newkver> when available, else pve-headers-<newkver>) and runs dkms autoinstall -k <newkver>. If dkms status then doesn't show the modules built against the new kernel, the worker falls back to re-running each installer with --auto-reinstall. Any failure is logged but does not abort the update — you land on the reboot prompt in every case.
  9. Post-cleanup. apt-get autoremove + apt-get autoclean before returning control to the wrapper.

Post-update cleanup & reboot

After the worker exits, the wrapper runs:

apt-get autoremove -y    # drop unused dependencies pulled in by old packages
apt-get autoclean        # drop downloaded .deb files no longer in the index

The wrapper also checks whether a reboot is needed. Either of these signals triggers the prompt:

  • /var/run/reboot-required exists: a package or system tool has marked the host as needing a reboot.
  • The newest installed Proxmox kernel package differs from the running kernel, as determined by dpkg-query and uname -r.

If either is true, a whiptail dialog asks "Some changes require a reboot to take effect. Do you want to restart now?". Decline to keep running on the old kernel until you choose to reboot manually (e.g. during a planned maintenance window).

What you see at the end

When the worker finishes, the terminal shows the cleanup output and, if a reboot is required, the reboot prompt:

Proxmox System Update completion summary with cleanup output and reboot prompt

Decline reboot only if you know why

Installing a new proxmox-kernel-* package does not replace the running kernel until you reboot. The new kernel and its matching modules become active on the next boot. Plan the reboot for a suitable maintenance window, and review any DKMS build warnings beforehand.

How the safe worker treats the Enterprise repository

Proxmox ships hosts with the Enterprise repository enabled by default. Without an active subscription, that repository returns 401 on apt-get update. The safe worker changes the repositories only in that case, only after asking, and through the Proxmox repository API — the same one behind Node → Updates → Repositories. What happens in each case:

  • With an active subscription, the repositories are left unchanged and Enterprise drives the upgrade.
  • With the no-subscription or test repository already enabled, the repositories are left unchanged, whatever else is configured beside them.
  • With no active subscription and only the Enterprise repository, a dialog offers the switch. Accepting disables the Enterprise source, enables the no-subscription one and refreshes the package lists; the change is recorded in the Changes view of Audit & Report. Declining stops the update with no source changed.
  • Enterprise Ceph sources, when present, are disabled in the same switch without choosing another Ceph channel; a host that uses Ceph has its channel configured separately.
  • When the run has no terminal to ask in, no source is changed and the update stops with a message that points to Node → Updates → Repositories.

The Debian sources and every other repository file are never edited by the update path. A source that mixes Enterprise with other components in the same entry is not switched: the update stops and asks for it to be split from the Proxmox repository view.

Cluster considerations

On clusters: update one node at a time

On a Proxmox cluster, run this option on one node at a time and wait for the reboot to complete before moving to the next. Migrate guests off the node first to avoid cluster-wide service disruption. Mixed minor versions (e.g. 8.4.1 and 8.4.5) work fine for hours; mixed running kernels can produce unexpected behaviour for HA-managed guests.

What it doesn't do

  • Major-version upgrade. 8 → 9 is a separate operation — see Upgrade PVE 8 to PVE 9.
  • Backup. No snapshots, no rollback. Apt operations are not transactional. Combine with your normal backup discipline (PBS, vzdump, ZFS snapshots).
  • Container / VM updates. Only the host is upgraded; guests are left alone.
  • Dedicated firmware flashing. This is not a BIOS or device-firmware flashing tool. Installed firmware or CPU-microcode packages can still receive updates through apt.

Troubleshooting

apt update fails with 401 Unauthorized

The Enterprise repository is enabled and the host has no active subscription. The worker offers the switch to no-subscription before apt-get update; when it was declined, run the update again and accept it, or disable the Enterprise source in Node → Updates → Repositories and enable the no-subscription one.

full-upgrade hangs at "Configuring grub-pc"

If an interactive GRUB prompt is visible, it asks which devices should receive the boot loader. The --force-confold option applies to configuration-file decisions, not to this device selection. Use Tab + Space to select the appropriate boot disks, then OK. You can configure this selection beforehand with dpkg-reconfigure grub-pc.

Kernel upgraded but the new modules are missing for an out-of-tree driver

For managed drivers (nvidia_driver and coral_driver), the helper runs dkms autoinstall -k <newkver> and can retry their installers with --auto-reinstall. Check the result with dkms status. The autoinstall command can also rebuild other registered DKMS modules; the installer fallback is limited to the managed entries in components_status.json. Inspect any third-party module that remains missing and rebuild it as needed with dkms autoinstall.

The reboot prompt didn't appear but I'm sure the kernel changed

The signals are alternatives: /var/run/reboot-required or a difference between the running and newest installed Proxmox kernel. The wrapper does not parse linux-image entries in the apt log. Check the running version with uname -r and the installed kernel packages with dpkg-query. If a reboot is needed, schedule it or run shutdown -r now when ready.

Files involved

scripts/utilities/proxmox_update.sh              # this script (wrapper)
scripts/global/update-pve-safe.sh                # single safe worker (PVE 8 + PVE 9)
scripts/global/repository-functions.sh           # ensure_repositories
scripts/global/repository_policy.py              # reads and switches repositories through the Proxmox API
scripts/global/utils-install-functions.sh        # pmx_rebuild_dkms_after_kernel
/usr/local/share/proxmenux/components_status.json # ProxMenux-managed DKMS driver registry
/etc/apt/sources.list.d/proxmox.sources          # no-subscription source, written by Proxmox when the switch is accepted
/var/run/reboot-required                         # read to decide on reboot prompt
# Reboot fallback when needrestart isn't installed:
# dpkg-query -W 'proxmox-kernel-*-pve-signed' 'pve-kernel-*-pve' vs. uname -r

Related