Just got my dedicated box from WholesaleInternet.com – 16 Cores – 24 GB of RAM – 3 TB of Hard Drive space – 1 Gbps of bandwidth!

Why all that power? Simply put, I want to do virtualization and containers via Proxmox.

WholeSaleInternet offers ProxMox 3.1 out the gate – which is a bit outdated. It is running on Debian Wheezy and 4.1 runs on Debian Jessie. I wanted to get the latest and greatest running but it wasn’t a straightforward process…

I tripped up several times trying to get to 4.1 – primarily because I misunderstood something about Proxmox (being a noob…). Proxmox isn’t just an application, it is also a new kernel for the machine based off of some fancy RedHat tech for virtualization. So… you aren’t just upgrading the software but actually the entire box/OS. The other thing that tripped me up is the fact that I am using the free version of ProxMox and not paying for a subscription. This means you have to make changes to the apt repository files because the 3.1 install that comes from WholeSaleInternet uses the enterprise repos by default. All of that is laid out below so hopefully I can save you the hours I wasted tinkering. Read carefully and pay close attention. I based this on the documentation direct from ProxMox and a lot of different scattered forum posts as I screwed up a few odd things here and there the first two attempts and had to start over with a fresh server image. Disclaimer – I am working on a FRESH server, I had no VM’s or containers to worry about backing up first or upgrading and I am not responsible for data lost or “screwage-upage” of your server should something go awry.

So a couple of things need to happen.
1. Update Proxmox from 3.1 – 3.4
1. Update OS from Debian Wheezy to Jessie
2. Update Proxmox from 3.1 – 3.4
3. Update Proxmos from 3.4 – 4.1

All that glitters is not gold and a simple “apt-get dist-upgrade && apt-get upgrade” won’t cut it. However with some time and focus you can get your box running 4.1…

First upgrade 3.1 to 3.4:

mv /etc/apt/sources.list.d/pve-enterprise.list /etc/apt/sources.list.d/pve-enterprise.list.bak
echo "deb http://download.proxmox.com/debian wheezy pve-no-subscription" > /etc/apt/sources.list.d/pve-nosub.list

Use VIM or VI and check /etc/apt/sources.list – if you see an entry like “deb http://download.proxmox.com/debian wheezy pve” in there, comment it out with a “#” and save and close the file. Then…

apt-get update && apt-get dist-upgrade
shutdown now -r

NOTE: After reboot, if you can’t get the web browser client to come up, try switching browsers or if using chrome, try opening an incognito window and see if that works. Something can get cached in your browser if you used it to access proxmox 3.1 and then access again 3.4 from the same browser session.

Next – this might seem counter intuitive – remove proxmox packages:

apt-get remove proxmox-ve-2.6.32 pve-manager corosync-pve openais-pve redhat-cluster-pve pve-cluster pve-firmware

Now, update your repositories to all point to Debian Jessie instead of Wheezie…

sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
echo "deb [arch=amd64] http://download.proxmox.com/debian jessie pve-no-subscription" > /etc/apt/sources.list.d/pve-nosub.list
wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -
echo "deb http://download.ceph.com/debian-hammer jessie main" > /etc/apt/sources.list.d/ceph.list

Finally, use VIM or VI and check /etc/apt/sources.list – if you see an entry like “deb http://download.proxmox.com/debian jessie pve” in there, comment it out with a “#” and save and close the file. Then…

apt-get update

NOTE: There should be NO errors when you run apt-get update. Maybe some IGN (ignore) but no errors…

Install the new OS Kernel…
Use this command to see what the latest Kernel is (per the new Jessie sources you just downloaded):

apt-cache search pve-kernel | sort

Select the newest one on the list (as of this writing, pve-kernel-4.2.8-1) and install it:

apt-get install pve-kernel-4.2.8-1-pve pve-firmware

NOW… The OS update:

apt-get dist-upgrade

This will take a bunch of time… fast on server with SSD, up to an hour on a server with HDD… there are several notices I had to scroll through and hit “q” to close them (part of the upgrade process) so be aware of this as it isn’t completely unattended. You also need to decide whether or not it is a good idea to remove SSH access for root yet (i would suggest NO during the update and then go make sure you have a user account that can SSH to the server and elevate to root. Then you can disable it. It is a good idea to disable it ASAP though after the update!) and also tell it it is okay to stop and restart services during the update without your permission for each one… Also it will ask you if you want to replace the /etc/issue config file, I said “yes.” This is just some text that appears during login and you want the stuff for the new version of debian to appear… The rest takes some time… so go make coffee, drink coffee, come back and it may be stopped asking you if you want to update the config file for the bootlog daemon. I hit “yes” as saving my boot logs is something I want to happen… after that you are near the end (10 minutes out or so?)… once it is (finally) done… reboot the server:

shutdown now -r

Once it comes back up – install proxmox 4…

apt-get update
apt-get install proxmox-ve

You will get prompted about adding the pve-enterprise.list source file back for apt. Choose NO “n” for this.

Then purge old config files and remove the old kernel leftover from Wheezy and finally reboot again:

dpkg --purge vzctl
dpkg --purge redhat-cluster-pve
apt-get autoremove
apt-get remove pve-kernel-2.6.32-20-pve pve-kernel-2.6.32-26-pve pve-kernel-2.6.32-44-pve
shutdown now -r

