💩

Proxmoxバージョンアップ(8⇒9)

に公開

Proxmoxたのしい

vSphere(ESXi)とは違ってPコアEコア気にせずに導入できるし、ほぼDebianだし、触ってて楽しい。

問題が

最近、Proxmox(ASRockのDeskmini)のオンボードNICがちょくちょくハングアップするという事象が起きる。

調べるとオフロードが悪さしているとか何とかという話なのでとりあえず対処したが、
バージョンアップすると治るかもしれない(無根拠)のでバージョンアップしてみる。

構成

おうち環境のざっくり図。

どこの家庭にもあるDeskminiにProxmoxを入れて、その上でWinSV(ドメコン)とRHELを稼働させ、
同じくどこの家庭にもあるNAS(QNAP)にRHELを建ててZabbixでそれぞれを監視。

青い線はPCとProxmoxをLAN直結していて、オンボードNICがハングアップした時のバックアップ回線の意味合い。

バージョンアップの成否判定

ここのバージョンが9に変わって。

稼働しているVMがちゃんと起動して、ログイン出来て。

ProxmoxへADユーザーでログイン出来て、ZabbixからAPIで監視出来れば成功とする。

バージョンアップ

まだリリースして2週間経ったか経っていないかぐらいなので、ここだけを頼りに頑張る。

前提

前提条件は色々書いてあるが、当てはまるのは以下の3つぐらい。

  • バックアップ取った?
    • ⇒ 日次で取ってるので問題無し
  • /に少なくとも5GB、理想としては10GB空いてること
    • ⇒ 空いてる
  • バージョンは8.4.1以上?
    • ⇒ 8.4.0だった

領域

root@sakuya:~# df -h
Filesystem                Size  Used Avail Use% Mounted on
udev                       32G     0   32G   0% /dev
tmpfs                     6.3G  3.2M  6.3G   1% /run
/dev/mapper/pve-root       94G   45G   45G  51% /
tmpfs                      32G   46M   32G   1% /dev/shm
tmpfs                     5.0M     0  5.0M   0% /run/lock
efivarfs                  192K  118K   70K  63% /sys/firmware/efi/efivars
/dev/nvme0n1p2           1022M   12M 1011M   2% /boot/efi
/dev/sda1                 916G  7.6G  862G   1% /mnt/pve/iso
/dev/fuse                 128M   20K  128M   1% /etc/pve
192.168.2.13:/ProxBackup  3.0T  1.2T  1.9T  38% /mnt/pve/ProxBackup
tmpfs                     6.3G     0  6.3G   0% /run/user/0
root@sakuya:~# 

バージョン

root@sakuya:~# pveversion 
pve-manager/8.4.0/ec58e45e1bcdf2ac (running kernel: 6.8.12-9-pve)

なので、まずは8.4.1に上げる。
※当然リポジトリの登録が必要。

apt update

からの

apt dist-upgrade

600MBほど要求された。

After this operation, 582 MB of additional disk space will be used.

終わるのを待ってから(大体3分ぐらい?)もう一回確認。

root@sakuya:~# pveversion 
pve-manager/8.4.11/14a32011146091ed (running kernel: 6.8.12-9-pve)
root@sakuya:~# 

これで前提条件はクリア。

バージョンアップ

テストスクリプト実行

まずはpve8to9というテストスクリプトがあって、8.4.1以上じゃないと出て来ないらしい。

こう言っているので、とりあえずfullで実行。

Make sure to run the full checks at least once before the upgrade.

チェックは一瞬で終わって、コンソールに収まり切らない量が出力されるのでじっくり見たい場合は工夫が必要。

最後にこんな感じでチェック結果が表示されて、初回テストはNGという結果。

= SUMMARY =

TOTAL:    42
PASSED:   33
SKIPPED:  6
WARNINGS: 2
FAILURES: 1

ATTENTION: Please check the output for detailed information!
Try to solve the problems one at a time and then run this checklist tool again.

テスト結果対処

