RHEL8 to Rocky 8 migration failed enabling modules


I run migration script on RHEL8, due to strict network access the script failed when enabling modules with error.
Can’t enable modules container-tools:rhel8 mariadb:10.5 perl-DBD-MySQL:4.046 perl-DBI:1.641 perl-IO-Socket-SSL:2.066 perl-libwww-perl:6.34 perl:5.26 python36:3.6 satellite-5-client:1.0

It could not connect to repos.

I opened up network to try again, but the script stops at the beginning with
Found a full or partial RockyLinux install already in place. Aborting

Server is up and running. When I check dnf module list, it will show me RHEL and Rocky Appstreams. What should i do to make sure I’m in clear with this migration? Any help is appreciated, thanks!

I’m guessing here, but do you still have the RHEL repositories enabled? If you look in /etc/yum.repos.d/, are there still repositories for RHEL there? I think you will need to have the RHEL repositories disabled to get things going the way you want.

Found that these two repos are still enabled.

name = Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel8/$releasever/x86_64/baseos/os
enabled = 1

name = Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel8/$releasever/x86_64/appstream/os
enabled = 1

If I disable those repos and run the script or yum update it will automatically enable the repos.
Maybe this is the reason?
Updating Subscription Management repositories.
How do I get rid of that?

They should not be enabled with a yum update. Set them to enabled = 0 OR, if you are worried, copy both repositories to a temporary directory somewhere so that they don’t exist in the /etc/yum.repos.d directory and then run your dnf upgrade or yum update again. As far as subscription manager is concerned, look for this file and see if it exists:


If it exists, edit it and look for enabled = 1 and change it to enabled = 0… I know that there has to be a command-line way to disable it, but I can’t remember what it is, and this will work.

Thanks for the help. I disabled subscription manager and did dnf upgrade and rebooted once more. The initial problem with the script was that none of the mirrors were allowed in our proxy (mirrorlist is default in repo files) and only dl.rockylinux.org was allowed.

Are there any other things I should check?

Not off the top of my head. Is the original problem still happening, or is that now resolved?

For some reason, after reboot rhel repositories were enabled once again even when subscription-manager.conf had enabled = 0. I moved the repo file out of yum.repos.d and did dnf update, now it shows only Rocky 8 appstreams.

Had to run
dnf remove subscription-manager dnf-plugin-subscription-manager
because rhel repositories kept creeping to the server.