Upgrade a 4.x Installation using a newer ISO image

From Proxmox VE
Jump to: navigation, search

Introduction

If you have a valid subscription or you have enabled the "pve-no-subscription" repositories the upgrade process should be as easy as upgrading packages, i.e.

apt-get update && apt-get dist-upgrade

see Wiki article Downloads for exact steps for the upgrade of each releases, it is recommended to process according to it whenever possible.

In exceptional cases, if you don't have access to internet but you have a 4.x ISO containing newer packages than your current 4.x installation you can use it to upgrade according the following example which describes an upgrade from 4.0 to 4.1.

Step by step upgrade process

Create a mount point and update /etc/fstab accordingly

mkdir /media/cdrom
echo '/dev/sr0 /media/cdrom iso9660 noauto,ro 0 0' >> /etc/fstab  # optional

Mount the CD or an ISO image

If you have a real CD/DVD or if running the Proxmox VE in another VM and using the ISO image:

mount /dev/sr0 /media/cdrom

or just (if you have an entry in the /etc/fstab):

mount /media/cdrom

If you have the downloaded ISO image:

mount -o loop /path/to/proxmox-ve_4.1-2f9650d4-21.iso /media/cdrom

Mount an empty directory over /media/cdrom/dev

Using apt-cdrom will fail while trying to scan /media/cdrom/dev/proc/self/fd directory. As a workaround create an empty file-system and mount it over /media/cdrom/dev:

mkfs.cramfs /mnt /tmp/empty-image.img                # /mnt being an empty directory
mount -o loop /tmp/empty-image.img /media/cdrom/dev
ls -l /media/cdrom/dev                               # shows an empty content

Add a CD repository

apt-cdrom --no-auto-detect --cdrom /media/cdrom --no-mount add

This should scan the CD content, ask you for a name (use Proxmox 4.1) and add a repository in your /etc/apt/sources.list file. It creates also an entry in the /var/lib/apt/cdroms.list using the CD ID and given name. The content of the /var/lib/apt/cdroms.list should look like:

CD::aa2253e1b6b98e93b17b38bef5b4d256-2 "Proxmox 4.1";

The added lines to the /etc/apt.sources.list should look like:

deb cdrom:[Proxmox 4.1]/ jessie pve
deb cdrom:[Proxmox 4.1]/proxmox/packages/ /

Update and upgrade packages

apt-get update && apt-get dist-upgrade

Reboot

systemctl reboot

The packages should be updated from the CD/ISO image, a new kernel version should be 4.2.6-1-pve.

Cleanup: Remove the CD repository

You can disable or remove the CD repository by commenting out the corresponding lines in the /etc/apt/sources.list file, you can also remove the /var/lib/apt/cdroms.list file. Run apt-get update afterwards.