🕌

Proxmoxを8から9へアップグレード

に公開

この記事について

この記事はProxmoxのWikiに記載されているアップグレード手順を参考にしています.

https://pve.proxmox.com/wiki/Upgrade_from_8_to_9

操作について

以降のターミナルでの操作はWebUIのコンソールからではなく,SSHで接続して行っています.

恐らくパッケージ等のアップグレードでWebUIが再起動される可能性があるためだと思われます.

Proxmox 8から9へのアップグレード

記事の前提条件に下記の記載があるため,まずはProxmox VE 8.4にアップグレードします(Proxmox 8.4以降の場合はこのステップをスキップしても良い).

Upgraded to the latest version of Proxmox VE 8.4 on all nodes.

root@vm:~# apt update

次に,アップグレード可能なパッケージを確認します.

root@vm:~# apt list --upgradable
Listing... Done
...
proxmox-offline-mirror-helper/stable 0.6.8 amd64 [upgradable from: 0.6.7]
proxmox-ve/stable 8.4.0 all [upgradable from: 8.3.0]
proxmox-widget-toolkit/stable 4.3.13 all [upgradable from: 4.3.3]
pve-cluster/stable 8.1.2 amd64 [upgradable from: 8.0.10]
pve-container/stable 5.3.3 all [upgradable from: 5.2.3]
...

Proxmox VEのパッケージが8.3.0から8.4.0にアップグレードされることが確認できます.
次に,Proxmox VEのパッケージをアップグレードします.

root@vm:~# apt dist-upgrade 

アップグレードが完了したら,システムを再起動します(これは手順には書いてはいませんが,私のノードではカーネルが更新されていたため,念のため再起動しています).

root@vm:~# reboot now

チェックスクリプトの実行

Proxmox 9へのアップグレード前に,チェックスクリプトを実行します.

root@vm:~# pve8to9

もしすべてのチェックを有効にする場合は,以下のように実行します.

root@vm:~# pve8to9 --full

このコマンドはチェックと報告のみを実行するため,システムに変更を加えることはありません.

このチェックにより,少なくともFAILURESが0であることを確認する必要があります.

pveversionコマンドでバージョンを確認

pveversionコマンドで現在のProxmoxのバージョンを確認します.このバージョンは少なくとも8.4.1以降である必要があります.

root@vm:~# pveversion
pve-manager/8.4.14/b502d23c55afcba1 (running kernel: 6.8.12-16-pve)

なお,pve8to9で私が遭遇したトラブルについては記事の最後に記載しています.

リポジトリの更新

8系から9系にアップグレードした際に,Debianがbookwormからtrixieに変更されるため,リポジトリ情報を更新します.

root@vm:~# sed -i 's/bookworm/trixie/g' /etc/apt/sources.list

次に,Proxmox VE 9用のリポジトリを追加します.

cat > /etc/apt/sources.list.d/proxmox.sources << EOF
Types: deb
URIs: http://download.proxmox.com/debian/pve
Suites: trixie
Components: pve-no-subscription
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
EOF

パッケージリストの更新

リポジトリ情報を更新した後,パッケージリストを更新します.

root@vm:~# apt update
パッケージの重複に関する対応

これは私個人が遭遇したトラブルですが,もし遭遇していない場合は無視してください
下記の通り警告が出たため確認すると

