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:
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…
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:
Now, update your repositories to all point to Debian Jessie instead of Wheezie…
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…
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):
Select the newest one on the list (as of this writing, pve-kernel-4.2.8-1) and install it:
NOW… The OS update:
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:
Once it comes back up – install proxmox 4…
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 redhat-cluster-pve
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…
Check your templates list and you should see a bunch of newer templates available for download!
Just after reboot where i rebooted i cannot login as root.
shutdown now -r
Once it comes back up – install proxmox 4…
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.
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.