FAILURESから探す

運良くFAILURESのログが画面内に収まったので確認。

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 meta-packageが入っている。systemd-bootを消せとの事。
表示されたリンクは前述のリンクなので探してみると、

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

ってのがあり、まあつまり勝手に入るから使って無いから消してねって話。
自分の環境ではgrubを使っているので、

root@sakuya:~# ls /boot/efi/loader
ls: cannot access '/boot/efi/loader': No such file or directory
root@sakuya:~# ls /boot/grub/
fonts  grub.cfg  grubenv  i386-pc  locale  unicode.pf2  x86_64-efi
root@sakuya:~# 

消しちゃいましょう。

apt remove systemd-boot
WARNINGSの2件

1件目。

WARN: 2 running guest(s) detected - consider migrating or stopping them.

VMが2つ動いているから、マイグレーションするか止めるかしてねという警告。
後で止めるので無視。

2件目。

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

大人しくパッケージを入れてみる。

root@sakuya:~# apt install intel-microcode
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package intel-microcode is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'intel-microcode' has no installation candidate

ここ

An additional Debian Firmware Repository exists, but is not configured by default.

と書いてあるので、リポジトリを追加ついでにbookwormからtrixieに変わるという話なので変更。

root@sakuya:~# cat /etc/apt/sources.list
deb http://deb.debian.org/debian/ trixie main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security/ trixie-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ trixie-updates main contrib non-free non-free-firmware
root@sakuya:~# 

apt-updateして、改めてパッケージを入手。

改めてpve8to9を実行したが、新たなエラーが。

FAIL: Found mixed old and new package repository suites, fix before upgrading! Mismatches:
    found suite trixie at in /etc/apt/sources.list:1
    found suite bookworm at in /etc/apt/sources.list.d/ceph-no-subscription.list:1
    found suite bookworm at in /etc/apt/sources.list.d/pve-no-subscription.list:1
  Configure the same base-suite for all Proxmox and Debian provided repos and ask original vendor for any third-party repos.
  E.g., for the upgrade to Proxmox VE 9 use the 'trixie' suite.

中途半端に/etc/apt/sources.listをtrixieにしてしまったので、bookwormと混在しているぞと。

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

で、もっかいチェック。

= SUMMARY =

TOTAL:    42
PASSED:   34
SKIPPED:  6
WARNINGS: 2
FAILURES: 0

ATTENTION: Please check the output for detailed information!

また警告出てる…。

ARN: updates for the following packages are available:
  dpkg, fontconfig, libvulkan1, reportbug, libnetfilter-conntrack3, librados2, liblttng-ust1t64, librdmacm1t64, libssl3t64, cifs-utils, tcpdump, libpcap0.8t64, libssl3t64, dmidecode, libwrap0, libkeyutils1, pve-docs,

長いので抜粋。
パッケージが使える(=最新じゃ無いぞ)って警告っぽいのと、wikiの後続の手順でリポジトリに変更を加えるっぽいのでこちらも無視。

次へ。

バージョン9用リポジトリを追加。

no-subscriptionなので、手順通りこちらを実行。

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

apt udpateが実行出来るかを確認した所、既存の.listと設定が競合。

root@sakuya:~# apt update
E: Conflicting values set for option Signed-By regarding source http://download.proxmox.com/debian/pve/ trixie: /usr/share/keyrings/proxmox-archive-keyring.gpg != 
E: The list of sources could not be read.

面倒なので.listを削除して再実行したら通ったので、次へ。

root@sakuya:~# rm -fv /etc/apt/sources.list.d/*list
removed '/etc/apt/sources.list.d/ceph.list'
removed '/etc/apt/sources.list.d/ceph-no-subscription.list'
removed '/etc/apt/sources.list.d/pve-enterprise.list'
removed '/etc/apt/sources.list.d/pve-no-subscription.list'
root@sakuya:~# 
root@sakuya:~# apt update
Hit:1 http://deb.debian.org/debian trixie InRelease
Hit:2 http://deb.debian.org/debian-security trixie-security InRelease
Hit:3 http://deb.debian.org/debian trixie-updates InRelease  
Hit:4 http://download.proxmox.com/debian/pve trixie InRelease
Reading package lists... Done          
Building dependency tree... Done
Reading state information... Done
581 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@sakuya:~# 

