Upgrade from 3.x to 4.0
Proxmox VE 4.0 introduces major new features, therefore the upgrade must be carefully planned and tested. Depending on your existing configuration, several manual steps are required, including some downtime. NEVER start the upgrade process without a valid backup and without testing the same in a test lab setup.
Major upgrades for V4.0:
- OpenVZ is removed, a conversion via backup/restore to LXC is needed
- New corosync version, therefore clusters has to be re-established
- New HA manager (replacing RGmanager, involving a complete HA re-configuration)
If you run a customized installation and/or you installed additional packages, for example for distributed storage like Ceph or sheepdog, DRBD or any other third party packages, you need to make sure that you also upgrade these package to Debian Jessie.
Generally speaking there are two possibilities to move from 3.x to 4.0
- In-place upgrade via apt, step by step
- New installation on new hardware (and restore VM´s from backup) - safest way.
In-place upgrades are done with apt, so make sure that you are familiar with apt before you start here.
- upgraded to latest V3.4 version
- reliable access to all configured storages
- healthy cluster
- no VM or CT running (note: VM live migration from 3.4 to 4.0 node or vice versa NOT possible)
- valid backup of all OpenVZ containers (needed for the conversion to LXC)
- valid backup of all VM (only needed if something goes wrong)
- Correct repository configuration (accessible both wheezy and jessie)
- at least 1GB free disk space at root mount point
Actions Step by Step
All has to be done on each Proxmox node's command line or via SSH, some of the steps are optional. If a whole cluster should be upgraded, save the cluster name. Again, make sure that you have a valid backup of all CT and VM before you start.
Remove Proxmox VE 3.x packages in order to avoid dependency errors
First make sure that your actual installation is "clean", tentatively run
apt-get update && apt-get dist-upgrade
Then start the removal:
apt-get remove proxmox-ve-2.6.32 pve-manager corosync-pve openais-pve redhat-cluster-pve pve-cluster pve-firmware
Adapt repository locations and update the apt database, point all to jessie, e.g.:
sed -i 's/wheezy/jessie/g' /etc/apt/sources.list sed -i 's/wheezy/jessie/g' /etc/apt/sources.list.d/pve-enterprise.list apt-get update
In case Ceph server is used: Ceph repositories can be found at http://gitbuilder.ceph.com, therefore etc/apt/sources.list.d/ceph.list will contain e.g.:
You also need to install the Ceph gitbuilder repository key to apt, for details, check the wiki on ceph.com.
Install the new kernel
Check first what the current new kernel's version is - at the moment (October, 6th 2015) it is 4.2.2-1 - and start:
apt-get install pve-kernel-4.2.2-1-pve
Upgrade the basic system to Debian Jessie
This action will consume some time - depending on the systems performance, this can take up to 60 min or even more. If you run on SSD, the dist-upgrade can be finished in 5 minutes.
Reboot the system in order to activate the new kernel
Install Proxmox VE 4.0
Finally, install the new Proxmox VE 4.0 packages with one single command:
apt-get install proxmox-ve
Remove the old kernel (not a must, but recommended):
apt-get remove pve-kernel-2.6.32-41-pve
Finally, reboot and test if all is working as expected.
Optional: OpenVZ conversion
Convert the previously backed up containers to LXC, following the HowTo on Convert OpenVZ to LXC
You can also remove the obsolete OpenVZ container data from your local storage.
rm -f /etc/pve/openvz/<ct-id>.conf rm -R <storage-path>/private/*
Due to the new corosync 2.x, the cluster has to be re-established again. Please use the same clustername.
- at the first node
pvecm create <clustername>
- at all other nodes:
pvecm add <first-node´s-IP> -force
The HA configuration (fail-over, fencing etc.) have to be re-configured manually, see High Availability Cluster 4.x
After upgrading the last node remove the V3.x cluster data:
- Backup all VMs and containers
- Save all files from /etc/pve/... on a save place
- Install Proxmox VE from ISO
- Restore /etc/pve/storage.cfg
- Restore VMs from Backups
- Restore/Convert containers, see Convert OpenVZ to LXC