Proxmox VE 5.x升级到Proxmox VE 6

前提条件及注意事项

Proxmox VE升级到最新稳定版5.4。

测试环境进行升级操作。

如果是线上环境,一定要先备份,万一挂掉,还有机会恢复到升级前的状态(PVE 6稳定版没出来前,生产系统不要妄动)。

Corosync需要升级到版本3.X。

升级corosync

如果是Proxmox VE虚拟机或者容器是高可用配置(HA),则在升级corosync前需要关闭与之相关的服务。

Proxmox VE 5.x升级到Proxmox VE 6

需要在每个节点执行如下指令:

systemctl stop pve-ha-lrm && systemctl stop crm

 

接下来设置corosync 更新源,它是通过创建文件来实现的。具体的指令如下:

root@pve:~# echo "deb stretch main" > /etc/apt/sources.list.d/corosync3.list

 

接着确认改更新源是否有效,执行下面的指令

root@pve:~# apt-get list --upgradeable Listing... Done corosync/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libcmap4/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libcorosync-common4/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libcpg4/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libqb0/stable 1.0.5-1~bpo9+2 amd64 [upgradable from: 1.0.3-1~bpo9] libquorum5/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libvotequorum8/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1]

 

从输出可知,更新源是有效可用的。那么,别犹豫了,直接更新之。

Proxmox VE 5.x升级到Proxmox VE 6

更新完毕corosync以后,记得在各个节点启动pve-ha-larm及pve-ha-crm服务。

root@pve:~# systemctl  start    pve-ha-lrm
root@pve:~# systemctl  start    pve-ha-crm

如果担心升级影响到业务,可以先迁移其上的虚拟机或者容器到其它还未进行升级的节点,等升级好后,再手动迁移回来,这将花费些时间,具体的情形与你设备的配置关系密切,特别是磁盘。如果你用的是该死的sata机械盘,那就慢慢整吧!

准备proxmox VE 6的更新源

确认升级是可行型。Proxmox VE 5.4专有的指令 pve5to6 ,执行该指令即可。

Proxmox VE 5.x升级到Proxmox VE 6

更改debian的apt源

修改文件/etc/apt/sources.list,把“stretch”替换成“buster“。

Proxmox VE 5.x升级到Proxmox VE 6

Ø  添加proxmox VE 6更新源。

root@pve:~# echo "deb buster pvetest" > /etc/apt/sources.list.d/pve-install-repo.list


Ø  更改ceph源


root@pve:~# echo "deb buster main" > /etc/apt/sources.list.d/ceph.list


执行proxmox VE6更新


命令行执行 apt-get update && apt-get dist-upgrade .

