PVE9.0・PBS4 シリーズまとめ
- PVE 8から9へのメジャーバージョンアップ(β版+スタンドアローン)
- PVE9からの新機能、LVMでのスナップショット取得
- Promox VE9.0 β まとめと所感
- PBS 3から4へのメジャーバージョンアップ(β版)
- PBS4からの新機能、S3互換APIを使ってS3をデータストアとして利用する
概要
PVE9.0、PBS4.0が出たばかりのころに書いています。
そのうちドキュメントが修正されているかもしれません。
JPmoxsのイベントでアップデートのデモしました。
その中でaptのリポジトリ設定の理解が怪しかったので調べました。
イベントで参照していたのは以下のProxmox本家Wiki。
忙しい人向け
- .listは古い形式、.sourceは新しい形式
- .list、.sourceどちらの設定方法でもOK。
- 公式ドキュメントを上から順番にやっていくとリポジトリ重複エラーが出る。
- Optional: Modernize apt Repository Sources にあるapt modernize-sourcesはやったほうがいい。
.listは古い形式、.sourceは新しい形式
PVE8.0でのリポジトリ設定は以下ファイルで行ってました。
※デフォルト及び、GUIから追加した場合。
※手動で新しい形式にすることもできたはず。
- /etc/apt/sources.list
- Debianとno-subscriptionリポジトリ
- /etc/apt/sources.list.d/pve-enterprise.list
- enterpriseリポジトリ
- /etc/apt/sources.list.d/ceph.list
- ceph
この形式はPVE9.0でも利用可能ですが、apt的には新しい形式への移行が推奨のようで。
理由は1行での記載に限界があったから。
新しい形式の例は以下。
root@handson03:~# cat /etc/apt/sources.list.d/pve-enterprise.sources
Types: deb
URIs: https://enterprise.proxmox.com/debian/pve
Suites: trixie
Components: pve-enterprise
Signed-By: /usr/share/keyrings/proxmox-archive-keyring.gpg
この辺りの話は以下が参考になりました。
PVE8.0からPVE9.0にアップデートするときには新旧どちらの設定方法でもOK。
でも公式ドキュメントを上から順番にやっていくとリポジトリ重複エラーが出る。
公式ドキュメントでは以下のように記載されている。
- Update Debian Base Repositories to Trixie
- sed -i 's/bookworm/trixie/g' /etc/apt/sources.list
- sed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/pve-enterprise.list
- ※ceph.listだけ記載がない
- Add the Proxmox VE 9 Package Repository
- pveのenterpirise、no-subscriptionを.sourceで作成
- Update the Ceph Package Repository
- Cephを.sourceで作成
よく理解せずに上から順番にやっていくとPVEは新旧重複するので以下のようなエラーが出る。
※以下はsed -i 's/bookworm/trixie/g' /etc/apt/sources.list.d/ceph.listも実行したので、cephについても重複している。
root@handson01:~# 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 (no-subscription/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/ceph.list:1 and /etc/apt/sources.list.d/ceph.sources:1
W: Target Packages (no-subscription/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/ceph.list:1 and /etc/apt/sources.list.d/ceph.sources:1
W: Target Translations (no-subscription/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/ceph.list:1 and /etc/apt/sources.list.d/ceph.sources:1
W: Target Translations (no-subscription/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/ceph.list:1 and /etc/apt/sources.list.d/ceph.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
W: Target Packages (no-subscription/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/ceph.list:1 and /etc/apt/sources.list.d/ceph.sources:1
W: Target Packages (no-subscription/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/ceph.list:1 and /etc/apt/sources.list.d/ceph.sources:1
W: Target Translations (no-subscription/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list.d/ceph.list:1 and /etc/apt/sources.list.d/ceph.sources:1
W: Target Translations (no-subscription/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/ceph.list:1 and /etc/apt/sources.list.d/ceph.sources:1
そのため、重複しないように設定する必要がある。
Optional: Modernize apt Repository Sources にあるapt modernize-sourcesはやったほうがいい。
アップデート完了後、apt modernize-sources を実行すると設定が新しい形式に統一される。
将来的に古い形式がサポートされなくなる可能性もあるが、それ以上にPVEのGUI上からリポジトリ追加した際に新しい形式で追加されるので、このコマンドはアップデート終了後に実行したほうがいいと思う。