こっちも追加して

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

確認

root@sakuya:~# apt update
Hit:1 http://deb.debian.org/debian trixie InRelease
Hit:2 http://deb.debian.org/debian-security trixie-security InRelease
Hit:3 http://deb.debian.org/debian trixie-updates InRelease  
Get:4 http://download.proxmox.com/debian/ceph-squid trixie InRelease [2,736 B]
Hit:5 http://download.proxmox.com/debian/pve trixie InRelease
Get:6 http://download.proxmox.com/debian/ceph-squid trixie/no-subscription amd64 Packages [23.7 kB]
Fetched 26.5 kB in 1s (20.5 kB/s)   
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
581 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@sakuya:~# 

バージョンアップ

これ自体で再起動はかからないと思われるが、仮想マシンを停止。

揺動修正、次弾着弾、1万2000、上底よし、コマンド……今!

apt dist-upgrade

まあまあ持って行かれる。

After this operation, 1,116 MB of additional disk space will be used.

トイレタイム。

#   # #   # #   #  ###
#   # ##  # #  #  #   #
#   # # # # ###   #   #
#   # #  ## #  #  #   #
 ###  #   # #   #  ###

途中、sshのmanが表示されたり(なんで?)、こんなのが出たりして、

Configuration file '/etc/issue'
 ==> 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.
*** issue (Y/I/N/O/D/Z) [default=N] ?   

こうなった。
パッケージの更新に伴ってサービスの再起動が必要で、確認なしに再起動する(Yes)かしないか(No)を選ぶ。

デフォルトでNoになっているので、ちゃんと見ろよ? って言っているのかもしれないけど、Yesで続行。

lvm.confについて聞かれる。

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] ?  

とりあえずDで差分を見るも、コメントだけ。(いや差分は差分だけどさ………)
どっちでもいいけどYで変更を許可。

*** lvm.conf (Y/I/N/O/D/Z) [default=N] ? D
--- /etc/lvm/lvm.conf   2025-06-06 21:57:21.574631055 +0900
+++ /etc/lvm/lvm.conf.dpkg-new  2025-08-11 17:46:22.000000000 +0900
@@ -36,6 +36,19 @@
        # This configuration option has an automatic default value.
        # checks = 1
 
+       # Configuration option config/validate_metadata.
+       # Allows to select the level of validation after metadata transformation.
+       # Validation takes extra CPU time to verify internal consistency.
+       # Accepted values:
+       #   full
+       #     Do a full metadata validation before disk write.
+       #   none
+       #     Skip any checks (unrecommended, slightly faster).
+       #
+       # This configuration option is advanced.
+       # This configuration option has an automatic default value.
+       # validate_metadata = "full"
+
        # Configuration option config/abort_on_errors.
        # Abort the LVM process if a configuration mismatch is found.
        # This configuration option has an automatic default value.
@@ -122,7 +135,7 @@
        # Configuration option devices/use_devicesfile.
        # Enable or disable the use of a devices file.
        # When enabled, lvm will only use devices that
-       # are lised in the devices file. A devices file will
+       # are listed in the devices file. A devices file will
        # be used, regardless of this setting, when the --devicesfile
        # option is set to a specific file name.
        # This configuration option has an automatic default value.
@@ -135,6 +148,16 @@
        # This configuration option has an automatic default value.
        # devicesfile = "system.devices"
 
+       # Configuration option devices/devicesfile_backup_limit.

終わった!

Processing triggers for initramfs-tools (0.148.3) ...
update-initramfs: Generating /boot/initrd.img-6.14.8-2-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
Processing triggers for postfix (3.10.3-2) ...
Restarting postfix
Processing triggers for pve-ha-manager (5.0.4) ...
Processing triggers for shim-signed:amd64 (1.47+pmx1+15.8-1+pmx1) ...
root@sakuya:~# 

