Environment
- Red Hat Enterprise Linux 6.10 to Red Hat Enterprise Linux 7.9
Product Variant | x86 Architecture | x86_64 Architecture | IBM Power | IBM z Systems |
---|---|---|---|---|
Desktop Edition | Not supported | Not supported | N/A | N/A |
Workstation Edition | Not supported | Not supported | N/A | N/A |
Server Edition | Not supported | Supported | Supported[1] | Supported[2] |
HPC Compute Node | Not supported | Supported | N/A | N/A |
Server running CloudForms software | N/A | Not supported | N/A | N/A |
Server running Satellite software | N/A | Not supported[3] | N/A | N/A |
[1] Red Hat Enterprise Linux for Power, big endian
[2] Red Hat Enterprise Linux for IBM z Systems, except when Direct Access Storage Device (DASD) with Linux Disk Layout (LDL) is used
[3] Red Hat Satellite 6 Documentation will provide information and required tooling for migrating a Satellite environment from RHEL 6 to RHEL 7, but the in-place upgrade tool is not a supported method for this procedure. Refer to point 6.1 in the Satellite 6 Install Guide.
NOTE: There are different instructions for SAP systems.
* How do I upgrade from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7 with SAP HANA
Issue
- How do I perform an in-place upgrade from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7?
- How do I use the Preupgrade Assistant and Red Hat Upgrade Tool to upgrade Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7?
Resolution
Overview
Red Hat Enterprise Linux 7 (RHEL 7) is the first major release of RHEL to allow in-place upgrades from the previous RHEL major release (RHEL 6). An in-place upgrade offers a way of upgrading a system to a new major release of RHEL by replacing the existing operating system.
Note: This procedure is not applicable for upgrading Amazon Web Services(AWS) instances or Amazon Machine Image or Microsoft Azure. One can update from one minor version (i.e. RHEL 6.9 to RHEL 6.10 or RHEL 7.3 to RHEL 7.4) using the yum update
command.
Note: In RHEL 7, NetworkManager is installed by default. In case of an in-place upgrade from RHEL 6, NetworkManager is not installed and configured unless the service was configured and running before the upgrade.
Note: This procedure is strictly limited to the cases described in the table below. Most important, the upgrade can succeed only if the packages installed on the system are from the repositories mentioned in the table. This excludes any system with 3rd party packages, especially those with 3rd party drivers that are needed for booting.
This RHEL 6 to RHEL 7 upgrade procedure is fully supported if your RHEL system meets the following criteria:
-
Red Hat Enterprise Linux 6.10: Before upgrading to RHEL 7, start with RHEL 6 and update your system to have the latest RHEL 6.10 packages installed. This is described in the procedure below.
-
All Server editions (except x86): All server editions (except x86) of RHEL 6 can be upgraded with this procedure. Upgrades of RHEL Workstation and Desktop systems are not supported. Upgrades for the POWER architecture are supported. See the table above. Upgrades from the 32-bit architecture are not supported.
-
Limited package groups: The upgrade process handles only the following package groups and packages: Minimal (@minimal), Base (@base), Web Server (@web-server), DHCP Server, File Server (@nfs-server), CIFS File Server and Print Server (@print-server). Although upgrades of other packages and groups are not supported, in some cases, packages can be uninstalled from the RHEL 6 system and reinstalled on the upgraded RHEL 7 system without a problem. See the table below.
The supported use cases for upgrading RHEL 6 to RHEL 7:
Supported | Unsupported | |
---|---|---|
Source to Upgrade | RHEL 6.10 | Any older version of RHEL 6 than 6.10 |
Target RHEL version | RHEL 7.9 For more information, see: Supported in-place upgrade paths for Red Hat Enterprise Linux | Any older version of RHEL 7 than 7.9 |
File Systems | Like-file system upgrades For example ext3 to ext3, ext4 to ext4, xfs to xfs | Unlike-file system upgrades For example ext4 to xfs |
GNOME, KDE | None | All GNOME, KDE installs |
Packages/Groups | Minimal (@minimal) Base (@base) Web Server (@web-server) DHCP Server File Server (@nfs-server) CIFS File Server Print Server | All others |
Virtualization | KVM, VMware | Microsoft Hyper-V |
Red Hat Software Collections | Using tested process | All others |
High Availability | None | All |
The upgrade procedure consists of the following basic steps:
- Prepare the system
Update the system to the latest minor version of RHEL 6 - RHEL 6.10 - and install the required tools. - Perform the system assessment
Let the Preupgrade Assistant assess the system to identify possible upgrade issues before performing the actual upgrade. No changes are made to the system and you can repeat this step until you deal with all issues. - Perform the upgrade
Make sure your system is backed up and use the Red Hat Upgrade Tool to perform the upgrade. - Post-upgrade check
Clean up any orphaned RHEL 6 packages. - Provide feedback
Let Red Hat know in case you encounter any problems.
Step 1: Prepare the system
-
Get the latest packages
To make sure you run the latest minor version of Red Hat Enterprise Linux 6 and have the latest packages, register and subscribe the system. Then, type:# yum update -y # reboot
-
Enable the Extras repository
Enable the repository that contains the preupgrade-assistant, preupgrade-assistant-ui, preupgrade-assistant-el6toel7, preupgrade-assistant-el6toel7-data and redhat-upgrade-tool packages. The repository can be subscribed either through RHN Classic when connecting to a Red Hat Satellite Server, or through Red Hat Subscription Management when connecting to CDN:RHN Classic (Satellite)
# rhn-channel --add --channel rhel-x86_64-server-extras-6 # rhn-channel --add --channel rhel-x86_64-server-optional-6
Red Hat Subscription Management
# subscription-manager repos --enable rhel-6-server-extras-rpms # subscription-manager repos --enable rhel-6-server-optional-rpms
For POWER systems, execute these commands instead:
# subscription-manager repos --enable rhel-6-for-power-extras-rpms # subscription-manager repos --enable rhel-6-for-power-optional-rpms
-
Install the required packages
To install the packages required for the upgrade, type:# yum -y install preupgrade-assistant preupgrade-assistant-ui preupgrade-assistant-el6toel7 redhat-upgrade-tool
Step 2: Perform the system assessment
The Preupgrade Assistant (the preupg
command) lets you assess your system for any potential problems you might encounter with a Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7 upgrade before any changes to your system are made. This will help you determine your chances of successfully upgrading to Red Hat Enterprise Linux 7 before the actual upgrade process begins.
NOTE: You can (and should) run the Preupgrade Assistant multiple times to address anything that could cause problems before running the actual upgrade. The Preupgrade Assistant will not harm your installed system. Once you perform an in-place upgrade on your system, it is possible to get the previous working system back in limited configurations of the system using the Red Hat Upgrade Tool integrated rollback capability or using suitable custom backup and recovery solution, for example, by using the Relax-and-Recover (ReaR) utility. For more information, see the ReaR documentation and What is Relax and Recover (ReaR) and how can I use it for disaster recovery?.
The Preupgrade Assistant does the following:
-
Assesses the system for possible in-place upgrade limitations, such as package removals, incompatible obsoletes, name changes, or deficiencies in some configuration file compatibilities.
-
Provides a report with the assessment result.
-
Provides some postupgrade scripts to finish more complex issues after the in-place upgrade.
-
Leaves your system unchanged except for storing information or logs. It does not modify the assessed system.
Because the Preupgrade Assistant is based on a module system, new checks and upgrade actions can be added relatively easily, so you can expect the tool to improve over time.
With the Preupgrade Assistant packages installed, you have the option of reviewing the system assessment results locally on the assessed system, or of submitting the report over the network to a remote server that may gather results from multiple systems. These two options are described below.
Option 1: Run the Preupgrade Assistant to view the report locally
-
Run the
preupg
command to perform the assessment of the system# preupg With no options, produces result.html and tar.gz results files The Preupgrade Assistant is a diagnostics tool and does not perform the actual upgrade. Do you want to continue? [Y/n] y Gathering logs used by the Preupgrade Assistant: All installed packages : 01/10 ...finished (time 00:01s) ... |Removed rpms |needs_inspection | |Content for enabling and disabling services based on RHEL 6 system |needs_inspection | |Python 2.7.5 |needs_inspection | |Check for usage of dangerous range of UID/GIDs |needs_inspection | |Packages not signed by Red Hat |needs_action | -------------------------------------------------------------------------------------------------------- The tarball with results is stored in '/root/preupgrade-results/preupg_results-170629152543.tar.gz' . The latest assessment is stored in the '/root/preupgrade' directory. Summary information: We have found some potential risks. Read the full report file '/root/preupgrade/result.html' for more details. Please ensure you have backed up your system and/or data before doing a system upgrade to prevent loss of data in case the upgrade fails and full re-install of the system from installation media is needed. Upload results to UI by the command: e.g. preupg -u http://example.com:8099/submit/ -r /root/preupgrade-results/preupg_results-170629152543.tar.gz .
-
View the assessment result
When the Preupgrade Assistant scans your system, each performed test is printed to the command line standard output, followed by its result. The tool also produces an assessment report file with detailed information.-
Command line: The result keyword of each test and the assessment summary are displayed on the screen. Scroll back through the results to get a sense of how the assessment finished. You can see the result keywords only, open the assessment HTML report for more details.
-
Assessment report file: The /root/preupgrade/result.html file can be opened with any Web browser. An example of viewing the file using a Firefox browser:
# firefox file:///root/preupgrade/result.html
-
-
Review each test result
Each of the dozens of tests performed during the assessment has its result keyword. A table listing all the possible test result keywords together with their explanation follows:Result keyword Explanation PASS Everything is fine. You should be able to proceed to the upgrade when all exit codes are listed as PASS. FAIL Extreme upgrade risk. In-place upgrade is not possible. NEEDS_ACTION High upgrade risk. Some administrator action is needed before running the Red Hat Upgrade Tool. NEEDS_INSPECTION Lower or medium risks. This exit code does not necessarily mean the upgrade will fail, but it might result in a system that is not fully functional. Some parts of the system need to be checked and, if needed, fixed by the administrator. FIXED Changes required for the upgrade were fixed automatically. You do not need to review them further. INFORMATIONAL Useful, but not critical, information. NOT_APPLICABLE The package you asked to test is not on your system. ERROR This usually indicates errors in the tools themselves. Report this type of problem to Red Hat Support. notchecked The respective module has not been checked. See Known Issues for more details. -
View the README file
There is also a README file in the output directory (/root/preupgrade/). See the file for more information about the output directory structure, exit codes, and risk explanations associated with the preupg tool. -
Fix found issues
Resolve the issues found by the Preupgrade Assistant during the assessment. There is a Solution text for each issue in the report, which should help you resolve the issue. Then, run the assessment again, and if there are no new issues to be resolved, continue with Step 3 to upgrade the system.
Option 2: Run the Preupgrade Assistant to view the report remotely
If you have installed the preupgrade-assistant-ui package, you can interact with the Preupgrade Assistant browser-based interface, which is able to collect the assessment reports from multiple systems and provides convenient filtering of the results. Because the upgrade procedure does not support upgrading the GNOME desktop, this procedure gives you a way to display the Preupgrade Assistant results on a remote GUI desktop.
WARNING: Installing and using the Preupgrade Assistant Web UI changes the content of the system you are upgrading by adding files to the /etc/httpd/conf.d/ directory and running an httpd service on that system to serve the content. You should not use this procedure in an environment if you are concerned about exposing the data about your system to the network, or if you want to avoid adding content to the system you are upgrading. A safer way to view the Preupgrade Assistant assessment output graphically is to copy the result.html file to a remote system and open it in a Web browser there.
Do the following procedure if you want to use the Preupgrade Assistant Web UI to access the assessment results from a browser over the network:
-
Install the httpd package
If it is not already installed on the RHEL 6 system you are upgrading, type:# yum -y install httpd preupgrade-assistant-ui
-
Configure the conf.d file
By default, the Preupgrade Assistant Web UI is only available to the local system (127.0.0.1). To make it available to all network interfaces on the local system (TCP port 8099, by default), type:# cd /etc/httpd/conf.d # cp 99-preup-httpd.conf.public 99-preup-httpd.conf
-
Edit the new .conf file
The 99-preup-httpd.conf file, which you created in the previous step, will make the Preupgrade Assistant UI available through an IP address on the host. If you want to access this service using a hostname instead of an IP address, you can also change the "NameVirtualHost" line in this file. For example, the lineNameVirtualHost preupg-ui.example.com:8099
could be used to access the service if you had a DNS CNAME record pointing the name preupg-ui.example.com to the system you are upgrading. -
Open the firewall and SELinux
If you have a firewall running and SELinux in enforcing mode, you can use the following commands to allow access to the port needed by the Preupgrade Assistant Web UI service:# setsebool httpd_run_preupgrade on # iptables -I INPUT -m state --state NEW -p tcp --dport 8099 -j ACCEPT
-
Restart the httpd service to load the new configuration
# service httpd restart
-
Access the Preupgrade Assistant Web UI from a Web browser
From a Web browser on another system, access the Preupgrade Assistant Web UI service by using either an IP address (for example http://192.168.99.1:8099) or a hostname (for example http://preupg-ui.example.com:8099). -
Add Web UI authentication information
The first time you access the Preupgrade Assistant Web UI, you are offered to add a user account, which can be used to gain access to the service, or disable the authentication feature.- With authentication
Use either the existing user account or create a new one. If you select "Submit" to create a new user, it will automatically enable the authentication system if it has been disabled. Later, if you would like to edit users, navigate to the User Management tab in the UI. - No authentication
If you do not want to authenticate, click on "Disable Authentication" and you can start using the graphical Interface.
- With authentication
-
Run the
preupg
command
Return back to the system you plan to upgrade. To perform the system assessment with an automatic submission of the result to the Preupgrade Assistant Web UI server, type:# preupg -u http://localhost:8099/submit/ The Preupgrade Assistant is a diagnostics tool and does not perform the actual upgrade. Do you want to continue? [Y/n] y Gathering logs used by the Preupgrade Assistant: All installed packages : 01/10 ...finished ... ... Report submitted successfully. You can inspect it at http://localhost:8099/1/detail/
-
View the assessment report from the Web UI
Return to your Web browser on the remote system and access the Web UI again or just reload the page. An example of the Preupgrade Assistant Web UI: -
Fix the reported issues
In the Web UI, find and expand the correct assessment report. Go through each item in the report and perform changes necessary to fix the reported issues. Then runpreupg
to assess the system again, upload the report to the Web UI, and if there are no new issues to resolve, proceed to Step 3.
Step 3: Perform the upgrade
With the Preupgrade Assistant assessment completed and all issues addressed, the next step is to use the Red Hat Upgrade Tool to perform the actual system upgrade.
IMPORTANT: Running the Red Hat Upgrade Tool requires you to run the Preupgrade Assistant tool as a prerequisite. If you try to run the Red Hat Upgrade Tool on your system without running the Preupgrade Assistant first, it will exit with the following error: preupgrade-assistant has not been run
. This error is possible to be overridden by the --force
option, but in that case the upgraded system will not be supported.
-
Back up the system
Before performing the upgrade by using the Red Hat Upgrade Tool on a system that is in any way important to you, make sure you back up all of your data in order to avoid potential data loss. -
Test first
Do not attempt to perform an upgrade of a production system. Clone your system first and test the upgrade procedure in a safe environment. -
Convert to Subscription Management
Red Hat Enterprise Linux 7 requires Red Hat Subscription Management (RHSM) tools, rather than RHN Classic tools. If your Red Hat Enterprise Linux 6 system is currently registered using RHN Classic tools, you can unregister it (see How do I delete System Profiles in RHN Classic?), and then register it by using thesubscription-manager
command. See Get Started with Red Hat Subscription Management for more information. You can also use an automated method of migrating from RHN to RHSM. -
Apply solutions for known issues
If the system has multiple network interfaces:-
if the system has static routes configured, apply the solution described in redhat-upgrade-tool fails to reconfigure the static routes on the network interfaces, preventing the upgrade to happen.
-
otherwise if the system runs
NetworkManager
, apply the solution described in redhat-upgrade-tool fails to reconfigure the network interfaces, preventing the upgrade to happen.
-
-
Run
redhat-upgrade-tool
to download the packages needed to upgrade to Red Hat Enterprise Linux 7 and prepare the package installation. You have several options to indicate the location of the Red Hat Enterprise Linux 7 packages:a. Installation repository
To indicate the location of a repository that holds Red Hat Enterprise Linux 7 packages, use the--instrepo
option. You need to create such a repository by yourself, as Red Hat does not provide that. In this example, we use an FTP server, on which the contents of the RHEL 7.9 DVD is copied to a rhel79/ directory. You can also use an HTTP or HTTPS site that contains the RHEL 7.9 packages.# redhat-upgrade-tool --network 7.9 --instrepo <ftp-or-http-url>
Example:
# redhat-upgrade-tool --network 7.9 --instrepo ftp://ftp.example.com/pub/rhel79/
If an invalid Red Hat Enterprise Linux 7 minor version is specified, upgrade will fail after attempting to contact non-existing repositories.
b. Mounted installation media
To upgrade the system through installation media mounted on your system, for example from a DVD or USB drive available from the /dev/sdb device, run the following command as root:# redhat-upgrade-tool --device /dev/sdb
If this option is specified without a device, the tool scans all currently mounted removable devices.
c. ISO image
To upgrade the system using an ISO image, provide the path to the ISO image after the--iso
option. For example, if the RHEL 7.9 installation DVD was located at /var/isos/rhel7dvd.iso on the local system, the command would look as follows:# redhat-upgrade-tool --iso /var/isos/rhel7dvd.iso
In any of the options a, b, or c, you can configure additional repositories: either your own custom repositories or additional repositories provided by Red Hat. For example, certain packages available in the RHEL 6 Base system are provided in the RHEL 7 Extras repository and are not on a RHEL 7 DVD.
If you know that your system requires packages that are not in the RHEL 7 Base repository, you can install a separate RHEL 7 system to act as a yum repository that provides the required packages over FTP or HTTP.
To set up a repository that you can use during the upgrade, follow instructions in How to create a local repository for updates. Then, use the
--addrepo=REPOID=URL
option with theredhat-upgrade-tool
command.NOTE: You can automatically remove remaining Red Hat-signed RHEL 6 packages, which do not have a RHEL 7 replacement, by using the
--cleanup-post
option. Such packages are not handled by default by the Red Hat Upgrade Tool. If you do not use the--cleanup-post
option, you have to remove all remaining RHEL 6 packages after the in-place upgrade to ensure that your upgraded system is fully supported. For more information, see Can I install packages from different versions of RHEL?. -
Reboot
To complete the installation, you need to reboot the system. After rebooting, depending on how many packages are being upgraded, it could take some time to complete. If everything goes as expected, the system will reboot to Red Hat Enterprise Linux 7, and you can begin checking that the system works properly. -
Perform post-upgrade tasks
The scripts that have been created by the Preupgrade Assistant for theFIXED
items will run automatically after the upgrade. Any other post-upgrade tasks that the administrator should run manually are identified in the Preupgrade Assistant report. -
Verify the system version
To make sure that the system was upgraded to a RHEL 7 system, type:# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.9 (Maipo)
-
Check the proper subscription
If your system had been properly registered and subscribed for RHEL 6, the upgrade process should have automatically resubscribed it for RHEL 7. To verify the system is properly subscribed, type:# yum repolist Loaded plugins: product-id, subscription-manager repo id repo name status rhel-7-server-rpms/7Server/x86_64 Red Hat Enterprise Linux 7 Server (RPMs) 23,676
If the repository list determined above does not contain RHEL 7 repositories, unsubscribe the system, resubscribe it as a RHEL 7 system, and add the repositories you need.
# subscription-manager remove --all # subscription-manager unregister # subscription-manager register # subscription-manager attach --pool=poolID # subscription-manager repos --enable=repoID
-
Upgrade GRUB Legacy to GRUB 2 (x86_64 architecture only)
Red Hat Enterprise Linux 7 does not include GRUB Legacy any more. Instead, it includes GRUB 2 only. However, because the configuration has been completely overhauled, the upgrade tooling is not capable of upgrading the GRUB Legacy configuration to GRUB 2 automatically.
Since GRUB Legacy is not a supported solution on Red Hat Enterprise Linux 7, you need to upgrade it to GRUB 2 manually. You can find the procedure for upgrading GRUB Legacy to GRUB 2 in the System Administrators Guide. -
Run
yum update
If the upgrade appears to be successful, upgrade all your new RHEL 7 packages to their latest version.# yum update -y # reboot
Step 4: Precautions post-upgrade.
Once the system is upgraded to RHEL 7, consider taking the following precautions.
What precautions should be taken post-RHEL 6 to RHEL 7 upgrade using redhat-upgrade-tool?
Step 5: Provide feedback
Provide feedback to Red Hat that is related to any problems you encounter during the upgrade process. We would appreciate you entering bug reports or opening support cases, so that we can address any problems you might encounter.
Feel free to submit a debug log, which is located on the upgraded system in the /var/log/upgrade.log file.
General Updates
- A new rollback capability for in-place upgrades has been added. Please see the RHEL 6.10 Release Notes or the Red Hat Upgrade Tool - rollbacks and cleanup after upgrading RHEL 6 to RHEL 7 KBase.
- It is now possible to write custom modules for the Preupgrade Assistant. For instructions, see How to create custom Preupgrade Assistant modules for upgrading from RHEL 6 to RHEL 7.
Known Issues
- In-place upgrade from a RHEL 6 system to RHEL 7 is impossible with FIPS mode enabled
- In-place upgrade on IBM Z fails and causes a data loss if the LDL format is used
- The Preupgrade Assistant reports
notchecked
if certain packages are missing on the system - redhat-upgrade-tool fails to reconfigure the network interfaces, preventing the upgrade to happen
- The upgrade to RHEL 7 removes NetworkManager from the system. As a consequence, the network connection can fail after the upgrade. To work around this problem, manually install the NetworkManager package and configure the network.