Author Archives: tudor

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

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-*

preupg
# 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/__*

reboot

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