4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Proxmox上のWindows VMでNested VirtualizationしたWSL2とかがコケる件とその対策

Last updated at Posted at 2023-09-23

はじめに

環境は次の通りです。
ホスト:Proxmox VE 8.0.4
image.png
VM:Windows11 Enterprise Evaluation
image.png

まず最初にホスト側でNested Virtualizationが有効になっているか確認してください。

cat /sys/module/kvm_intel/parameters/nested   

Yが見えれば有効、Nが見えれば無効です。

Nの場合は次のコマンドを実行してください。
Intelの場合

echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf
reboot

AMDの場合

echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf
reboot

再起動後に

cat /sys/module/kvm_intel/parameters/nested   

を実行してYが見えればOKです。
これでもNが見える場合はそもそもネスト仮想化に対応していない可能性があります。
マザーボードの設定を見直したりしてください。

第1段 ブートループ

Proxmox側ですでにNested Virtualizationが有効になっており、対象のVMのCPUはHostになっている状態でした。
Windowsの機能より

  • Windows ハイパーバイザー プラットフォーム
  • Linux用Windows サブシステム

を有効化して再起動した所、起動時にSYSTEM THREAD EXCEPTION NOT HANDLEDと表示された後、修復ブートループへ…
image.png
Proxmox公式フォーラムにてそれっぽい解決策が書かれていたので試した所…
(Proxmoxホストのシェルで実行してください。update-initramfsは2~3分かかるかもしれません。)

echo "options kvm ignore_msrs=1 report_ignored_msrs=0" > /etc/modprobe.d/kvm.conf
update-initramfs -k all -u
reboot

普通に立ち上がるようになり、ひとまずCPUをHostにした場合の無限ブートループは回避できました。
ついでにVM側のタスクマネージャーで仮想マシン:はいとなっていた箇所も仮想化:はいとなっていました。

第2段 Error: 0x80370109

既にUbuntuがアプリケーションに存在していたので起動を試みた所、下記の表示になりました。

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370109
Error: 0x80370109 ???????????????????

Press any key to continue...

これに関しては一旦Ubuntuをアンインストールし、管理者権限で起動したPowerShellから

wsl --install Ubuntu

を実行すると普通に通りました。

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?