1回目実行した時、DNS(停止したドメコン)の向き先を変えるのを忘れていて、それを差し引くと大体20分ぐらい?

終わったらもう1回チェックスクリプトを実行。

pve8to9 --full

警告が1件、再起動しろってだけの話なのでリブートする。

Checking running kernel version..
WARN: a suitable kernel (proxmox-kernel-6.14) is installed, but an unsuitable (6.8.12-9-pve) is booted, missing reboot?!
root@sakuya:~# reboot

バージョンアップ確認

バージョン変わった!

起動していて、

ログインも、

出来た!

ADユーザーでProxmoxとZabbixにログイン出来てAPIでの監視も問題無し。

バージョンアップ後

aptのリソースをdeb822形式に変換。

今回変更を加えられたdebian.sourcesはバージョンアップ時に追加された物。

バージョンアップ前はsources.listをsedとかでやったのは、単に安全策として段階的にやっただけで、いきなりmodernize-sourcesしても良さそう。

root@sakuya:~# apt modernize-sources
The following files need modernizing:
  - /etc/apt/sources.list

Modernizing will replace .list files with the new .sources format,
add Signed-By values where they can be determined automatically,
and save the old files into .list.bak files.

This command supports the 'signed-by' and 'trusted' options. If you
have specified other options inside [] brackets, please transfer them
manually to the output files; see sources.list(5) for a mapping.

For a simulation, respond N in the following prompt.
Rewrite 1 sources? [Y/n] Y
Modernizing /etc/apt/sources.list...
- Writing /etc/apt/sources.list.d/debian.sources

リポジトリに変更が入ったからapt updateしたらenterpriseの方を見に行って失敗した。

root@sakuya:~# apt update
Hit:1 http://deb.debian.org/debian trixie InRelease
Hit:2 http://deb.debian.org/debian-security trixie-security InRelease
Hit:3 http://deb.debian.org/debian trixie-updates InRelease  
Err:4 https://enterprise.proxmox.com/debian/pve trixie InRelease              
  401  Unauthorized [IP: 51.79.228.122 443]
Hit:5 http://download.proxmox.com/debian/ceph-squid trixie InRelease          
Hit:6 http://download.proxmox.com/debian/pve trixie InRelease
Error: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/trixie/InRelease  401  Unauthorized [IP: 51.79.228.122 443]
Error: The repository 'https://enterprise.proxmox.com/debian/pve trixie InRelease' is not signed.
Notice: Updating from such a repository can't be done securely, and is therefore disabled by default.
Notice: See apt-secure(8) manpage for repository creation and user configuration details.
root@sakuya:~# 

pve-enterprise.sourcesが残っていた(バージョンアップ中に自動作成された?)
消して

root@sakuya:~# rm -iv /etc/apt/sources.list.d/pve-enterprise.sources 
rm: remove regular file '/etc/apt/sources.list.d/pve-enterprise.sources'? yes
removed '/etc/apt/sources.list.d/pve-enterprise.sources'
root@sakuya:~# 

再実行

root@sakuya:~# apt update
Hit:1 http://deb.debian.org/debian trixie InRelease
Hit:2 http://deb.debian.org/debian-security trixie-security InRelease
Hit:3 http://deb.debian.org/debian trixie-updates InRelease  
Hit:4 http://download.proxmox.com/debian/ceph-squid trixie InRelease
Hit:5 http://download.proxmox.com/debian/pve trixie InRelease
All packages are up to date.    
root@sakuya:~# 

完了!

終わりに

wiki見ながらだから3時間ぐらいかかったけど、振り返るとリポジトリを新しいものにしてコマンド1発で終わる話だった。

今回はProxmoxが1台しか無かったけど、クラスタ組んでHAしながらもやってみたい。

引用など

Discussion