Actualizar PROXMOX 4.x a 5.x sin suscripción

A continuación un procedimiento para actualizar PROXMOX cuando no dispones de una suscripción activa. He usado este procedimiento desde PROXMOX 3.0, por lo que funciona desde versiones anteriores a los ejemplos de esta entrada.

Ojo, que PROXMOX 3.4, liberado en 2015/02/19, fue la última versión con soporte para OpenVZ por lo que si estás actualizando desde una versión anterior a PROXMOX 4.0 deberás de convertir los contenedores OpenVZ a contenedores LXC, el procedimiento se resume en un backup & restore en cualquier caso PROXMOX publico la guía Convert OpenVZ to LXC.

También es importante notar que en esta actualización se actualiza el SO a Debian Stretch (9.x) desde Debian Jessie (8.x) si actualizas desde PROXMOX 4.x o desde Debian Wheezy (7.x) si actualizas desde PROXMOX 3.x.

Consultar la versión del Kernel, Debian y PROXMOX

Es posible consultar la versión de Debian en /etc/debian_version, y la versión de PROXMOX con el comando pveversion -v:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
root@proxmox:/# uname -a
Linux proxmox 4.4.35-1-pve #1 SMP Fri Dec 9 11:09:55 CET 2016 x86_64 GNU/Linux
root@proxmox:~# cat /etc/debian_version
8.9
root@proxmox:~# pveversion -v
proxmox-ve: 4.4-76 (running kernel: 4.4.35-1-pve)
pve-manager: 4.4-1 (running version: 4.4-1/eb2d6f1e)
pve-kernel-4.4.35-1-pve: 4.4.35-76
lvm2: 2.02.116-pve3
corosync-pve: 2.4.0-1
libqb0: 1.0-1
pve-cluster: 4.0-48
qemu-server: 4.0-101
pve-firmware: 1.1-10
libpve-common-perl: 4.0-83
libpve-access-control: 4.0-19
libpve-storage-perl: 4.0-70
pve-libspice-server1: 0.12.8-1
vncterm: 1.2-1
pve-docs: 4.4-1
pve-qemu-kvm: 2.7.0-9
pve-container: 1.0-88
pve-firewall: 2.0-33
pve-ha-manager: 1.0-38
ksm-control-daemon: 1.2-1
glusterfs-client: 3.5.2-2+deb8u3
lxc-pve: 2.0.6-2
lxcfs: 2.0.5-pve1
criu: 1.6.0-1
novnc-pve: 0.5-8
smartmontools: 6.5+svn4324-1~pve80
zfsutils: 0.6.5.8-pve13~bpo80

Proceso de actualización

Descargar la ISO

1
wget 'https://www.proxmox.com/en/downloads?task=callelement&format=raw&item_id=379&element=f85c494b-2b32-4109-b8c1-083cca2b7db6&method=download&args[0]=b5618214eb5901084eb12ca4a331747e' -O proxmox-ve_5.1.iso

Montar la ISO

1
mount proxmox-ve_5.1.iso /mnt/

Configurar el repositorio PROXMOX-VE_5.1.iso

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mv /etc/apt/sources.list /etc/apt/sources.list_proxmox4.4
cat << 'EOF' > /etc/apt/sources.list
#deb http://ftp.es.debian.org/debian jessie main contrib
# security updates
#deb http://security.debian.org jessie/updates main contrib
deb http://ftp.es.debian.org/debian stretch main contrib
# security updates
deb http://security.debian.org stretch/updates main contrib
# PVE
deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
deb file:///mnt/proxmox/packages/ ./
EOF

Actualizar PROXMOX

