I need to update my proxmox server from 8.3 to 9.0 to get something working. I also want to checkout the new container feature in Proxmox 9.0.
Step by Step guide Link to heading
Before your start please have ssh connect so if the web pages goes done then you still have ssh connection. You can use this command
ssh root@proxmox-ip
- First backup everything you can. The thing you must backup is the source file for packages
cp /etc/apt/sources.list /etc/apt/sources.list.bak
- Disable enterprise repo
sed -i 's/^deb/#deb/' /etc/apt/sources.list.d/pve-enterprise.list
- Remove the ceph repo
rm /etc/apt/sources.list.d/ceph.list
- Add the Proxmox 9 No-Subscription Repository
echo "deb http://download.proxmox.com/debian/pve trixie pve-no-subscription" >> /etc/apt/sources.list
- Update Debian Codename from Bookworm to Trixie
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
- Refresh APT Package List and upgrade the system
apt update && apt dist-upfrade
- Reboot the server
reboot
Automation Link to heading
bash script Link to heading
#!/usr/bin/env bash
set -e
# 1. Backup Current APT Sources
cp /etc/apt/sources.list /etc/apt/sources.list.bak
# 2. Disable Enterprise Repository
# Comments out the enterprise repo to avoid subscription errors.
sed -i 's/^deb/#deb/' /etc/apt/sources.list.d/pve-enterprise.list
# 3. Remove Ceph Enterprise Repository
# Removes the Ceph enterprise repository that requires a subscription.
rm /etc/apt/sources.list.d/ceph.list
# 4. Add the Proxmox 9 No-Subscription Repository
# This enables Proxmox 9 updates without a license.
echo "deb http://download.proxmox.com/debian/pve trixie pve-no-subscription" >> /etc/apt/sources.list
# 5. Update Debian Codename from Bookworm to Trixie
# Switches the Debian base from Debian 12 to Debian 13.
sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
# 6. Refresh APT Package List
# Loads the latest package information from the updated repos.
apt update
# 7. Perform the Upgrade
# Upgrades all packages to Proxmox VE 9 and Debian 13.
# Tip: If prompted about config files, press N to keep your existing ones.
apt dist-upgrade
# 8. Reboot the Server
reboot
Ansible playbook Link to heading
---
- name: Upgrade Proxmox 8.x to Proxmox 9 (Debian 13)
hosts: proxmox
become: yes
gather_facts: no
tasks:
- name: Backup /etc/apt/sources.list
# Creates a backup copy so you can revert if needed
copy:
src: /etc/apt/sources.list
dest: /etc/apt/sources.list.bak
remote_src: yes
mode: '0644'
- name: Disable Proxmox enterprise repository
lineinfile:
path: /etc/apt/sources.list.d/pve-enterprise.list
regexp: '^deb'
line: '#deb'
backrefs: yes
ignore_errors: yes # in case the file doesn't exist
- name: Remove Ceph enterprise repository
file:
path: /etc/apt/sources.list.d/ceph.list
state: absent
- name: Add Proxmox 9 no-subscription repository
lineinfile:
path: /etc/apt/sources.list
line: "deb http://download.proxmox.com/debian/pve trixie pve-no-subscription"
create: no
insertafter: EOF
- name: Update Debian codename from bookworm to trixie
replace:
path: /etc/apt/sources.list
regexp: 'bookworm'
replace: 'trixie'
- name: Refresh APT package list and perform dist-upgrade
apt:
update_cache: yes
upgrade: dist
- name: Reboot the server after upgrade
reboot:
msg: "Rebooting after Proxmox 9 / Debian 13 upgrade"
reboot_timeout: 1800