How to Upgrade Proxmox VE 7 to Version 8
In the video below, we show you how to upgrade Proxmox VE from version 7 to 8
Proxmox recently announced the release of of Proxmox VE version 8
And that follows on from the release of Debian version 12, which Proxmox VE uses as its operating system
But a major upgrade like this has to be done from the command line
Useful links:
https://pve.proxmox.com/wiki/Upgrade_from_7_to_8
Update Proxmox VE
The first thing we need to do is to make sure Proxmox VE is up to date as far as version 7 is concerned
As far as I’m aware we don’t have a maintenance mode for Proxmox VE
So, if you have a standalone server then shutdown any virtual machines that are running and make sure you don’t have any that will start at boot
If you have a cluster you could also migrate your virtual machines to another server
Now if you’re using High Availability, you’ll also want to make sure virtual machines won’t be automatically migrated back to this one
This will makes things less disruptive as we’ll be probably restarting the server twice to upgrade it to verion 8
Next, we need to make sure that Debian and Proxmox VE are fully up to date
Navigate to the server, then to Updates and click Refresh
If any updates are found, click Upgrade
This opens a shell and you’ll be prompted to agree to the upgrades
You can also do this from the shell, or an SSH session
apt update
apt dist-upgrade -y
Once this has been completed, reboot the server
In the GUI click Reboot, or from the command line run the following command
reboot now
Once the server is back up, open the shell or connect to it using SSH and run the following command
pve7to8 --full
This was added fairly recently and allows you to check for potential problems if you upgrade the server from version 7 to 8
Assuming no issues are found we’ll check to see what version we’re running
pveversion
At the time of recording, this should be 7.4-16
This is useful because the GUI only tells you the version of the server you’ve logged into
Upgrade Proxmox VE
Now because we are doing a major upgrade of the server, as a precaution you’ll want to make sure that you’ll be able to get console access to it if things go wrong
You could run the upgrade from the console, but an SSH session makes it easier to copy and paste the correct commands
If something goes wrong, however, we may only be able to access the server via the console, so it makes sense to check that’s possible before proceeding
To upgrade Proxmox VE and Debian, we need to update the repository information
Debian 11 is known as Bullseye whilst Debian 12 is Bookworm
First we need to update the sources.list file
Whilst you could edit this with a text editor like nano and make changes with Ctrl-h, instead we’ll use the stream editor command
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
This basically replaces all instances of bullseye in /etc/apt/sources.list with bookworm
The -i parameter is to overwrite the contents of the file, otherwise we would just have the result output to the screen
The s/bullseye/bookworm/g part is an instruction to match the regular-expression bullseye and replace it with bookworm, and to do this for all instances hence the g flag
The /etc/apt/sources.list.d folder can contain files about other repositories so it should be checked for other files to update
ls -l /etc/apt/sources.list.d
The Enterprise subscription for instance will likely be a file called pve-enterprise.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/pve-enterprise.list
For Ceph, expect to find a ceph.list file
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/ceph.list
We then update the repository cache again, but this time it will based on Bookworm
apt update
Now we can upgrade to Debian 12 and Proxmox VE 8
apt dist-upgrade
The upgrade will pause with information
You can read through this or press q to quit and continue the upgrade
After that, questions may arise about changes to be made
Expect to be asked if you want to be prompted for for every service that needs to restart. Typically you won’t
After that you will get various questions to see if you want to replace an existing configuration file
Some examples are as follows:
For /etc/issue you can answer with the default N as we’re told Proxmox VE autogenerates this on boot
For /etc/ssh/sshd_config there was a change which deprecates ChallengeResponseAuthentication in favour of KbdInteractiveAuthentication. Even if you have made changes to this file, it would be better to replace the current version with the maintainer’s version and then update that one to suit your own purposes later, for example, to restrict authentation to SSH keys only
For /etc/lvm/lvm.conf it would be best to opt for the maintainer’s version we’re told
If prompted for /etc/default/grub it would be best to keep the current version as the assumption is you must have changed this and those changes need to remain
For /etc/apt/sources.list.d/pve-enterprise.list it would be best to opt for the maintainer’s version
But if you’re ever in doubt, stick eith the file you have
Once done reboot the server for the changes to take effect
reboot now
Post Update
Assuming the server comes back up it should now be on version 8 which we can check from a shell or SSH session
pveversion
If you have a cluster, it makes sense to check this for each computer you upgrade, as the GUI only tells you the version of the server you’ve logged into through the web browser
For Lab users that are only using the non-subscription updates, you will have to disable the enterprise updates again if you opted to replace the file
Navigate to Updates | Repositories, select pve-enterprise entry then click Disable
Subscription notifications will also need disabling again if you don’t want these
For a cluster, you’ll have to repeat the same upgrade process for every other node
While a cluster may be able to opreate in the interim with servers running different versions, the best practice is to have all servers running the same version
Sharing is caring!