Tan solo es necesario ejecutar un apt-get update, apt-get dist-upgrade y apt-get upgrade:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
root@proxmox:~# apt-get update
Ign file: ./ InRelease
Ign file: ./ Release.gpg
Ign file: ./ Release
Ign file: ./ Translation-en
Ign http://ftp.es.debian.org stretch InRelease
Hit http://download.proxmox.com stretch InRelease
Hit http://ftp.es.debian.org stretch Release.gpg
Hit http://security.debian.org stretch/updates InRelease
Get:1 http://download.proxmox.com stretch/pve-no-subscription amd64 Packages [155 kB]
Hit http://ftp.es.debian.org stretch Release
Ign http://download.proxmox.com stretch/pve-no-subscription Translation-en
Hit http://security.debian.org stretch/updates/main amd64 Packages
Hit http://ftp.es.debian.org stretch/main amd64 Packages
Hit http://security.debian.org stretch/updates/contrib amd64 Packages
Hit http://ftp.es.debian.org stretch/contrib amd64 Packages
Hit http://security.debian.org stretch/updates/contrib Translation-en
Hit http://ftp.es.debian.org stretch/contrib Translation-en
Hit http://security.debian.org stretch/updates/main Translation-en
Hit http://ftp.es.debian.org stretch/main Translation-en
Reading package lists... Done
root@proxmox:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libcwidget3 libkadm5clnt-mit9 libkadm5srv-mit9 libkdb5-7 libpython3.4-minimal libpython3.4-stdlib libsigc++-2.0-0c2a perl-modules python3.4 python3.4-minimal
The following packages will be installed:
attr corosync cpp-6 dirmngr distro-info-data fonts-font-awesome gcc-6-base gnome-icon-theme gnupg-l10n gtk-update-icon-cache hicolor-icon-theme initramfs-tools-core iso-codes keyutils libacl1-dev
libappconfig-perl libapt-inst2.0 libapt-pkg5.0 libattr1-dev libauthen-sasl-perl libbabeltrace-ctf1 libbabeltrace1 libbind9-140 libboost-filesystem1.62.0 libboost-iostreams1.62.0
libboost-program-options1.62.0 libboost-random1.62.0 libboost-regex1.62.0 libboost-system1.62.0 libboost-thread1.62.0 libbytes-random-secure-perl libc-dev-bin libc-l10n libc6-dev libcfg6 libcmap4
libcorosync-common4 libcpg4 libcroco3 libcrypt-random-seed-perl libcwidget3v5 libdns-export162 libdns162 libdw1 libefiboot1 libefivar1 libelf1 libfastjson4 libfcgi-bin libfcgi0ldbl libfdisk1 libgail-common
libgail18 libgmime-2.6-0 libgnutls30 libhogweed4 libicu57 libidn2-0 libintl-xs-perl libip4tc0 libip6tc0 libiptc0 libisc-export160 libisc160 libisccc140 libisccfg140 libiscsi7 libisl15 libisns0 libjs-extjs
libldap-common liblinear3 liblognorm5 liblua5.3-0 liblwres141 liblz4-1 libmagic-mgc libmailtools-perl libmath-random-isaac-perl libmath-random-isaac-xs-perl libnet-smtp-ssl-perl libnet1
libnetfilter-conntrack3 libnettle6 libnghttp2-14 libnl-3-200 libnl-route-3-200 libnotmuch4 libnpth0 libpam-systemd libperl5.24 libpng16-16 libprocps6 libprotobuf10 libpsl5 libpve-guest-common-perl
libpve-http-server-perl libpython3.5-minimal libpython3.5-stdlib libquorum5 libradosstriper1 libreadline7 librgw2 librrd8 librsvg2-2 librsvg2-common libsecret-1-0 libsecret-common libsigc++-2.0-0v5
libsnappy1v5 libssl1.0.2 libssl1.1 libstatgrab10 libtemplate-perl libtotem-pg5 libtypes-serialiser-perl libunistring0 liburcu4 libvotequorum8 libxapian30 libxslt1.1 libxtables12 linux-base linux-libc-dev
lsb-release lynx-common manpages-dev perl-modules-5.24 perl-openssl-defaults postfix-sqlite publicsuffix pve-kernel-4.13.13-2-pve pve-xtermjs python-cephfs python-click python-colorama python-httplib2
python-pycurl python-pysimplesoap python-rados python-rbd python-simplejson python3-apt python3-chardet python3-debian python3-debianbts python3-httplib2 python3-pkg-resources python3-pycurl
python3-pysimplesoap python3-reportbug python3-requests python3-six python3-urllib3 python3.5 python3.5-minimal tex-common xsltproc xxd
The following packages will be upgraded:
apt apt-listchanges apt-transport-https apt-utils aptitude aptitude-common bc bind9-host bridge-utils ceph-common cifs-utils corosync-pve cpp criu curl dmeventd dmsetup dnsutils efibootmgr eject file
findutils ftp gawk gdisk glusterfs-client glusterfs-common gnupg gnupg-agent gnupg2 ifupdown init init-system-helpers initramfs-tools initscripts iptables iputils-ping isc-dhcp-client isc-dhcp-common
libanyevent-perl libapparmor-perl libapt-pkg-perl libarchive13 libauthen-pam-perl libc-bin libc6 libcairo2 libcephfs1 libclone-perl libcloog-isl4 libcommon-sense-perl libcorosync4-pve
libcrypt-openssl-bignum-perl libcrypt-openssl-random-perl libcrypt-openssl-rsa-perl libcrypt-ssleay-perl libcryptsetup4 libcups2 libcurl3 libcurl3-gnutls libdevmapper-event1.02.1 libdevmapper1.02.1
libev-perl libfile-sync-perl libfilesys-df-perl libfreetype6 libgcc1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgfortran3 libgnutls-openssl27 libgnutlsxx28 libgoogle-perftools4 libgssapi-krb5-2 libgssrpc4
libgtk2.0-0 libhtml-parser-perl libibverbs1 libintl-perl libjson-xs-perl libk5crypto3 libkrb5-3 libkrb5support0 libldap-2.4-2 libldb1 liblinux-inotify2-perl liblocale-gettext-perl liblog-agent-perl
liblvm2app2.2 liblvm2cmd2.02 libmagic1 libnet-dbus-perl libnet-ssleay-perl libpve-common-perl libpve-storage-perl libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libpython3-stdlib
libquadmath0 librados2 librados2-perl librbd1 librrds-perl librtmp1 libsmbclient libsocket6-perl libsqlite3-0 libstdc++6 libsystemd0 libtcmalloc-minimal4 libterm-readline-gnu-perl libtext-charwidth-perl
libtext-iconv-perl libtirpc1 libudev1 libuuid-perl libxml-libxml-perl libxml-parser-perl libxml2 locales lvm2 lxc-pve lynx lynx-cur mutt nfs-common nmap open-iscsi openssh-client openssh-server
openssh-sftp-server openssl perl perl-base pinentry-gtk2 postfix procps proxmox-ve pve-cluster pve-container pve-libspice-server1 pve-manager pve-qemu-kvm python python-apt python-ceph python-debianbts
python-flask python-itsdangerous python-minimal python-protobuf python2.7 python2.7-minimal python3 python3-minimal qemu-server reportbug rpcbind rrdcached rsyslog samba-common samba-libs smartmontools
smbclient socat sqlite3 ssh systemd sysv-rc sysvinit-utils tcpdump telnet texinfo thin-provisioning-tools udev util-linux vim-common vim-tiny vncterm w3m wget x11-apps
184 upgraded, 159 newly installed, 10 to remove and 0 not upgraded.
Need to get 244 MB of archives.
After this operation, 279 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Comprobaciones finales

