Note: This is not the most highly recommended method to move from CentOS 6 to CentOS 7 ... but it can be performed, at your own risk, if the tool says the risk is Slight or None. We would 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 like upgradetool.repo

Add the following lines to the repo file:

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

This command will 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 includes 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 (except 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 should 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 should 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 automated 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 should 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 should 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 assistance. 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 is at your own risk and 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.

In Place Upgrade of CentOS 6 to CentOS 7的更多相关文章

  1. Upgrading CentOS 6 to CentOS 7

    Upgrading CentOS 6 to CentOS 7 November 15th, 2018 — whplus PRE TASKS There are some tasks you can d ...

  2. CentOS / Redhat : Configure CentOS as a Software Router with two interfaces

    CentOS / Redhat : Configure CentOS as a Software Router with two interfaces   Linux can be easily co ...

  3. CentOS查看系统信息-CentOS查看命令

    一:查看cpu more /proc/cpuinfo | grep "model name" grep "model name" /proc/cpuinfo 如 ...

  4. CentOS 七 vs CentOS 6的不同

    CentOS 七 vs CentOS 6的不同   CentOS 7 vs CentOS 6的不同(1)桌面系统[CentOS6] GNOME 2.x[CentOS7] GNOME 3.x(GNOME ...

  5. centos 6 与 centos 7 服务开机启动、关闭设置的方法

    简单说明下 centos 6 与 centos 7 服务开机启动.关闭设置的方法: centos 6 :使用chkconfig命令即可. 我们以apache服务为例: #chkconfig --add ...

  6. CentOS 6和 CentOS 7的区别【转】

    虽然,redhat 8在今年已经推出了,但是centos 8还没有推出.而且公司好多都在用centos 6和7 来了解一下6和7的区别吧 整体说明 1.系统 项目CentOS 6CentOS7 . 安 ...

  7. 1.CentOS 7 vs CentOS 6的不同

    CentOS 7 vs CentOS 6的不同(1)桌面系统[CentOS6] GNOME 2.x[CentOS7] GNOME 3.x(GNOME Shell)   (2)文件系统[CentOS6] ...

  8. CentOS 7 vs. CentOS 8 版本差异大比拼

    CentOS 7 vs. CentOS 8 版本差異大比拼 2020-02-14 CentOS 最近剛好在撰寫課鋼,必須要以最新的 CentOS 8 版本為主,剛好來做一下 CentOS 7 和 Ce ...

  9. CentOS 6 到 CentOS 7

    redhat提供了一个redhat-upgrade-tool的升级工具: [1]配置软件源   # vim /etc/yum.repos.d/upgrade.repo [upgrade] name=u ...

随机推荐

  1. VirtualBox安装Ghost XP

    http://jingyan.baidu.com/album/5d368d1e1a88b73f60c05721.html?picindex=1

  2. php 生成mysql数据字典代码

    由于项目开发用了比较多的表 ,为了快速获取数据字典,通过php代码的方式来获取表结构和表注释.代码如下: <?php /** * 生成mysql数据字典 */ header ( "Co ...

  3. 常用对象API、附加:集合补充

    基本数据类型对象包装类: 为了方便操作基本数据类型值,将其封装成了对象,在对象中定义了属性和行为丰富了该数据的操作. 用于描述该对象的类就称为基本数据类型对象包装类. byte——Byte short ...

  4. ASP.NET- 播放视频代码

    在网上找的,还不错,支持很多格式.只需要在页面放个lable,建一个放视频文件的文件夹movie,加入代码: protected void Page_Load(object sender, Event ...

  5. 如何在ubuntu下使用stage3d的硬件加速

    最近想尝试一下心动的新游戏深渊,但是由于公司的电脑是ubuntu的,只要进游戏就提示说没有stage3d的硬件加速,于是google了一下,发现这么一篇文章 http://phoronix.com/f ...

  6. [Usaco2006 Nov]Corn Fields牧场的安排 壮压DP

    看到第一眼就发觉是壮压DP 然后就三进制枚举子集吧. 这题真是壮压入门好题... 对于dp[i][j] 表示第i行,j状态下前i行的分配方案数. 那么dp[i][j]肯定是从i-1行转过来的 那么由于 ...

  7. keepalive support-----Programming applications

    TCP Keepalive HOWTO Prev   Next 4. Programming applications This section deals with programming code ...

  8. Messages的例子

    13.33 13.36 13.37 Message.h #ifndef MESSAGE_H #define MESSAGE_H #include<iostream> #include< ...

  9. Android(java)学习笔记176:BroadcastReceiver之 短信发送的广播接收者

    有时候,我们需要开发出来一个短信监听器,监听用户发送的短信记录,下面就是一个案例,这里同样需要使用广播机制. 下面同样是代码示例,MainActivity.java 和  activity_main. ...

  10. Property工具类,Properties文件工具类,PropertiesUtils工具类

    Property工具类,Properties文件工具类,PropertiesUtils工具类 >>>>>>>>>>>>>& ...