Upgrading HostSolutions.ro OpenVZ Templates To 16.04 / Jessie or Stretch

I have seen that @cociu has once again posted his usual offers (which are superb value) and once again people are moaning that the templates are old. The templates ARE upgradeable to something more modern, but you need to put more effort into doing it than just typing do-release-upgrade or switching the versions used by APT.

These scripts are the result of a couple of days of work by me. I have lost about $24 creating them through losing the use of virtual machines, because, like others have experienced, if you upgrade the short way you will end up with a machine that won't boot or reinstall, and cociu won't help.

Before I continue:


HOSTSOLUTIONS OFFER NO SUPPORT FOR NEW DISTRIBUTIONS THAN THE TEMPLATES THAT THEIR CONTROL PANEL OFFERS.
THE FACT MY SCRIPT WORKS TODAY IS NO INDICATION IT WILL WORK IN THE FUTURE
I ACCEPT NO RESPONSIBILITY FOR YOUR CHOICE TO USE MY SCRIPTS TO UPGRADE YOUR TEMPLATES TO SOMETHING NEWER. But, they are offered in good faith.
IF YOU MESS UP YOUR SERVER EITHER WHEN RUNNING THE SCRIPT OR LATER ON, COCIU WILL NOT HELP YOU GET YOUR MACHINE BACK ONLINE IN A TIMELY MANNER. YOU MAY AS WELL KISS YOUR VPS GOODBYE UNLESS COCIU WANTS TO FIX IT.


However, if you can't resist the offer of a cheap VPS and can afford the financial and other risks involved with upgrading your server, I make available the following tutorials / scripts that allow you to upgrade the Debian Wheezy x86, x86_64 and Ubuntu 14.04 minimal templates to Jessie, Stretch or 16.04 as appropriate.

I have tested them on two different cociu VPS, and they work. You may see errors as they run, but they get resolved by the end of the script (with regards to init timeouts and missing files, this is because we have to ensure that certain files do not exist before upgrading otherwise the upgrade will fail).

PREREQUISITES


You are on a HostSolutions or other OpenVZ VPS
You have FRESHLY RE-INSTALLED one of the following templates:


debian-7.0-x86-minimal
debian-7.0-x86_64 (the script will turn this into an almost minimal template)
ubuntu-14.04-x86_64-minimal

The host node you are on is running kernel 2.6.32-48-pve (check by entering the command uname-r). If it isn't the tutorial / script may still work but I have not tested it.
You know how to use SSH


SCRIPTS

To make it easy, I offer you these one-line commands to use when upgrading a FRESHLY INSTALLED template. Simply cut and paste them into your SSH terminal.

From Debian Wheezy To Jessie
apt-get update;apt-get install -y wget ca-certificates;wget https://gist.github.com/lowendscripts/a69971a7a44d4919ce93a83254954489/raw/092fac24a33076a0316a819ed89f28a5300d0a7f/wheezy_to_jessie_installer.sh ; bash wheezy_to_jessie_installer.sh

From Debian Wheezy to Stretch
apt-get update;apt-get install -y screen apt-utils ca-certificates;wget https://gist.github.com/lowendscripts/9631c6070b241daefcc7d10a2fdb76a2/raw/947ec986b7750f85b3d81063dd3433119e2b105f/wheezy_to_stretch_installer.sh ; bash wheezy_to_stretch_installer.sh

From Ubuntu 14.04 to 16.04
apt-get update;apt-get install -y ca-certificates;wget https://gist.github.com/lowendscripts/e6e1d980af9e41806296c0dd5536bfaa/raw/73c09577e65a241fc6d23ac91b0c22726f7e5eab/1404_to_1604_installer.sh ; bash 1404_to_1604_installer.sh

TUTORIAL

For brevity, I am only including the Debian Wheezy to Stretch gist here - the others are pretty similar and can be derived from this one script.

I CANT PUT THE TUTORIAL HERE AS I KEEP BEING BLOCKED BY CLOUDFLARE - SEE THE GISTS

Updates:
- Updated Ubuntu 1404 link as it got borked.

Top News