Tras reiniciar el servidor, comprobar que todo el sistema ha sido actualizado:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
root@proxmox:~# uname -a
Linux proxmox 4.13.13-2-pve #1 SMP PVE 4.13.13-32 (Thu, 21 Dec 2017 09:02:14 +0100) x86_64 GNU/Linux
root@proxmox:~# cat /etc/debian_version
9.3
root@proxmox:~# pveversion -v
proxmox-ve: 5.1-32 (running kernel: 4.13.13-2-pve)
pve-manager: 5.1-41 (running version: 5.1-41/0b958203)
pve-kernel-4.13.13-2-pve: 4.13.13-32
pve-kernel-4.4.35-1-pve: 4.4.35-76
libpve-http-server-perl: 2.0-8
lvm2: 2.02.168-pve6
corosync: 2.4.2-pve3
libqb0: 1.0.1-1
pve-cluster: 5.0-19
qemu-server: 5.0-18
pve-firmware: 2.0-3
libpve-common-perl: 5.0-25
libpve-guest-common-perl: 2.0-14
libpve-access-control: 5.0-7
libpve-storage-perl: 5.0-17
pve-libspice-server1: 0.12.8-3
vncterm: 1.5-3
pve-docs: 5.1-12
pve-qemu-kvm: 2.9.1-5
pve-container: 2.0-18
pve-firewall: 3.0-5
pve-ha-manager: 2.0-4
ksm-control-daemon: 1.2-2
glusterfs-client: 3.8.8-1
lxc-pve: 2.1.1-2
lxcfs: 2.0.8-1
criu: 2.11.1-1~bpo90
novnc-pve: 0.6-4
smartmontools: 6.5+svn4324-1
zfsutils-linux: 0.7.3-pve1~bpo9

