Upgrading headless hetzner server from CentOS 6.5 to CentOS 7: Success

By | July 11, 2014

I had a server recently installed with CentOS 6.5 (not yet in production), and some VMs inside of it (CentOS 6.5 also) and I thought that before moving services onto them it would be a good idea to actually upgrade them to CentOS 7, seeing as if this time the powers that be gave us 007 pretty fast (unlike the last time, grumble).

Oh, and thumbs up to hetzner.de.

RedHat official upgrade path is, ofc, not (yet?) supported – but I found some info, and it worked.

This worked for me, but YMMV;
You will probably need to hunt for newer versions of the packages.

I first removed my x86 packages (if any)

rpm -qa|grep -v x86_64|grep -v noarch|grep -v gpg-pubkey

Then started cooking

mkdir /tmp/upgrade; cd /tmp/upgrade

wget http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-1.0.2-33.el6.x86_64.rpm http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-contents-0.5.13-1.el6.noarch.rpm http://dev.centos.org/centos/6/upg/x86_64/Packages/preupgrade-assistant-ui-1.0.2-33.el6.x86_64.rpm http://dev.centos.org/centos/6/upg/x86_64/Packages/python-rhsm-1.9.7-1.el6.x86_64.rpm http://dev.centos.org/centos/6/upg/x86_64/Packages/redhat-upgrade-tool-0.7.22-1.el6.noarch.rpm

yum localinstall preupgrade-assistant-*

# note - I'm not sure this is actually needed, on my system it didn't really do much. redhat-upgrade-tool complained about preupg not being run before...

yum localinstall redhat-upgrade-tool-0.7.22-1.el6.noarch.rpm python-rhsm-1.9.7-1.el6.x86_64.rpm

# downloaded an ISO before
redhat-upgrade-tool --iso=/root/CentOS-7.0-1406-x86_64-DVD.iso --force

# removed because of failure reports
rm /var/lib/rpm/__*


After reboot grub booted a new upgrade image, which took a few minutes installing everything, then restarted itself info CentOS 7. No user input was needed.

Caution: backup, etc. I would not attempt this on a production headless server…

PS: on the host, I had a few more broken packages, etc, _and_ missing libraries problem with libvirtd

# ldd /usr/libexec/qemu-kvm | grep "not found"
    libsasl2.so.2 => not found

temp workaround

# ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2
# systemctl restart libvirtd

One thought on “Upgrading headless hetzner server from CentOS 6.5 to CentOS 7: Success

  1. Daniel Davis

    This has worked for me with small modifications:

    1. Bring down all rpms from dev.centos because some have changed:

    cd /tmp/upgrade
    wget -r -nd http://dev.centos.org/centos/6/upg/x86_64/Packages/
    ls -1 | grep -v \.rpm | xargs rm -f

    2. Install lynx before running preupg:

    yum -y install lynx

    3. After running preupg, look at the preupgrade results prior to reboot:

    lynx /root/preupgrade/result.html

    # This will contain details of what you installed by hand as root for ruby, python, and perl.

    4. I also removed all non CentOS signed packages first, because it seemed easier to audit them and then re-install them

    yum list installed > installed-packages

    # Use sed and grep to get only those from other repositories, and remove them in bunches – you have the list after all for
    # afterwards


Leave a Reply

Your email address will not be published. Required fields are marked *