In place upgrade of centos 6 to centos 7

Source: Internet
Author: User
Tags gpg

Note: This is not the most highly recommended method to move from centos 6 to centos 7... but it can be med, at your own risk, if the tool says the risk is slight or none. we wowould never recommend using this method with any medium, high or extreme issues present.

 

Centos upgrade Tool

 

1. Location of the Tool

The tool is currently available from the testing Repository:

Http://dev.centos.org/centos/6/upg/x86_64/Packages/

 

1.1. How to currently obtain the tool

Create a repo file in/Etc/yum. Repos. d/, Named something likeUpgradetool. Repo

Add the following lines to the repo file:

[upg]name=CentOS-$releasever - Upgrade Toolbaseurl=http://dev.centos.org/centos/6/upg/x86_64/gpgcheck=1enabled=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

This command will be then get the RPMs installed to run an upgrade:

yum install redhat-upgrade-tool preupgrade-assistant-contents

 

Once we do some more testing and move this to the extras repository, then you will only need to do the yum install command and not create a repo file. these instructions will be changed when the release happens and the tool is no longer in testing.

 

2. preupgrade assistant Purpose

Preupgrade assistant performs an assessment of the system from the "upgradeability" point of view. such analysis into des checking for removed packages, packages replaced by partially incompatible packages, changes in libraries, users and groups and various services. A report of this analysis can help the Administrator with the in-place upgrade-by identifying potential troubles and by mitigating some of the incompatibilities. data gathered by the preupgrade assistant can be used for the "Cloning" of the system-a new, clean installation of the system, as close as possible to the old centos setup. in addition, it provides some postupgrade scripts which are supposed to finish the migration after the installation of the CentOS-7 system.

As the preupgrade assistant doesn't directly modify the assessed System (stored t storing information/logs), it is safe to use it on any configuration. as the contents are not yet complete, successful preupgrade assistant analysis doesn' t necessarily mean that the in-place upgrade via centos-upgrade-tool will succeed.

 

3. preupgrade assistant usage

At the moment, only a CLI interface and limited functionality is available.

Usage is simple. Just follow these steps:

  1. Run "preupg-L" command-it lists all available contents for preupgrade-Assistant (as the system is based on a plugin, there may be modules from different sources in the future ). if nothing is shown, install the preupgrade-assistant-contents package.
  2. If you have centos6_7 content available, Run "preupg-s centos6_7"
  3. Wait until the analysis finishes (it can take several minutes)
  4. Review the report stored as/root/preupgrade/result.html (and possibly files stored at/root/preupgrade). Especially check for inplace upgrade risks (described further in this document)

 

4./root/preupgrade file and directory structure

This directory contains the data from the last preupgrade assistant run.

Files:

  • Result.html-file with a final Migration Assessment Report in human readable form (we are sorry for "listing" functionality only)
  • Result. XML-file with a final Migration Assessment Report in machine readable form
  • Readme-this file
  • Results.tar.gz-tar ball with all files in directory/root/preupgrade

Directories:

  • Cleanconf-directory with all user-modified configuration files, which were checked for their compatibility by the preupgrade-assistant. these files can be safely used on a CentOS-7 System (some of these files may need postupgrade. d scripts execution)
  • Dirtyconf-directory with all user-modified configuration files, which were not checked for their compatibility by the preupgrade-assistant. These may require admin review after the CentOS-7 installation/upgrade.
  • Kickstart-directory which contains various files useful for generating a kickstart file for cloning this system. some of the files in this directory may give administrators the necesarry guidance in what was not handled by the centos-upgrade-tool (and will need some additional actions ). see the README file in the Kickstart directory for the file descriptions.
  • Postupgrade. D-contains various scripts which are supposed to be executed after the upgrade to CentOS-7. These scripts shocould never be used on a CentOS-6 system.
  • Centos6_7-Just "debugging" directory-will be removed later. Ignore, unless you'll see some "error" plugin exit status.

 

5. An explanation of possible check exit Codes

Every single plugin has its own exit code. administrators need to check at least those with fail results before doing the inplace upgrade. results marked fixed shocould be checked after the inplace upgrade-to finish the CentOS-7 migration properly.

The possible exit codes are:

  • Pass = everything is fine, no incompatibility/issue detected by this checker
  • Fail = some incompatibility/issue that needs to be reviewed by the admin was detected. Fail doesn't necessarily mean that the inplace upgrade will fail, but may result in a not 100% functional system
  • Fixed = some incompatibility was detected, but the preupgrade-assistant was able to find an automatic solution. some of the fixes may require running postupgrade. d scripts after the upgrade. fixed configs are available in/root/preupgrade/cleanconf directory. preupgrade-assistant doesn' t handle the fixes automatically at the moment!
  • Informational = nice to have information for admins (e.g. removed options in some common tools which may cause malfunctions of their scripts)
  • Not_applicable = package which shoshould be tested but the check is not installed on the system (test therefore doesn't make sense)
  • Error = shouldn't occur, does usually mean error in the preupgrade-Assistant Framework. All such errors shocould be reported to the Red Hat preupgrade-assistant team.

 

6. In place upgrade risk explanations

There are several levels of inplace upgrade risks. any level higher than "slight" means you will get not a 100% functional upgraded system, although the inplace upgrade tool "centos-upgrade-tool" may pass.

The available risk assessment levels are:

  • None-default. It can be used as an indicator for some checks. It is not necessary to enter these values.
  • Slight-We assessed this field and have not found any issues. However, there is still some risk that not all variants have been covered.
  • Medium-it is likely that the area causes a problem in case of the inplace upgrade. it needs to be checked by the Administrator after the inplace upgrade and after the system has been monitored for some time.
  • High-The inplace upgrade can't be used safely without the Administrator's maintenance ance. this typically involves some known broken scenarios or existing 3rd party packages. after the Administrator manually fixes the issue, it may be possible to perform the inplace upgrade, but it is not recommended.
  • Extreme-we found an incompatibility which makes the inplace upgrade impossible. It is recommended to install a new system with the help of the preupgrade-assistant remediations.

 

7. How to upgrade after reviewing the results

Once you are ready to upgrade (You have mitigated all issues you care to mitigate, etc.), then run the following command to upgrade:

centos-upgrade-tool-cli --network 7 --instrepo=http://mirror.centos.org/centos/7/os/x86_64/

Then reboot.

See 'man centos-upgrade-tool' for more information on all options available for the tool.

Note: Use of this tool isAt your own riskAnd is not the best method for upgrades. Make sure you have backups before you actually perform an upgrade. If it breaks, you get to keep both halves!

 

8. Known issues when upgrading
  • If you have either the gnome or KDE Desktop installed, upgrade is likely not going to work... at least not completely.

 

example output:INPLACERISK: EXTREME: You have GNOME Desktop Environment session as an option in your X11 session manager. GNOME Desktop Environment as a part of the yum group ‘Desktop‘ underwent serious redesign in its user interface as well as underlying technologies in CentOS-7.
  • Can not upgrade encrypted partitions

 

example output:INPLACERISK: EXTREME: Some partitions are crypted. If it is a system partition then in-place upgrade is not possible.
  • If you have lots of 3rd party repository items (I. e. rpmforge, epel, Nux! Dextop, etc.) upgrades will likely not work cleanly.

As we get more specific examples of issues, we will update this page.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.