Eliminar repositorios

Eliminar el repositorio PROXMOX-VE_5.1.iso

Para ello basta con comentar la línea deb file:///mnt/proxmox/packages/ ./ de /etc/apt/sources.list, o copiar&pegar el siguiente código:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cat << 'EOF' > /etc/apt/sources.list
#deb http://ftp.es.debian.org/debian jessie main contrib
# security updates
#deb http://security.debian.org jessie/updates main contrib
deb http://ftp.es.debian.org/debian stretch main contrib
# security updates
deb http://security.debian.org stretch/updates main contrib
# PVE
deb http://download.proxmox.com/debian/pve stretch pve-no-subscription
#deb file:///mnt/proxmox/packages/ ./
EOF

Eliminar el repositorio PROXMOX Enterprise

Si necesitas seguir este procedimiento para actualizar tu PROXMOX, obviamente es porque no tienes una suscripción activa por lo que no puedes acceder a los repositorios Enterprise de PROXMOX; por ello es recomendable desactivar los repositorios Enterprise:

1
2
3
cat <<'EOF'> /etc/apt/sources.list.d/pve-enterprise.list
#deb https://enterprise.proxmox.com/debian/pve stretch pve-enterprise
EOF

Comprobaciones finales

Comprobar que apt-get update funciona correctamente y que no existen actualizaciones pendientes:

1
2
3
4
5
6
7
8
9
10
11
12
root@proxmox:~# apt-get update
Ign:1 http://ftp.es.debian.org/debian stretch InRelease
Hit:2 http://security.debian.org stretch/updates InRelease
Hit:3 http://download.proxmox.com/debian/pve stretch InRelease
Hit:4 http://ftp.es.debian.org/debian stretch Release
Reading package lists... Done
root@proxmox:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Contenidos
  1. 1. Consultar la versión del Kernel, Debian y PROXMOX
  2. 2. Proceso de actualización
    1. 2.1. Descargar la ISO
    2. 2.2. Montar la ISO
    3. 2.3. Configurar el repositorio PROXMOX-VE_5.1.iso
    4. 2.4. Actualizar PROXMOX
    5. 2.5. Comprobaciones finales
    6. 2.6. Eliminar repositorios
      1. 2.6.1. Eliminar el repositorio PROXMOX-VE_5.1.iso
      2. 2.6.2. Eliminar el repositorio PROXMOX Enterprise
      3. 2.6.3. Comprobaciones finales