Red Hat Enterprise Linux 7: Upgrading From RHEL 6 To RHEL 7
Red Hat Enterprise Linux 7: Upgrading From RHEL 6 To RHEL 7
Red Hat Enterprise Linux 7: Upgrading From RHEL 6 To RHEL 7
Instructions for an in-place upgrade from Red Hat Enterprise Linux 6 to Red Hat
Enterprise Linux 7
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is
available at
http://creativecommons.org/licenses/by-sa/3.0/
. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must
provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert,
Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift,
Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States
and other countries.
Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.
XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States
and/or other countries.
MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and
other countries.
Node.js ® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the
official Joyent Node.js open source or commercial project.
The OpenStack ® Word Mark and OpenStack logo are either registered trademarks/service marks
or trademarks/service marks of the OpenStack Foundation, in the United States and other
countries and are used with the OpenStack Foundation's permission. We are not affiliated with,
endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
Abstract
This document provides instructions on how to perform an in-place upgrade from Red Hat
Enterprise Linux (RHEL) 6 to RHEL 7. During the in-place upgrade, the existing RHEL 6 operating
system is replaced by the RHEL 7 version.
Table of Contents
Table of Contents
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3. . . . . . . . . . . . .
PREFACE
. . . . . . . . . . . . . FEEDBACK
PROVIDING . . . . . . . . . . . . ON
. . . .RED
. . . . .HAT
. . . . .DOCUMENTATION
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. . . . . . . . . . . . .
. . . . . . . . . . . 1.. .PLANNING
CHAPTER . . . . . . . . . . . .AN
. . . UPGRADE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5. . . . . . . . . . . . .
. . . . . . . . . . . 2.
CHAPTER . . PREPARING
.............A
. . RHEL
. . . . . . .6. SYSTEM
. . . . . . . . . .FOR
. . . . .THE
. . . . .UPGRADE
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7. . . . . . . . . . . . .
.CHAPTER
. . . . . . . . . . 3.
. . ASSESSING
. . . . . . . . . . . . . UPGRADE
. . . . . . . . . . . SUITABILITY
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9. . . . . . . . . . . . .
3.1. ASSESSING UPGRADE SUITABILITY FROM THE COMMAND LINE 9
3.2. ASSESSING UPGRADE SUITABILITY FROM A WEB UI 10
3.3. PRE-UPGRADE ASSESSMENT RESULT CODES 12
. . . . . . . . . . . 4.
CHAPTER . . .UPGRADING
. . . . . . . . . . . . . YOUR
. . . . . . .SYSTEM
. . . . . . . . . FROM
. . . . . . .RHEL
. . . . . .6
. .TO
. . . .RHEL
. . . . . .7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
..............
.CHAPTER
. . . . . . . . . . 5.
. . TROUBLESHOOTING
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
..............
5.1. TROUBLESHOOTING RESOURCES 18
5.2. FIXING DEPENDENCY ERRORS 18
5.3. INSTALLING MISSING PACKAGES 18
5.4. KNOWN ISSUES 19
5.5. ROLLING BACK THE UPGRADE 19
5.6. OBTAINING SUPPORT 20
. . . . . . . . . . . 6.
CHAPTER . . .ADDITIONAL
. . . . . . . . . . . . . RESOURCES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
..............
1
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
2
PREFACE
PREFACE
This document describes steps for an in-place upgrade from RHEL 6 to RHEL 7. The supported in-place
upgrade path is from RHEL 6.10 to RHEL 7.9.
If you are using SAP HANA, follow How do I upgrade from RHEL 6 to RHEL 7 with SAP HANA instead.
Note that the upgrade path for RHEL with SAP HANA might differ.
The process of upgrading from the latest version of RHEL 6 to the latest version of RHEL 7 consists of
the following steps:
1. Check that Red Hat supports the upgrade of your system. See Chapter 1, Planning an upgrade
for more information.
2. Prepare your system for the upgrade by installing required repositories and packages and by
removing unsupported packages. See Chapter 2, Preparing a RHEL 6 system for the upgrade
got more information.
3. Check your system for problems that might affect your upgrade using the Preupgrade
Assistant. See Chapter 3, Assessing upgrade suitability for more information.
4. Upgrade your system by running the Red Hat Upgrade Tool. See Chapter 4, Upgrading your
system from RHEL 6 to RHEL 7 for more information.
3
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
3. Fill in the Description field with your suggestion for improvement. Include a link to the relevant
part(s) of documentation.
4
CHAPTER 1. PLANNING AN UPGRADE
To ensure that you are aware of all major changes between RHEL 6 and RHEL 7, consult the Migration
Planning Guide before beginning the in-place upgrade process. You can also verify whether your system
is supported for an in-place upgrade by running the Preupgrade Assistant. The Preupgrade Assistant
assesses your system for potential problems that could interfere or inhibit the upgrade before any
changes are made to your system. See also Known Issues.
NOTE
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 by using the Red Hat
Upgrade Tool integrated rollback capability or by using suitable custom backup and
recovery solution, for example, by using the Relax-and-Recover (ReaR) utility. For more
information, see Rolling back the upgrade.
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: Your system must have the latest RHEL 6.10 packages installed.
Architecture and variant: Only the indicated combinations of architecture and variant from the
following matrix are supported:
Product Variant Intel 64-bit IBM POWER, big IBM Z Intel 32-bit
architecture endian architecture
NOTE
5
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
NOTE
Upgrades of IBM Z systems are supported unless Direct Access Storage Device
(DASD) with Linux Disk Layout (LDL) is used.
Supported groups of packages: Only packages from the following groups can be installed on the
system before an in-place upgrade:
Minimal (@minimal)
Base (@base)
DHCP Server
NOTE
Although upgrades of other packages and groups are not supported, certain
packages can be uninstalled from the RHEL 6 system and reinstalled on the
upgraded RHEL 7 system.
File systems: The file system type from the RHEL 6 system is preserved during an in-place
upgrade and cannot be changed.
Desktop: System upgrades with GNOME and KDE installs are unsupported.
Virtualization: Upgrades with KVM or VMware virtualization are supported. Upgrades of RHEL
on Microsoft Hyper-V are unsupported.
High Availability: Upgrades of systems using the High Availability add-on are unsupported.
Public Clouds: The in-place upgrade is unsupported for on-demand instances on Public Clouds.
The /usr directory: The in-place upgrade is unsupported on systems where the /usr directory is
on a separate partition. For more information, see Why does Red Hat Enterprise Linux 6 to 7 in-
place upgrade fail if /usr is on separate partition?.
6
CHAPTER 2. PREPARING A RHEL 6 SYSTEM FOR THE UPGRADE
Prerequisites
You have verified that your system setup is supported for an upgrade from RHEL 6 to RHEL 7.
See Planning an upgrade for more information.
Procedure
1. Ensure that your system is registered to Red Hat Subscription Management (RHSM) .
If your RHEL 6 system is registered to Red Hat Network (RHN), you must migrate to RHSM. See
Migrating from RHN to RHSM in Red Hat Enterprise Linux for details.
2. Ensure that you have access to the latest RHEL 6 content. If you use the yum-plugin-
versionlock plug-in to lock packages to a specific version, clear the lock:
See How to restrict yum to install or upgrade a package to a fixed specific package version? for
more information.
3. Enable the Extras repository, which contains necessary packages for a pre-upgrade assessment
and an in-place upgrade.
a. For the Server variant on the 64-bit Intel architecture on server edition:
d. For the HPC Compute Node variant on the 64-bit Intel architecture:
7
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
6. Check Known Issues and apply workarounds where applicable. Especially, on systems with
multiple network interfaces:
a. If the system has static routes configured, replace the static route file. See redhat-
upgrade-tool fails to reconfigure the static routes on the network interfaces, preventing the
upgrade to happen for more information.
b. If the system runs NetworkManager, stop NetworkManager prior to running the upgrade
tool. See redhat-upgrade-tool fails to reconfigure the network interfaces, preventing the
upgrade to happen for more information.
# yum update
# reboot
9. Back up all your data before performing the upgrade to prevent potential data loss.
Verification steps
1. Verify that you are registered with the Red Hat Subscription Manager:
# yum update
# yum grouplist
8
CHAPTER 3. ASSESSING UPGRADE SUITABILITY
Leaves your system unchanged except for storing information or logs. It does not modify the
assessed system.
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 post-upgrade scripts to address more complex problems after the in-place upgrade.
You should run the Preupgrade Assistant multiple times. Always run the Preupgrade Assistant after you
resolve problems identified by the pre-upgrade report to ensure that no critical problems remain before
performing the upgrade.
You can review the system assessment results using one of the following methods:
Remotely over the network using the web user interface (UI). You can use the web UI to view
multiple reports at once.
IMPORTANT
The Preupgrade Assistant is a modular system. You can create your own custom modules
to assess the possibility of performing an in-place upgrade. For more information, see
How to create custom Preupgrade Assistant modules for upgrading from RHEL 6 to
RHEL 7.
When the preupg command is run without further options, it produces the result.html and
preupg_results-*.tar.gz files in the /root/preupgrade/ directory.
Prerequisites
You have completed the preparation steps described in Preparing a RHEL 6 system for the
upgrade.
Procedure
9
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
# preupg
a. Inspect result codes on the standard output For more information on assessment codes,
see the Assessment result codes table .
b. View the assessment report in greater detail by opening the HTML file with results in a web
browser:
# web_browser file:///root/preupgrade/result.html
3. View the README file in the /root/preupgrade/ directory for more information about the
output directory structure, exit codes, and risk explanations associated with the Preupgrade
Assistant utility.
4. Resolve problems found by the Preupgrade Assistant during the assessment by following the
Remediation text in the report.
IMPORTANT
The assessment report might require you to perform certain tasks after you have
completed the in-place upgrade to RHEL 7. Take note of these post-upgrade
tasks and perform them after the upgrade.
5. Run the Preupgrade Assistant again. If there are no new problems to be resolved, you can
proceed with upgrading your system.
IMPORTANT
To use the Preupgrade Assistant web UI remotely, you must install and configure the
Apache HTTP Server, add files to the /etc/httpd/conf.d/ directory and run the httpd
service on the system to serve the content.
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, you can review the pre-
upgrade assessment results using the following alternative methods:
10
CHAPTER 3. ASSESSING UPGRADE SUITABILITY
Prerequisites
You have completed the preparation steps described in Preparing a RHEL 6 system for the
upgrade.
Procedure
1. Install the Apache HTTP Server and the Preupgrade Assistant web UI:
2. To make the Preupgrade Assistant web UI available to all network interfaces on the local system
through TCP port 8099 by default, change the default private httpd pre-upgrade configuration
to the public configuration:
# cp /etc/httpd/conf.d/99-preup-httpd.conf.public /etc/httpd/conf.d/99-preup-httpd.conf
3. Optional: To access the Preupgrade Assistant using a host name instead of an IP address, for
example, preupg-ui.example.com:
Ensure you have a DNS CNAME record pointing the preupg-ui.example.com name to the
system you are upgrading.
4. If you have a firewall running and SELinux in enforcing mode, 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
6. 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.122.159:8099) or a hostname (for
example, http://preupg-ui.example.com:8099).
7. When accessing the Preupgrade Assistant web UI for the first time, decide whether to access
the UI with or without authentication.
a. To access the UI with authentication, log in as an existing user or create a new one. When
you select Submit to create a new user, the authentication system is automatically enabled.
8. Return to the system you plan to upgrade and run the Preupgrade Assistant in the command
line with an automatic submission to the Preupgrade Assistant web UI server:
# preupg -u http://hostname:port/submit/
For example:
11
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
# preupg -u http://preupg-ui.example.com:8099/submit/
9. Return to your web browser on the remote server and reload the Preupgrade Assistant Web UI.
10. In the web UI, find and expand the assessment report that you generated by running the
Preupgrade Assistant. Go through each item in the report and resolve the reported problems.
For information on assessment result codes, see the Assessment result codes table .
IMPORTANT
The assessment report might require you to perform certain tasks after you have
completed the in-place upgrade to RHEL 7. Take note of these post-upgrade
tasks and perform them after the upgrade.
11. Run the Preupgrade Assistant again and upload the report to the web UI. If there are no new
problems to be resolved, you can proceed with the upgrade.
12
CHAPTER 3. ASSESSING UPGRADE SUITABILITY
13
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
IMPORTANT
Test the upgrade process on a safe, non-production system before you perform it on any
production system.
Prerequisites
You have completed the preparation steps described in Preparing a RHEL 6 system for the
upgrade, including a full system backup.
You have performed the pre-upgrade system assessment and resolved all reported problems.
For details, see Assessing system upgrade suitability .
Procedure
1. Prepare source repositories or media with RHEL 7 packages in one of the following locations:
An installation repository created from a binary DVD ISO where you download RHEL 7
packages, for example, an FTP server or an HTTPS site that contains the RHEL 7.9
packages. For more information, see Preparing installation sources.
An ISO image
In any of the above options, you can configure custom repositories and 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 an additional 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 the redhat-upgrade-tool command.
2. Disable active repositories to prevent problems with combining packages from different major
releases of RHEL.
# yum-config-manager --disable \*
14
CHAPTER 4. UPGRADING YOUR SYSTEM FROM RHEL 6 TO RHEL 7
For more information, see Can I install packages from different versions of RHEL .
3. Run the Red Hat Upgrade Tool to download RHEL 7 packages and prepare the package
installation. Specify the location of the Red Hat Enterprise Linux 7 packages:
Installation repository
If you do not specify the device path, the Red Hat Upgrade Tool scans all mounted
removable devices.
ISO image
IMPORTANT
You can use the following options with the redhat-upgrade-tool command
for all three locations:
# reboot
Depending on the number of packages being upgraded, this process can take up to several
hours to complete.
5. Manually perform any post-upgrade tasks described in the pre-upgrade assessment result.
6. If your system architecture is 64-bit Intel, upgrade from GRUB Legacy to GRUB 2. See the
System Administrators Guide for more information.
7. If Samba is installed on the upgraded host, manually run the testparm utility to verify the
/etc/samba/smb.conf file. If the utility reports any configuration errors, you must fix them
before you can start Samba.
15
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
8. Optional: If you did not use the --cleanup-post option when running the Red Hat Upgrade Tool,
clean up orphaned RHEL 6 packages:
WARNING
WARNING
# yum update
# reboot
Verification steps
1. Verify that the system was upgraded to the latest version of RHEL 7.
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
# 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 does not contain RHEL repositories, run the following commands to
unsubscribe the system, resubscribe the system as a RHEL 7 system, and add required
repositories:
16
CHAPTER 4. UPGRADING YOUR SYSTEM FROM RHEL 6 TO RHEL 7
If any problems occur during or after the in-place upgrade, see Troubleshooting for assistance.
17
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
CHAPTER 5. TROUBLESHOOTING
Troubleshoot and solve package-related issues after the in-place upgrade from RHEL 6.10 to RHEL 7.9.
Console Output
By default, only error and critical log level messages are printed to the console output by the Pre-
upgrade Assistant. To also print debug, info, and warning messages, use the --debug option with the
redhat-upgrade-tool command.
Logs
The /var/log/upgrade.log file lists issues found during the upgrade phase.
Reports
The /root/preupgrade/result.html file lists issues found during the pre-upgrade phase. This report is
also available in the web console. For more information, see Assessing upgrade suitability from a web UI .
Procedure
2. To fix dependency errors, reinstall the affected packages. During this operation, the yum utility
automatically installs missing dependencies. If the required dependencies are not provided by
repositories available on the system, install those packages manually.
You did not provide a repository to the Red Hat Upgrade Tool that contained these packages.
Install missing packages manually.
Certain problems are preventing some RPMs from being installed. Resolve these problems
before installing missing packages.
You are missing NetworkManager because the service was not configured and running before
the upgrade. Install and configure NetworkManager manually. For more information, see
Getting started with NetworkManager.
Procedure
18
CHAPTER 5. TROUBLESHOOTING
Procedure
1. Review which packages are missing from your RHEL 7 system using one of the following
methods:
Run the following command to generate a list of expected packages in RHEL 7 and
compare with the packages that are currently installed to determine which packages are
missing.
Locate and install all missing packages at once. This is the quickest method of getting all
missing packages.
# cd /root/preupgrade
# bash noauto_postupgrade.d/install_rpmlist.sh kickstart/RHRHEL7rpmlist_kept
If you know that you want to install only some of the missing packages, install each package
individually.
NOTE
For further details about other files with lists of packages you should install on the
upgraded system, see the /root/preupgrade/kickstart/README file and the pre-
upgrade report.
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 static routes on the network interfaces, preventing
the upgrade to happen
Inplace upgrade fails to boot the server while upgrading from Red Hat Enterprise Linux 6 to 7
(UEFI)
Why does Red Hat Enterprise Linux 6 to 7 in-place upgrade fail if /usr is on separate partition?
19
Red Hat Enterprise Linux 7 Upgrading from RHEL 6 to RHEL 7
If the in-place upgrade to RHEL 7 is unsuccessful, it is possible to get the previous RHEL 6 working
system back in limited configurations using one of the following methods:
The rollback capability integrated in the Red Hat Upgrade Tool. For more information, see
Rollbacks and cleanup after upgrading RHEL 6 to RHEL 7 .
A custom backup and recovery solution, for example, 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?.
Open a support case, select RHEL 7 as the product, and provide an sosreport from your
system.
# sosreport
For details on generating a sosreport, see the solution What is an sosreport and how to create one in
Red Hat Enterprise Linux?.
For more information on opening and managing a support case on the Customer Portal, see the article
How do I open and manage a support case on the Customer Portal? .
20
CHAPTER 6. ADDITIONAL RESOURCES
How to create custom Preupgrade Assistant modules for upgrading from RHEL 6 to RHEL 7
Red Hat Upgrade Tool - rollbacks and cleanup after upgrading RHEL 6 to RHEL 7
21