Bookmark this page

Guided Exercise: Perform a Pre-conversion Analysis and Convert a Server

Use the convert2rhel command to analyze a CentOS Linux 7 server for issues before converting it, and then convert it.

Outcomes

  • Perform a pre-conversion analysis on a CentOS Linux 7 system to ensure the system's eligibility for conversion.

  • Convert the target machine to Red Hat Enterprise Linux 7.

As the student user on the workstation machine, use the lab command to prepare your environment for this exercise, and to ensure that all required resources are available.

[student@workstation ~]$ lab start convert-perform

To perform this exercise, verify the following items:

Instructions

In this activity, you convert the servera.lab.example.com machine, which is currently based on CentOS Linux 7, to use Red Hat Enterprise Linux 7. This activity guides you through a conversion process that delegates the system registration to the Convert2RHEL tool and uses the internet to perform some tasks. If you want to convert a disconnected system, then skip this activity and complete the the section called “Guided Exercise: Analyze and Convert a Server in a Disconnected Environment.

In a future activity, you will verify that the machine and the application that runs on the machine still function after the conversion.

  1. Configure the servera machine to use the local Satellite Server (satellite.lab.example.com) for the conversion process. Provide the Katello package and registration information for the Convert2RHEL tool to perform the registration.

    1. Log in to the servera machine as the student user. Switch to the root user. Use student as the password.

      [student@workstation ~]$ ssh servera
      student@servera's password: student
      [student@servera ~]$ sudo -i
      [sudo] password for student: student
      [root@servera ~]#
    2. Download the katello-ca-consumer package from the local Satellite Server.

      [root@servera ~]# curl --insecure --output katello-ca-consumer-latest.noarch.rpm \
      https://satellite.lab.example.com/pub/katello-ca-consumer-latest.noarch.rpm
      ...output omitted...
    3. Move the katello-ca-consumer package to the /usr/share/convert2rhel/subscription-manager directory.

      [root@servera ~]# mv katello-ca-consumer-latest.noarch.rpm \
      /usr/share/convert2rhel/subscription-manager/
      [root@servera ~]# ls /usr/share/convert2rhel/subscription-manager/
      katello-ca-consumer-latest.noarch.rpm
    4. Review the contents of the /etc/convert2rhel.ini file.

      [root@servera ~]# cat /etc/convert2rhel.ini
      ...output omitted...
      [subscription_manager]
      # username       = <insert_username>
      # password       = <insert_password>
      # activation_key = <insert_activation_key>
      # org            = <insert_org>
    5. Update the /etc/convert2rhel.ini configuration file to match the Satellite information of the organization. The conversion process for this activity uses the Operations organization and the convert2rhel activation key. The convert2rhel activation key is associated with a content view that includes the CentOS Linux and RHEL repositories.

      In the convert2rhel configuration file, find the [subscription_manager] section, and enter your activation key and organization name. Your username and password are not required because you are using an activation key with Simple Content Access (SCA).

      Important

      Make sure that you uncomment both of the lines that you edit by removing the leading number sign (#) and space.

      [root@servera ~]# cat /etc/convert2rhel.ini
      ...output omitted...
      [subscription_manager]
      ...output omitted...
      activation_key = convert2rhel
      org            = Operations
  2. On the servera host, perform a pre-conversion analysis with the convert2rhel analyze command.

    1. Run the convert2rhel analyze command to perform the pre-conversion analysis.

      When prompted to continue with the system conversion, input y to continue with the system analysis. Confirming this action performs the system analysis, not the conversion.

      [root@servera ~]# convert2rhel analyze
      ...output omitted...
      To disable the data collection, use the 'CONVERT2RHEL_DISABLE_TELEMETRY=1' environment variable.
      
      Continue with the system conversion? [y/n]: y
      ...output omitted...
      
      ========== Success (No changes needed) ==========
      (SUCCESS) CHECK_FIREWALLD_AVAILABILITY::SUCCESS - N/A
      (SUCCESS) IS_LOADED_KERNEL_LATEST::SUCCESS - N/A
      (SUCCESS) CUSTOM_REPOSITORIES_ARE_VALID::SUCCESS - N/A
      (SUCCESS) VALIDATE_PACKAGE_MANAGER_TRANSACTION::SUCCESS - N/A
      (SUCCESS) REMOVE_EXCLUDED_PACKAGES::SUCCESS - N/A
      (SUCCESS) READ_ONLY_MOUNTS_MNT::SUCCESS - N/A
      (SUCCESS) SUBSCRIBE_SYSTEM::SUCCESS - N/A
      (SUCCESS) PRE_SUBSCRIPTION::SUCCESS - N/A
      (SUCCESS) EFI::SUCCESS - N/A
      (SUCCESS) READ_ONLY_MOUNTS_SYS::SUCCESS - N/A
      (SUCCESS) BACKUP_REPOSITORY::SUCCESS - N/A
      (SUCCESS) BACKUP_REDHAT_RELEASE::SUCCESS - N/A
      (SUCCESS) PACKAGE_UPDATES::SUCCESS - N/A
      (SUCCESS) REMOVE_REPOSITORY_FILES_PACKAGES::SUCCESS - N/A
      (SUCCESS) LIST_THIRD_PARTY_PACKAGES::SUCCESS - N/A
      (SUCCESS) EUS_SYSTEM_CHECK::SUCCESS - N/A
      (SUCCESS) REMOVE_IWLAX2XX_FIRMWARE::SUCCESS - N/A
      (SUCCESS) BACKUP_PACKAGE_FILES::SUCCESS - N/A
      (SUCCESS) RHEL_COMPATIBLE_KERNEL::SUCCESS - N/A
      (SUCCESS) TAINTED_KMODS::SUCCESS - N/A
      (SUCCESS) DBUS_IS_RUNNING::SUCCESS - N/A
      (SUCCESS) ENSURE_KERNEL_MODULES_COMPATIBILITY::SUCCESS - N/A
      (SUCCESS) INSTALL_RED_HAT_GPG_KEY::SUCCESS - N/A
      (SUCCESS) INSTALL_RED_HAT_CERT_FOR_YUM::SUCCESS - N/A
      (SUCCESS) CONVERT2RHEL_LATEST_VERSION::SUCCESS - N/A
      
      ========== Info (No changes needed) ==========
      (INFO) REMOVE_REPOSITORY_FILES_PACKAGES::REPOSITORY_FILE_PACKAGES_REMOVED -
      Repository file packages to be removed
           Description: We have identified installed packages that match a pre-defined
           list of packages that are to be removed during the conversion
           Diagnosis: The following packages will be removed during the
           conversion: centos-release-7-9.2009.1.el7.centos.x86_64
           Remediation: N/A
      (INFO) REMOVE_EXCLUDED_PACKAGES::EXCLUDED_PACKAGES_REMOVED -
      Excluded packages to be removed
           Description: We have identified installed packages that match a pre-defined
           list of packages that are to be removed during the conversion
           Diagnosis: The following packages will be removed during the
           conversion: centos-logos-70.0.6-3.el7.centos.noarch
           Remediation: N/A

      According to the pre-conversion analysis report, the system complies with the prerequisites for the conversion. The report does not identify potential issues with the conversion, so you can proceed with converting the system.

  3. Because of the lab environment for this course, the katello-ca-consumer package is not uninstalled automatically. Uninstall this package manually before proceeding. (This step is not likely to be required in your organization's environment.)

    [root@servera ~]# rpm -qa katello-ca-consumer-*
    katello-ca-consumer-satellite.lab.example.com-1.0-2.noarch

    Remove the package by using the rpm command.

    [root@servera ~]# rpm -e \
    katello-ca-consumer-satellite.lab.example.com-1.0-2.noarch
  4. Use the convert2rhel command to convert the system to Red Hat Enterprise Linux.

    1. After you run the convert2rhel command, the command prompts you to continue with the system conversion and performs a pre-conversion analysis. The command prompts you a second time after the analysis to confirm the conversion.

      [root@servera ~]# convert2rhel
      ...output omitted...
      Continue with the system conversion? [y/n]: y
      
      ...output omitted...
      
      [2024-01-18T20:57:37+0000] TASK - [Pre-conversion analysis report] ***************
      No problems detected during the analysis!
      
      WARNING - ********************************************************
      WARNING - The tool allows rollback of any action until this point.
      WARNING - By continuing all further changes on the system will need to be reverted
                manually by the user, if necessary.
      WARNING - ********************************************************
      
      Continue with the system conversion? [y/n]: y
      
      Starting Conversion
      
      [2024-01-18T20:57:53+0000] TASK - [Convert: Replace system packages] *************
      Loaded plugins: fastestmirror, product-id, subscription-manager
      Enabling RHEL repositories:
      rhel-7-server-rpms
      
      ...output omitted...
      
      [2024-01-18T21:09:43+0000] TASK - [Final: Check kernel boot files] ***************
      Checking if the '/boot/vmlinuz-3.10.0-1160.105.1.el7.x86_64' file exists.
      Checking if the '/boot/initramfs-3.10.0-1160.105.1.el7.x86_64.img' file is valid.
      The initramfs and vmlinuz files are valid.
      Writing breadcrumbs to '/etc/migration-results'.
      Writing RHSM custom facts to '/etc/rhsm/facts/convert2rhel.facts'.
      
      [2024-01-18T21:09:45+0000] TASK - [Final: Update RHSM custom facts] **************
      Updating RHSM custom facts collected during the conversion.
      RHSM custom facts uploaded successfully.
      
      Conversion successful!
      
      WARNING - In order to boot the RHEL kernel, restart of the system is needed.

      The conversion process finishes successfully.

    2. Reboot the system to load the new kernel and system packages.

      [root@servera ~]# reboot
      ...output omitted...
      [student@workstation ~]$

      You will verify the success of the conversion in a future activity.

Finish

On the workstation machine, use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish convert-perform

Revision: rh174-7.9-0acf85c