Upgrade CentOS 8 to CentOS 8 Stream
With CentOS 8 now EOL, it is officially time to upgrade CentOS 8 virtual machines to CentOS 8 Stream. The good news is that it is even quicker and easier than the upgrade from CentOS 7 to CentOS 8 was.
First things first… Take a backup of your virtual machine, or at least a snapshot so that you have something you can revert back to if something goes wrong in this process.
Take a look at what release your CentOS machine is currently running.
cat /etc/centos-release
cat /etc/os-release
As you can see this machine is currently on CentOS 8.5.2111.

At this point, I’m going to enter “sudo su” on my VM and then enter my credentials, so that I can continue as ‘root’ and I don’t have to type “sudo” before every single command.
To begin, start by updating your system.
dnf -y update
The next step is to update your machine to the current CentOS Stream release package.
dnf -y install centos-release-stream --allowerasing
This step repoints the machine to the CentOS Stream repository rather than the CentOS 8 repository.
sudo dnf swap centos-linux-repos centos-stream-repos
List and view all of the enabled repositories. You should see they are set to “CentOS Stream 8”.
sudo dnf repolist

Next, synchronize all of the installed packages on your machine.
Note: For situational awareness, this step will upgrade or downgrade packages to match the new CentOS Stream ABI/API and will apparently break 100% RHEL compatibility due to the ABI/API change. This is the perfect example of why you would want to take a full backup of the system before making any changes, just in case the ABI/API change breaks one of your applications running on the system.
dnf -y distro-sync
Reboot your system.
init 6
Confirm that we are now running on CentOS 8 Stream.
cat /etc/centos-release
cat /etc/os-release
We can now see that this machine is now running on CentOS Stream 8.
