{"id":254,"date":"2022-01-18T12:50:53","date_gmt":"2022-01-18T11:50:53","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/2022\/01\/18\/migrating-a-centos-7-ami-to-rocky-linux-8\/"},"modified":"2022-01-18T12:50:53","modified_gmt":"2022-01-18T11:50:53","slug":"migrating-a-centos-7-ami-to-rocky-linux-8","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/","title":{"rendered":"Migrating a CentOS 7 EC2 instance to Rocky Linux 8"},"content":{"rendered":"<p>Some time ago I&#8217;ve written about <a href=\"https:\/\/www.dbi-services.com\/blog\/switching-from-centos-8-to-red-hat-8\/\" target=\"_blank\" rel=\"noopener\">migrating a CentOS 8 machine to Red Hat 8<\/a>, because <a href=\"https:\/\/centos.org\/\" target=\"_blank\" rel=\"noopener\">CentOS<\/a> 8 reached end of life last December. We did that for all CentOS 8 installations at that customer and all are running as virtual machines. The very same customer has many <a href=\"https:\/\/aws.amazon.com\/ec2\/\" target=\"_blank\" rel=\"noopener\">EC2 instances<\/a> running on CentOS 7. Migrating away from CentOS 7 is one of the next tasks to complete, as <a href=\"https:\/\/en.wikipedia.org\/wiki\/CentOS#End-of-support_schedule\" target=\"_blank\" rel=\"noopener\">CentOS 7 will reach end of life in 2024<\/a>. For doing that, you basically have two options (if you want to stay inside the Red Hat family): Either you deploy your target distribution (either <a href=\"https:\/\/rockylinux.org\/\" target=\"_blank\" rel=\"noopener\">Rocky Linux<\/a>, <a href=\"https:\/\/almalinux.org\/\" target=\"_blank\" rel=\"noopener\">Alma Linux<\/a>, <a href=\"https:\/\/www.oracle.com\/linux\/\" target=\"_blank\" rel=\"noopener\">Oracle Linux<\/a> or <a href=\"https:\/\/www.redhat.com\/en\/technologies\/linux-platforms\/enterprise-linux\" target=\"_blank\" rel=\"noopener\">Red Hat Enterprise Linux<\/a>) from an existing <a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/AMIs.html\" target=\"_blank\" rel=\"noopener\">AMI<\/a> and then re-install everything you need and restore the data. Another option would be to directly upgrade from CentOS 7 to whatever Red Hat based Linux version 8. We&#8217;ll go for the second option in this post.<\/p>\n<p><b>Before we start: Of course you need a backup of your EC2 instance before doing this! Of course you really need to test your application after the upgrade because a lot of packages and the kernel will change.<\/b><\/p>\n<p>You might wonder how this will work at all, because there is no supported migration path from CentOS 7 to CentOS 8. The people behind Alma Linux stepped into this and created a project called <a href=\"https:\/\/almalinux.org\/elevate\" target=\"_blank\" rel=\"noopener\">Elevate<\/a> to support exactly those migrations. You can use that tool to migrate from CentOS 7 to AlmaLinux 8, to Rock Linux 8 and to Oracle Linux 8.<\/p>\n<p>My starting point is a fresh EC2 instance based on the latest CentOS 7 AMI:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-1.jpg\" alt=\"\" width=\"1660\" height=\"586\" class=\"aligncenter size-full wp-image-53758\" \/><\/a><\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[centos@ip-10-0-1-100 ~]$ cat \/etc\/centos-release\nCentOS Linux release 7.7.1908 (Core)\n[centos@ip-10-0-1-100 ~]$ uname -a\nLinux ip-10-0-1-100.eu-central-1.compute.internal 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64 x86_64 x86_64 GNU\/Linux\n<\/pre>\n<p>First thing to do: Update the system to the latest release and reboot:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[centos@ip-10-0-1-100 ~]$ sudo yum update -y\nLoaded plugins: fastestmirror\nDetermining fastest mirrors\n * base: download.cf.centos.org\n * extras: download.cf.centos.org\n * updates: download.cf.centos.org\nbase                                                                                                                                                                                                                                                   | 3.6 kB  00:00:00     \nextras                                                                                                                                                                                                                                                 | 2.9 kB  00:00:00     \nupdates                                                                                                                                                                                                                                                | 2.9 kB  00:00:00     \n(1\/4): base\/7\/x86_64\/group_gz                                                                                                                                                                                                                          | 153 kB  00:00:00     \n(2\/4): extras\/7\/x86_64\/primary_db                                                                                                                                                                                                                      | 243 kB  00:00:00     \n(3\/4): updates\/7\/x86_64\/primary_db                                                                                                                                                                                                                     |  13 MB  00:00:00     \n(4\/4): base\/7\/x86_64\/primary_db                                                                                                                                                                                                                        | 6.1 MB  00:00:00     \nResolving Dependencies\n--&gt; Running transaction check\n---&gt; Package acl.x86_64 0:2.2.51-14.el7 will be updated\n---&gt; Package acl.x86_64 0:2.2.51-15.el7 will be an update\n...\n  sg3_utils-libs.x86_64 1:1.37-19.el7                   shared-mime-info.x86_64 0:1.8-5.el7                     sudo.x86_64 0:1.8.23-10.el7_9.2                         systemd.x86_64 0:219-78.el7_9.5                      systemd-libs.x86_64 0:219-78.el7_9.5           \n  systemd-sysv.x86_64 0:219-78.el7_9.5                  teamd.x86_64 0:1.29-3.el7                               tuned.noarch 0:2.11.0-11.el7_9                          tzdata.noarch 0:2021e-1.el7                          util-linux.x86_64 0:2.23.2-65.el7_9.1          \n  vim-minimal.x86_64 2:7.4.629-8.el7_9                  virt-what.x86_64 0:1.18-4.el7_9.1                       wpa_supplicant.x86_64 1:2.6-12.el7_9.2                  xfsprogs.x86_64 0:4.5.0-22.el7                       yum.noarch 0:3.4.3-168.el7.centos              \n  yum-plugin-fastestmirror.noarch 0:1.1.31-54.el7_8     yum-utils.noarch 0:1.1.31-54.el7_8                      zlib.x86_64 0:1.2.7-19.el7_9                           \n\nReplaced:\n  iwl7265-firmware.noarch 0:22.0.7.0-72.el7                                                                                                                                                                                                                                   \n\nComplete!\n[centos@ip-10-0-1-100 ~]$ sudo reboot\n...\n[centos@ip-10-0-1-100 ~]$ cat \/etc\/centos-release\nCentOS Linux release 7.9.2009 (Core)\n[centos@ip-10-0-1-100 ~]$ uname -a\nLinux ip-10-0-1-100.eu-central-1.compute.internal 3.10.0-1160.49.1.el7.x86_64 #1 SMP Tue Nov 30 15:51:32 UTC 2021 x86_64 x86_64 x86_64 GNU\/Linux\n<\/pre>\n<p>Install the elevate repository:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[centos@ip-10-0-1-100 ~]$ sudo yum install -y http:\/\/repo.almalinux.org\/elevate\/elevate-release-latest-el7.noarch.rpm\nLoaded plugins: fastestmirror\nelevate-release-latest-el7.noarch.rpm                                                                                                                                                                                                                  | 6.9 kB  00:00:00     \nExamining \/var\/tmp\/yum-root-NQPt77\/elevate-release-latest-el7.noarch.rpm: elevate-release-1.0-1.el7.noarch\nMarking \/var\/tmp\/yum-root-NQPt77\/elevate-release-latest-el7.noarch.rpm to be installed\nResolving Dependencies\n--&gt; Running transaction check\n---&gt; Package elevate-release.noarch 0:1.0-1.el7 will be installed\n--&gt; Finished Dependency Resolution\n\nDependencies Resolved\n\n==============================================================================================================================================================================================================================================================================\n Package                                                         Arch                                                   Version                                                      Repository                                                                          Size\n==============================================================================================================================================================================================================================================================================\nInstalling:\n elevate-release                                                 noarch                                                 1.0-1.el7                                                    \/elevate-release-latest-el7.noarch                                                 3.4 k\n\nTransaction Summary\n==============================================================================================================================================================================================================================================================================\nInstall  1 Package\n\nTotal size: 3.4 k\nInstalled size: 3.4 k\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n  Installing : elevate-release-1.0-1.el7.noarch                                                                                                                                                                                                                           1\/1 \n  Verifying  : elevate-release-1.0-1.el7.noarch                                                                                                                                                                                                                           1\/1 \n\nInstalled:\n  elevate-release.noarch 0:1.0-1.el7                                                                                                                                                                                                                                          \n\nComplete!\n<\/pre>\n<p>Elevate uses <a href=\"https:\/\/leapp.readthedocs.io\/en\/latest\/index.html\" target=\"_blank\" rel=\"noopener\">Leapp<\/a> in the background so we need to install the corresponding packages:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n\n[centos@ip-10-0-1-100 ~]$  sudo yum install -y leapp-upgrade leapp-data-rocky\nLoaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n * base: download.cf.centos.org\n * extras: download.cf.centos.org\n * updates: download.cf.centos.org\nelevate                                                                                                                                                                                                                                                | 3.0 kB  00:00:00     \nelevate\/x86_64\/primary_db                                                                                                                                                                                                                              | 6.7 kB  00:00:00     \nResolving Dependencies\n--&gt; Running transaction check\n---&gt; Package leapp-data-rocky.noarch 0:0.1-2.el7 will be installed\n---&gt; Package leapp-upgrade-el7toel8.noarch 0:0.14.0-100.202109271224Z.b7ebfca.master.el7.elevate will be installed\n--&gt; Processing Dependency: leapp-repository-dependencies = 6 for package: leapp-upgrade-el7toel8-0.14.0-100.202109271224Z.b7ebfca.master.el7.elevate.noarch\n--&gt; Processing Dependency: leapp-framework &lt; 3 for package: leapp-upgrade-el7toel8-0.14.0-100.202109271224Z.b7ebfca.master.el7.elevate.noarch\n...\nDependency Installed:\n  deltarpm.x86_64 0:3.6-3.el7                                                     dnf.noarch 0:4.0.9.2-2.el7_9                                                            dnf-data.noarch 0:4.0.9.2-2.el7_9                                                                 \n  leapp.noarch 0:0.12.1-100.20210924142320684911.master.28.g1f03432.el7           leapp-deps.noarch 0:0.12.1-100.20210924142320684911.master.28.g1f03432.el7              leapp-upgrade-el7toel8-deps.noarch 0:0.14.0-100.202109271224Z.b7ebfca.master.el7.elevate          \n  libcomps.x86_64 0:0.1.8-14.el7                                                  libdnf.x86_64 0:0.22.5-2.el7_9                                                          libmodulemd.x86_64 0:1.6.3-1.el7                                                                  \n  librepo.x86_64 0:1.8.1-8.el7_9                                                  libreport-filesystem.x86_64 0:2.1.11-53.el7.centos                                      libsolv.x86_64 0:0.6.34-4.el7                                                                     \n  pciutils.x86_64 0:3.5.1-3.el7                                                   python-enum34.noarch 0:1.0.4-1.el7                                                      python2-dnf.noarch 0:4.0.9.2-2.el7_9                                                              \n  python2-hawkey.x86_64 0:0.22.5-2.el7_9                                          python2-leapp.noarch 0:0.12.1-100.20210924142320684911.master.28.g1f03432.el7           python2-libcomps.x86_64 0:0.1.8-14.el7                                                            \n  python2-libdnf.x86_64 0:0.22.5-2.el7_9                                         \n\nComplete!\n<\/pre>\n<p>If you want to migrate to one of the other distributions, replace the &#8220;leapp-data-rocky&#8221; package with one of these:<\/p>\n<ul>\n<li>leapp-data-almalinux<\/li>\n<li>leapp-data-oraclelinux<\/li>\n<li>leapp-data-rocky<\/li>\n<\/ul>\n<p>Time for the pre-ugrade check:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[centos@ip-10-0-1-100 ~]$ sudo leapp preupgrade\n==&gt; Processing phase `configuration_phase`\n====&gt; * ipu_workflow_config\n        IPU workflow config actor\n==&gt; Processing phase `FactsCollection`\n====&gt; * firewalld_facts_actor\n        Provide data about firewalld\n====&gt; * source_boot_loader_scanner\n        Scans the boot loader configuration on the source system.\n====&gt; * repository_mapping\n        Produces message containing repository mapping based on provided file.\n====&gt; * read_openssh_config\n        Collect information about the OpenSSH configuration.\n====&gt; * scandasd\n        In case of s390x architecture, check whether DASD is used.\n====&gt; * rpm_scanner\n        Provides data about installed RPM Packages.\n...\n====&gt; * target_userspace_creator\n        Initializes a directory to be populated as a minimal environment to run binaries from the target system.\nRocky Linux 8 - PowerTools                      6.8 MB\/s | 2.5 MB     00:00    \nRocky Linux 8 - Extras                           42 kB\/s |  10 kB     00:00    \nRocky Linux 8 - AppStream                       7.4 MB\/s | 8.7 MB     00:01    \nRocky Linux 8 - BaseOS                          4.2 MB\/s | 4.6 MB     00:01    \nRocky Linux 8 - HighAvailability                743 kB\/s | 545 kB     00:00    \nDependencies resolved.\n================================================================================\n Package                     Arch   Version              Repository        Size\n================================================================================\nInstalling:\n dnf                         noarch 4.7.0-4.el8          rocky8-baseos    543 k\n dnf-plugins-core            noarch 4.0.21-3.el8         rocky8-baseos     69 k\n...\nCheck completed.\n====&gt; * tmp_actor_to_satisfy_sanity_checks\n        The actor does NOTHING but satisfy static sanity checks\n====&gt; * check_initramfs_tasks\n        Inhibit the upgrade if conflicting \"initramfs\" tasks are detected\n==&gt; Processing phase `Reports`\n====&gt; * verify_check_results\n        Check all dialogs and notify that user needs to make some choices.\n====&gt; * verify_check_results\n        Check all generated results messages and notify user about them.\n\n============================================================\n                     UPGRADE INHIBITED                      \n============================================================\n\nUpgrade has been inhibited due to the following problems:\n    1. Inhibitor: Missing required answers in the answer file\nConsult the pre-upgrade report for details and possible remediation.\n\n============================================================\n                     UPGRADE INHIBITED                      \n============================================================\n\n\nDebug output written to \/var\/log\/leapp\/leapp-preupgrade.log\n\n============================================================\n                           REPORT                           \n============================================================\n\nA report has been generated at \/var\/log\/leapp\/leapp-report.json\nA report has been generated at \/var\/log\/leapp\/leapp-report.txt\n\n============================================================\n                       END OF REPORT                        \n============================================================\n\nAnswerfile has been generated at \/var\/log\/leapp\/answerfile\n<\/pre>\n<p>Have a look at the generated answer file and the report. Any issues you need to fix are mentioned there. In my case, this is what I had to do:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[centos@ip-10-0-1-100 ~]$ echo PermitRootLogin yes | sudo tee -a \/etc\/ssh\/sshd_config\nPermitRootLogin yes\n[centos@ip-10-0-1-100 ~]$ sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True\n<\/pre>\n<p>Once this is done, kick off the migration:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[centos@ip-10-0-1-100 ~]$ sudo leapp upgrade\n==&gt; Processing phase `configuration_phase`\n====&gt; * ipu_workflow_config\n        IPU workflow config actor\n==&gt; Processing phase `FactsCollection`\n====&gt; * firewalld_facts_actor\n        Provide data about firewalld\n...\nThe downloaded packages were saved in cache until the next successful transaction.\nYou can remove cached packages by executing 'dnf clean packages'.\n==&gt; Processing phase `InterimPreparation`\n====&gt; * efi_interim_fix\n        Adjust EFI boot entry for first reboot\n====&gt; * upgrade_initramfs_generator\n        Creates the upgrade initramfs\n====&gt; * add_upgrade_boot_entry\n        Add new boot entry for Leapp provided initramfs.\nA reboot is required to continue. Please reboot your system.\n\n\nDebug output written to \/var\/log\/leapp\/leapp-upgrade.log\n\n============================================================\n                           REPORT                           \n============================================================\n\nA report has been generated at \/var\/log\/leapp\/leapp-report.json\nA report has been generated at \/var\/log\/leapp\/leapp-report.txt\n\n============================================================\n                       END OF REPORT                        \n============================================================\n\nAnswerfile has been generated at \/var\/log\/leapp\/answerfile\n<\/pre>\n<p>Looks all fine, the final step is a reboot:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[centos@ip-10-0-1-100 ~]$ sudo reboot\n<\/pre>\n<p>Don&#8217;t panic, this reboot takes time. If you are using AWS EC2 you can use the <a href=\"https:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/ec2-serial-console.html\" target=\"_blank\" rel=\"noopener\">Serial Console<\/a> to check what is going on:<br \/>\n<a href=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-2-1.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-2-1.jpg\" alt=\"\" width=\"1000\" height=\"297\" class=\"aligncenter size-full wp-image-53761\" \/><\/a><\/p>\n<p>After some minutes the EC2 instance should be back:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[centos@ip-10-0-1-100 ~]$ cat \/etc\/rocky-release\nRocky Linux release 8.5 (Green Obsidian)\n[centos@ip-10-0-1-100 ~]$ uname -a\nLinux ip-10-0-1-100.eu-central-1.compute.internal 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Tue Dec 21 19:02:23 UTC 2021 x86_64 x86_64 x86_64 GNU\/Linux\n<\/pre>\n<p>Quite easy and straight forward, but this was an installation without any user data, modifications to the system or third party applications.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Some time ago I&#8217;ve written about migrating a CentOS 8 machine to Red Hat 8, because CentOS 8 reached end of life last December. We did that for all CentOS 8 installations at that customer and all are running as virtual machines. The very same customer has many EC2 instances running on CentOS 7. Migrating&hellip;&nbsp;<\/p>\n","protected":false},"author":28,"featured_media":93,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133],"tags":[2476,72,73,74,75],"class_list":["post-254","post","type-post","status-publish","format-standard","has-post-thumbnail","category-database","tag-almalinux","tag-centos","tag-linux","tag-oracle-linux","tag-rocky-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Migrating a CentOS 7 EC2 instance to Rocky Linux 8 - dbi services Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrating a CentOS 7 EC2 instance to Rocky Linux 8\" \/>\n<meta property=\"og:description\" content=\"Some time ago I&#8217;ve written about migrating a CentOS 8 machine to Red Hat 8, because CentOS 8 reached end of life last December. We did that for all CentOS 8 installations at that customer and all are running as virtual machines. The very same customer has many EC2 instances running on CentOS 7. Migrating&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-18T11:50:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1660\" \/>\n\t<meta property=\"og:image:height\" content=\"586\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\"},\"headline\":\"Migrating a CentOS 7 EC2 instance to Rocky Linux 8\",\"datePublished\":\"2022-01-18T11:50:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/\"},\"wordCount\":424,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/centos7-1.jpg\",\"keywords\":[\"AlmaLinux\",\"CentOS\",\"Linux\",\"Oracle Linux\",\"Rocky Linux\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/\",\"name\":\"Migrating a CentOS 7 EC2 instance to Rocky Linux 8 - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/centos7-1.jpg\",\"datePublished\":\"2022-01-18T11:50:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/centos7-1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/01\\\/centos7-1.jpg\",\"width\":1660,\"height\":586},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/migrating-a-centos-7-ami-to-rocky-linux-8\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migrating a CentOS 7 EC2 instance to Rocky Linux 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"caption\":\"Open source Team\"},\"description\":\"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Migrating a CentOS 7 EC2 instance to Rocky Linux 8 - dbi services Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/","og_locale":"en_US","og_type":"article","og_title":"Migrating a CentOS 7 EC2 instance to Rocky Linux 8","og_description":"Some time ago I&#8217;ve written about migrating a CentOS 8 machine to Red Hat 8, because CentOS 8 reached end of life last December. We did that for all CentOS 8 installations at that customer and all are running as virtual machines. The very same customer has many EC2 instances running on CentOS 7. Migrating&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2022-01-18T11:50:53+00:00","og_image":[{"width":1660,"height":586,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-1.jpg","type":"image\/jpeg"}],"author":"Open source Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Open source Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a"},"headline":"Migrating a CentOS 7 EC2 instance to Rocky Linux 8","datePublished":"2022-01-18T11:50:53+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/"},"wordCount":424,"commentCount":6,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-1.jpg","keywords":["AlmaLinux","CentOS","Linux","Oracle Linux","Rocky Linux"],"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/","url":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/","name":"Migrating a CentOS 7 EC2 instance to Rocky Linux 8 - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-1.jpg","datePublished":"2022-01-18T11:50:53+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-1.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/01\/centos7-1.jpg","width":1660,"height":586},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/migrating-a-centos-7-ami-to-rocky-linux-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Migrating a CentOS 7 EC2 instance to Rocky Linux 8"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","caption":"Open source Team"},"description":"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.","url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=254"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/254\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/93"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}