Monday, May 23, 2016

Updating Proxmox 3.4 to 4.x (no subscription)

Updating proxmox from 3.4 to 4.x




Tested with:

Upgraded Proxmox from 3.2 to 3.4
NFS Share configured with vm backups
MS Windows 2008R2 VM

Installation:

!!! ALWAYS MAKE SURE YOU HAVE WORKING BACKUPS OF YOUR VM'S !!!

Stop all your running vm's on the proxmox server you want to update.

Connect to your proxmox server using ssh or use shell in the proxmox interface.


Prevent errors from the Enterprise repository if already not done so:

type: nano /etc/apt/sources.list.d/pve-enterprise.list

Change the following line:
deb https://enterprise.proxmox.com/debian wheezy pve-enterprise
into
# deb https://enterprise.proxmox.com/debian wheezy pve-enterprise
 

Add Promox 4.x repository if it is not there yet:
type: nano /etc/apt/sources.list

Add the following lines at the bottom:
# Proxmox repository
deb http://download.proxmox.com/debian jessie pve-no-subscription

Check if everything is up-to-date:
Type: apt-get update 
Type: apt-get dist-upgrade

Removing some components:
type: apt-get remove proxmox-ve-2.6.32 pve-manager corosync-pve openais-pve redhat-cluster-pve pve-cluster pve-firmware

Add repositories:
type: sed -i 's/wheezy/jessie/g' /etc/apt/sources.list
type: apt-get update

Check which is the newest kernel:
type: apt-cache search pve-kernel | sort

Now install the newest kernel:
for example type: apt-get install pve-kernel-4.4.8-1-pve pve-firmware

To upgrade your system to Debian Jessie:
type: apt-get dist-upgrade


During the update it will stop and show you what will be added or or removed.

You can press ENTER to continue and eventually press q for quit.

Now you will get some questions:

Disable SSH password authentication for root: No
Every other question with Y

Install proxmox and some possible missing components:
type: apt-get install proxmox-ve

If you encounter errors, reboot the server (type: init6) and try the above command again after reboot.

Answer every question with Y when asked

type: apt-get install postfix
type: dpkg --purge vzctl
type: dpkg --purge redhat-cluster-pve

Now it's time to remove the old kernels:

To remove the kernels automatically:
type: apt-get remove $(dpkg -l | egrep  '^ii  (pve-)?kernel-' | awk '{print $2}' | grep -v `uname -r`)

To remove them manually:
type: dpkg --list | grep pve-kernel

Remove all pve-kernel-2.6.*
type: apt-get remove pve-kernel-2.6.*


Reboot the server:
type: init 6


Connect to your proxmox server again with ssh.

type: pveversion -v



the first line should say:

proxmox-ve: 4. etc ....




When the first line is like above proxmox is succesfully updated to proxmox 4.x

No comments: