From ee660899d1b4fc28db5247a4c2530445151946c3 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 11 Nov 2025 04:19:47 +0100 Subject: [PATCH] linux: added proxmox major version upgrade guide --- wiki/linux/debian.md | 6 +- wiki/linux/package_manager.md | 5 +- wiki/linux/proxmox.md | 113 +++++++++++++++++++++++++++++++--- 3 files changed, 110 insertions(+), 14 deletions(-) diff --git a/wiki/linux/debian.md b/wiki/linux/debian.md index c7cc514..d882c1b 100644 --- a/wiki/linux/debian.md +++ b/wiki/linux/debian.md @@ -17,6 +17,10 @@ cat /etc/os-release ### Upgrading to a Higher Major Version +The first step for a major upgrade usually is +[retrieving the current version](#retrieve-debian-version) to check the version that should be +installed. + If the user of the system to perform a major version upgrade on is using [Docker](/wiki/docker.md) some additional steps have to be taken before the upgrade. It is generally recommended to hold the Docker upgrade and performing it later. @@ -26,8 +30,6 @@ For this reason the following command has to be run first. apt-mark hold docker-ce docker-ce-cli containerd.io ``` -The first step for a major upgrade usually is -[retrieving the current version](#retrieve-debian-version). Afterward the packages of the current major release version have to be [upgrading](/wiki/linux/package_manager/apt.md#updating-upgrading) using APTs `full-upgrade` option. diff --git a/wiki/linux/package_manager.md b/wiki/linux/package_manager.md index 6eefdb3..4da97a6 100644 --- a/wiki/linux/package_manager.md +++ b/wiki/linux/package_manager.md @@ -5,7 +5,8 @@ Package managers are important programs to get software onto your system. The following is a list of package managers and the corresponding [Linux](/wiki/linux.md) distributions. -- [Debian](/wiki/linux/debian.md) and Debian-based distributions use the - [APT](/wiki/linux/package_manager/apt.md) package manager +- [Debian](/wiki/linux/debian.md) and Debian-based distributions like + [Proxmox](/wiki/linux/proxmox.md) use the [APT](/wiki/linux/package_manager/apt.md) package + manager. - [Arch Linux](/wiki/linux/arch-linux.md) and Arch-based distributions use [Pacman]() and various managers for the AUR. diff --git a/wiki/linux/proxmox.md b/wiki/linux/proxmox.md index b9a34a0..22e7836 100644 --- a/wiki/linux/proxmox.md +++ b/wiki/linux/proxmox.md @@ -1,8 +1,103 @@ # Proxmox -Proxmox is an environment for virtual machines and containers. +[Proxmox](https://proxmox.com/) is an environment for virtual machines and containers. +It is based on [Debian](/wiki/linux/debian.md) and uses the package manager +[APT](/wiki/linux/package_manager/apt.md). -## Disk Management +## Usage + +This section addresses the usage of Proxmox specific tasks. + +### Retrieve PVE Version + +The current version of the Proxmox Virtual Environment can be retrieved by running the following +command. + +```sh +pveversion +``` + +### Upgrading to a Higher Major Version + +The first step for a major upgrade usually is +[retrieving the current version](#retrieve-pve-version) to check the version that should be +installed. + +The way of updating Proxmox is very similar to [Debian](/wiki/linux/debian.md) since it is also +based on it. +However there are some differences. +Therefore it is described here in detail. + +If the user of the system to perform a major version upgrade on is using [Docker](/wiki/docker.md) +some additional steps have to be taken before the upgrade. +It is generally recommended to hold the Docker upgrade and performing it later. +For this reason the following command has to be run first. + +```sh +apt-mark hold docker-ce docker-ce-cli containerd.io +``` + +First the packages of the current major release version have to be +[upgrading](/wiki/linux/package_manager/apt.md#updating-upgrading) using APTs `full-upgrade` +option. +Then a reboot is recommended. + +At this point the state of the system can be checked this can be done by a special Proxmox command. +Depending on the version the system is on the command may differ. +If the system is for example running PVE 8 (based on [Debian 12](/wiki/linux/debian.md)) then the +following command can be used. +Similar commands exist for other versions (for example `pve7to8`). + +``` +pve8to9 +``` + +This will check if the current state of the system is ready for the major version upgrade. +It is not recommended to continue with errors or without running these checks + +Now APT needs to be assigned new sources. +This can be done by editing the file `/etc/apt/sources.list` and replacing everything within with +the new sources. +For PVE 8 - which corresponds to Debians 12th version called bookworm - this lines to add are the +following. + +```txt +deb http://deb.debian.org/debian bookworm main contrib non-free +deb http://deb.debian.org/debian bookworm-updates main contrib non-free +deb http://security.debian.org/debian-security bookworm-security main contrib non-free +``` + +On Proxmox there are two additional source lists that need to be changed. + +The first one is located at `/etc/apt/sources.list.d/pve-no-subscription.list` and should look +similar to the following. + +```txt +deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription +``` + +The list placed at `/etc/apt/sources.list.d/pve-enterprise.list` should be commented out entirely +if the system is not running the enterprise version. + +Following this a [full upgrade](/wiki/linux/package_manager/apt.md#updating-upgrading) has to be +performed. +Sometimes this process asks if the user wants to replace the local configuration files with newer +ones. +It is generally recommended to select `N` and reject these new configurations. + +Finally another reboot is needed and the version number can be +[checked again](#retrieve-pve-version) confirming that the major version upgrade was +successfully performed. + +When the system ran Docker and its upgrade was put on hold as described at the start of this +section the following commands have to be run to finalize the major upgrade, take Docker from the +hold list and upgrade it. + +```sh +apt-mark unhold docker-ce docker-ce-cli containerd.io +apt update +apt install --only-upgrade docker-ce docker-ce-cli containerd.io +``` ### Adding a LVM to Proxmox @@ -12,7 +107,7 @@ Then add the LVM via the web-interface. Select Datacenter and Storage. The `Add` and choose `LVM`. After that follow the instructions and fill in the fields to your liking. -### Enlarging disk of a VM +### Enlarging Disk of a VM Make sure there is enough disk space available. For further information see [the disk management article](./disk-management.md) @@ -39,7 +134,7 @@ can be referenced for LVM systems. After that grow the filesystem in the vm as described in [the disk management article](/wiki/linux/disk-management.md#growing-a-file-system). -## Remove local-lvm and add its size to local +### Remove Local-LVM and Add Its Size to Local First remove `local-lvm` with `lvremove /dev/pve/data`. Then remove `local-lvm` in the proxmox gui via `Datacenter/Storage/Remove`. @@ -47,9 +142,7 @@ Change the `Content` of the remaining storage according to your needs. Add the free storage to the remaining storage with `lvresize -rl +100%FREE /dev/pve/root`. Finally extend the filesystem `resize2fs /dev/mapper/pve-root`. -## VM passthrough - -### USB passthrough +### USB Passthrough On the host system find the usb you're looking to pass through with @@ -69,14 +162,14 @@ for example qm set 101 -usb0 host=aaaa:8816 ``` -### PCI/GPU passthrough +### PCI/GPU Passthrough To use GPUs or other PCI devices you need to work with PCI passthrough. For documentation you can look in the [Proxmox wiki](https://pve.proxmox.com/wiki/Pci_passthrough). There is also an [article](https://www.reddit.com/r/homelab/comments/b5xpua/the_ultimate_beginners_guide_to_gpu_passthrough) on reddit, that focusses especially on windows 10 VMs with GPU passthrough. -### Increasing backup-limit of Proxmox storage +### Increasing Backup-Limit of Proxmox Storage The default limit for backup is 1. This is a bit too low. @@ -88,7 +181,7 @@ your liking. This section addresses various errors that can happen when using Proxmox. -### No internet after mainboard swap +### No Internet After Mainboard Swap If you change the mainboard of your proxmox-virtual-environment it is possible, that the NIC changes.