Once it is all said and done and the server reboots your web console should work. Remember to try an incognito Chrome window if it doesn’t come up to rule out your web browser cache as a source of trouble.

Finally, my templates list in ProxMox was outdated, simply log back into the command line on the server and…

pveam update

Check your templates list and you should see a bunch of newer templates available for download!



1 of 1

15 comments on: Wholesale Internet – Upgrade Proxmox 3.1 to 3.4 to 4.1 – Debian Wheezy to Jessie

  1. haz

    Just after reboot where i rebooted i cannot login as root.
    shutdown now -r

    Once it comes back up – install proxmox 4…

  2. nbeam

    Before you got to that point, you did an “apt-get dist-upgrade” correct? Here is part of that process “You also need to decide whether or not it is a good idea to remove SSH access for root yet (i would suggest NO during the update and then go make sure you have a user account that can SSH to the server and elevate to root. Then you can disable it. It is a good idea to disable it ASAP though after the update!)” – At one point during that how excruciatingly long upgrade you should get a prompt asking you whether or not you want to disable SSH access for the ROOT user. I think the default might be “yes” – My guess is you hit “Yes” at which point you will not be able to access your server with the root user via SSH. You would need to console in directly :(.

    The reason this prompt comes up is because Debian is being updated from Wheezy to Jessie. One of the changes made to make things more secure was the SSHD_config file was changed such that the root account was probably set to either “without-password” or “disabled”. Unfortunately the default proxmox install only comes with the root account. So, if you only have the root account and you hit “yes” during the upgrade process to disallow the root account access via SSH then you effectively are cut-off from remote access to your server.

    Any chance this is what happened?

    For the record, working with a remote system where SSH is your only option is really frustrating and I feel your pain. I had to rebuild my first box from scratch like four times for various reasons most of which were related to working remotely and not having console access.

  3. haz

    Thanks NBEAM, yes, I think so. Thanks for your assistance. I will rebuild it again but before that i will create another account just in case root doesn’t work again.

    • nbeam

      Hey, after you rebuild, Take a look at the instructions for setting up a new user and installing SUDO from here:

      You might want to do that FIRST. Basically that will walk through how to install SUDO and then add a new user and put them in the sudoers group. As long as you leave the SSHD config as default I believe any user you add in will have SSH access by default. After you get done adding SUDO and then Adding the user make sure you can SSH in with them and elevate to root using sudo su.

      Kind regards and good luck!

  4. Markus

    Confirmed to still work flawlessly today! Saved me a couple of hours for sure! Thanks NBEAM.

    • nbeam


      I am thinking of dropping wholesaleinternet and moving to Hetzner – They have faster procs, more ram, and unlimited throughput at roughly the same price point. One of the main things I want is a server with raid 1 mirrored drives… Being on a single drive makes me nervous… I do like having hosting in the USA though as page load speeds to my site are faster.

      Anyhow, I am glad I got this article out before making the switch. 🙂 – Glad it was a big help!

  5. badasssx

    Is this still relevant you think? Want to update my 3.4 to latest 4.3

    • nbeam

      I would guess that it should be. The upgrade consists of “apt-get” requests so you are pulling new stuff from repositories so it should work I would think.

      • nbeam

        However, please note this was done on a “new” box with no data on it. I wasn’t worried about losing anything.

      • badasssx

        Yes, i know…i have some VM’s running on it…so need to backup them first. Thanks for the tutorial!

  6. anon

    This guide worked 100% for me. Copy and paste commands.

  7. Space Cowboy

    So many convoluted results when searching. Even the proxmox wiki. I can not ever thank you enough for this! Now I just have to upgrade PVE4 to 5 and I have a feeling that will be a whole lot easier. Anyway thanks again for this, I really appreciate it! I’d buy you a beer. Insta Subscribe.

    (Bare metal dedicated dual X5650, no ilo/kvm, no client OS provisioning system, came with Proxmox ve 3 only, if I need something done I have to contact via a ticket and wait, and wait……. and wait, you get the idea)

    • nbeam

      Glad I could help. I ended up moving to Hetzner a year ago and just recently (like 3 days ago) moved to SoYouStart which came with Proxmox 5 out of the box and much easier networking. I moved all of my sites (by just taking backups of the server containers they run in and then moving (via SFTP) those backups and then restoring on my new proxmox install with SoYouStart). Everything running much faster now as I got a more modern Xeon proc and am hosting in Canada instead of Germany.

  8. Pingback: Upgrade Proxmox 3.x to 4.1 (and Wheezy to Jessie) | 0ddn1x: tricks with *nix

  9. Richard Lloyd

    I’m about to do a 3.X -> 4.X upgrade mself (followed by 4.X -> 5.X if the upgrade worked) and this has some useful info it in additional to the standard 3.X -> 4.X Promox wiki page. Last time I tried a 3.X -> 4.X upgrade, I ended up with an unbootable system and had to do a fresh install of 4.X 🙁 I suspect it’s one of the *many* interactive prompts you get about replacing updated files that I might answered wrongly and borked things!

    One big downer is that 4.X has new cluster stuff and you can’t live migrate 3.X to 4.X or in the other direction either! This means downtime for every single 3.X VM – it has to be shutdown on 3.X and then manually brought up on 4.X 🙁 Sort of ruins the “high availability” idea of a Proxmox cluster really!

Leave a Reply