W: Target Packages (pve-no-subscription/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list.d/proxmox.sources:1
W: Target Packages (pve-no-subscription/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list.d/proxmox.sources:1
W: Target Translations (pve-no-subscription/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list.d/proxmox.sources:1
W: Target Translations (pve-no-subscription/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list.d/proxmox.sources:1
W: Target Packages (pve-no-subscription/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list.d/proxmox.sources:1
W: Target Packages (pve-no-subscription/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list.d/proxmox.sources:1
W: Target Translations (pve-no-subscription/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list.d/proxmox.sources:1
W: Target Translations (pve-no-subscription/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:8 and /etc/apt/sources.list.d/proxmox.sources:1

/etc/apt/sources.listの8行目にProxmox VEのリポジトリが重複して記載されていたため, /etc/apt/sources.list.d/proxmox.sources
削除しました.

root@vm:~# rm /etc/apt/sources.list.d/proxmox.sources

ディストリビューションアップグレードの実行

その後,改めてパッケージリストを更新したうえ,アップグレードを実行します.

root@vm:~# apt update
root@vm:~# apt dist-upgrade

アップグレードには時間がかかります

アップグレード時には何度か構成ファイルについて質問を受けることがあります.

Configuration file '/etc/lvm/lvm.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** lvm.conf (Y/I/N/O/D/Z) [default=N] ? y

ProxmoxのWikiにはこれらの設定ファイルの扱いについて以下のように記載されています.

/etc/issue -> Proxmox VE will auto-generate this file on boot, and it has only cosmetic effects on the login console.
Using the default "No" (keep your currently-installed version) is safe here.
/etc/lvm/lvm.conf -> Changes relevant for Proxmox VE will be updated, and a newer config version might be useful.
If you did not make extra changes yourself and are unsure it's suggested to choose "Yes" (install the package maintainer's > version) here.
/etc/ssh/sshd_config -> If you have not changed this file manually, the only differences should be a replacement of > ChallengeResponseAuthentication no with KbdInteractiveAuthentication no and some irrelevant changes in comments (lines starting > with #).
If this is the case, both options are safe, though we would recommend installing the package maintainer's version in order to > move away from the deprecated ChallengeResponseAuthentication option. If there are other changes, we suggest to inspect them > closely and decide accordingly.
/etc/default/grub -> Here you may want to take special care, as this is normally only asked for if you changed it manually, e.g., > for adding some kernel command line option.
It's recommended to check the difference for any relevant change, note that changes in comments (lines starting with #) are not > relevant.
If unsure, we suggested to selected "No" (keep your currently-installed version)
/etc/chrony/chrony.conf -> If you made local changes you might want to move them out of the global config into the conf.d or, for > custom time sources, the sources.d folder.
See the /etc/chrony/conf.d/README and /etc/chrony/sources.d/README files on your system for detaily.
If you did not make extra changes yourself and are unsure it's suggested to choose "Yes" (install the package maintainer's > version) here.

  • /etc/issue:defaultのNを選択するほうが安全
  • /etc/lvm/lvm.conf:自身で特別追加などしていなければYを選択
  • /etc/ssh/sshd_config:自分で変更していなければどちらでもいい
  • /etc/default/grub:これはあまり聞かれることは無いらしいので,差異を確認してから選択
  • /etc/chrony/chrony.conf:自身で特別追加などしていなければYを選択

アップグレード後の様子

アップグレード前

アップグレード後

以上でProxmox VE 8から9へのアップグレードは完了です!!

pve8to9で私が遭遇したトラブル

systemd-bootの警告

FAIL: systemd-boot meta-package installed. This will cause problems on upgrades of other boot-related packages. Remove 'systemd-boot' See https://pve.proxmox.com/wiki/Upgrade_from_8_to_9#sd-boot-warning for more information.

この警告は,systemd-bootメタパッケージがインストールされている場合に表示されます.

ProxmoxのWikiにも下記のような記載があり

Systemd-boot meta-package changes the bootloader configuration automatically and should be uninstalled

systemd-bootメタパッケージはブートローダーの設定を自動的に変更するため,アンインストールする必要があります.

root@vm:~# apt remove systemd-boot

https://pve.proxmox.com/wiki/Upgrade_from_8_to_9#sd-boot-warning

intel-microcodeの警告

WARN: The matching CPU microcode package 'intel-microcode' could not be found! Consider installing it to receive the latest security and bug fixes for your CPU.
        Ensure you enable the 'non-free-firmware' component in the apt sources and run:
        apt install intel-microcode

この警告は,Intel CPUを使用している場合に表示されるようです.ただ通常通りapt install intel-microcodeを実行してもインストールできず,non-free-firmwareコンポーネントを有効にする必要があります.

/etc/apt/sources.listを編集し,non-free-firmwareコンポーネントを追加します.

- deb http://deb.debian.org/debian/ trixie main contrib
+ deb http://deb.debian.org/debian/ trixie main contrib non-free-firmware

参考文献

https://zenn.dev/omohikane/articles/upgrade-proxmoxve8to9

https://pve.proxmox.com/wiki/Upgrade_from_8_to_9

Discussion