Skip to content

Full upgrade (LXCs, VMs and Proxmox VE)

playbooks/upgrade_all.yml (role pve_upgrade) upgrades everything in one run, on demand. It is separate from the nightly automatic updates, which only touch LXCs.

Phase Tag Hosts How
1 guests every running LXC (+ VMs with managed: true) pct exec through the node: apt dist-upgrade / apk upgrade / dnf upgrade, 10 at a time
2 vms every running VM qm guest exec on its node (QEMU guest agent), no SSH needed. Debian/Ubuntu, Alpine and RHEL-family; other OSes (Windows, RHCOS) are skipped
3 nodes every Proxmox VE node one node at a time, cluster must be quorate: apt dist-upgrade, then pveversion and kernel check

Guests are never rebooted. The summary at the end lists what was upgraded, skipped or failed, which guests want a reboot and every node's version and kernel.

Running it

GitHub → Actions → upgrade → Run workflow (phase, reboot, exclude, limit, dry run), or on the control host:

ansible-playbook playbooks/upgrade_all.yml                          # upgrade everything, no reboots
ansible-playbook playbooks/upgrade_all.yml --tags nodes -e pve_reboot=true
ansible-playbook playbooks/upgrade_all.yml --tags guests,vms
ansible-playbook playbooks/upgrade_all.yml -e upgrade_exclude=wp-irc,node02
ansible-playbook playbooks/upgrade_all.yml --check                  # VMs: OS detection only

Rolling reboot of the nodes (-e pve_reboot=true)

Only nodes whose running kernel is older than the newest installed *-pve kernel reboot (-e pve_reboot_force=true: all of them), one at a time:

  1. note which guests are running
  2. ceph osd set noout (Ceph nodes)
  3. reboot, wait for the node, cluster quorum and pve-guests.service (autostart)
  4. start guests that were running before but are stopped now (no onboot)
  5. wait until all OSDs are up, ceph osd unset noout, wait until all PGs are active+clean

The node that hosts the Ansible controller (gh-runner or Semaphore LXC, detected from its IP) is not rebooted; the summary says so. Migrate the runner or reboot that node by hand. If a reboot hangs, the play stops (max_fail_percentage: 0) and noout stays set: check the node, then ceph osd unset noout.

Settings

roles/pve_upgrade/defaults/main.yml:

Variable Default
upgrade_exclude [] inventory names never touched (list or a,b,c)
upgrade_guest_serial 10 LXCs upgraded in parallel
upgrade_vms_via_agent true phase 2 on/off
upgrade_vm_timeout 1800 seconds per VM
upgrade_vm_os_pkg_mgr debian/ubuntu/alpine/rhel/... guest-agent OS id → package manager
pve_reboot / pve_reboot_force false see above
pve_restart_guests true step 4

VMs without qemu-guest-agent show up as skipped: no guest agent.