root@pve:~# apt-get update && apt-get dist-upgrade                                                                   
Hit:1 buster/updates InRelease
Hit:2 buster InRelease                                   
Hit:3 buster-updates InRelease                         
Hit:4 buster InRelease       
Get:5 buster InRelease [2,889 B]
Hit:6 stretch InRelease
Hit:7 buster InRelease
Get:8 buster/main amd64 Packages [10.9 kB]
Fetched 13.8 kB in 10s (1,297 B/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  libkdb5-8 libtirpc1 pve-libspice-server1
The following NEW packages will be installed:
  cpp-8 dbus-user-session dconf-gsettings-backend dconf-service dirmngr e2fsprogs-l10n fdisk fonts-glyphicons-halflings
  gcc-8-base glib-networking glib-networking-common glib-networking-services gnupg-l10n gnupg-utils gpg gpg-agent
  gpg-wks-client gpg-wks-server gpgconf gpgsm gsettings-desktop-schemas gstreamer1.0-libav gstreamer1.0-plugins-base
  gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-x i965-va-driver ibverbs-providers
  intel-media-va-driver iso-codes Javascript-common liba52-0.7.4 libaa1 libaacs0 libaom0 libargon2-1 libass9
  libavc1394-0 libavcodec58 libavfilter7 libavformat58 libavutil56 libbdplus0 libbind9-161 libbluray2 libbs2b0
  libcairo-gobject2 libcdio18 libcdparanoia0 libcephfs2 libchromaprint1 libcodec2-0.8.1 libcom-err2 libcroco3
  libcryptsetup12 libcrystalhd3 libcurl4 libdata-dump-perl libdconf1 libdigest-bubblebabble-perl libdns-export1104
  libdns1104 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdv4 libdvdnav4
  libdvdread4 libevent-2.1-6 libext2fs2 libfftw3-double3 libflite1 libfribidi0 libfstrm0 libgdbm-compat4 libgdbm6
  libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgfapi0 libgfchangelog0 libgfdb0 libgfortran5
  libgfrpc0 libgfxdr0 libgl1 libgl1-mesa-dri libglapi-mesa libglusterfs-dev libglusterfs0 libglvnd0 libglx-mesa0 libglx0
  libgme0 libgomp1 libgpg-error-l10n libgsm1 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgudev-1.0-0 libicu63
  libiec61883-0 libigdgmm5 libipset11 libirs161 libisc-export1100 libisc1100 libisccc161 libisccfg163 libisl19
  libjack-jackd2-0 libjansson4 libjbig0 libjemalloc2 libjs-bootstrap libjs-jquery libjs-sphinxdoc libjs-underscore
  libkdb5-9 libleveldb1d liblilv-0-0 libllvm7 liblmdb0 liblttng-ust-ctl4 liblttng-ust0 liblvm2cmd2.03 liblwres161
  libmp3lame0 libmpeg2-4 libmpfr6 libmpg123-0 libmysofa0 libncurses6 libncursesw6 libnet-dns-sec-perl libnet-libidn-perl
  libnftables0 libnftnl11 libnorm1 libnss-systemd libopencore-amrnb0 libopencore-amrwb0 libopenjp2-7 libopenmpt0
  liborc-0.4-0 libpciaccess0 libpcre2-8-0 libperl5.28 libpgm-5.2-0 libpostproc55 libprocps7 libprotobuf17 libproxy1v5
  libPython2-stdlib libpython3.7 libpython3.7-minimal libpython3.7-stdlib libraw1394-11 librsvg2-2 librsvg2-common
  librubberband2 libsamplerate0 libsensors-config libsensors5 libserd-0-0 libshine3 libshout3 libsidplay1v5 libsodium23
  libsord-0-0 libsoup2.4-1 libsoxr0 libspeex1 libspice-server1 libsratom-0-0 libssh-gcrypt-4 libswresample3 libswscale5
  libtag1v5 libtag1v5-vanilla libtheora0 libtiff5 libtinfo6 libtirpc-common libtirpc3 libtry-tiny-perl libtwolame0
  libuchardet0 libunistring2 liburcu6 libv4l-0 libv4lconvert0 libva-drm2 libva-x11-2 libva2 libvdpau-va-gl1 libvdpau1
  libvidstab1.1 libvisual-0.4-0 libvorbisfile3 libvpx5 libwavpack1 libwebp6 libwebpmux3 libx264-155 libx265-165
  libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcb-xfixes0 libxdamage1 libxfixes3
  libxshmfence1 libxv1 libxvidcore4 libxxf86vm1 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers
  nftables nmap-common perl-modules-5.28 pigz pve-kernel-5.0 pve-kernel-5.0.15-1-pve pve-kernel-helper python-certifi
  python-configparser python-future python-idna python-prettytable python-rgw python2 python2-minimal python3-asn1crypto
  python3-certifi python3-cffi-backend python3-cryptography python3-debconf python3-distutils python3-idna python3-jwt
  python3-lib2to3 python3-prettytable python3.7 python3.7-minimal shared-mime-info usb.ids va-driver-all
  vdpau-driver-all
  ..........................省略....................


留意一下输出,了解都更新了哪些包?

更新过程有人机交互的情形,要注意看输出提示。

Proxmox VE 5.x升级到Proxmox VE 6

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/a4a0f5962db0d8e10f3ac6f2eb44d395.html