为什么安装 kvm 后出现 dev/kvm : No such device?

问题描述 投票:0回答:1

我在 Windows 上的 WSL Ubuntu 22.04.3 LTS 上运行模拟器时遇到错误

当我已经在 ubuntu 服务器中安装了 kvm 并尝试创建 avd 设备时,出现了错误。

lsmod | grep kvm
不发射任何东西。

modprobe kvm_intel
modprobe kvm_amd
成功运行但没有结果。

$ lsmod | grep kvm
$ dmesg | grep kvm
[    1.396487] kvm: no hardware support
[    1.396493] kvm: no hardware support
$ modprobe kvm_intel
$ modprobe kvm_amd

创建 AVD 设备

$ avdmanager create avd -n device \
--device pixel -k "system-images;android-33;google_apis_playstore;x86_64

运行 AVD 设备

$ emulator @device
INFO    | Storing crashdata in: /tmp/android-noid/emu-crash-34.2.15.db, detection is enabled for process: 9068
INFO    | Android emulator version 34.2.15.0 (build_id 11906825) (CL:N/A)
INFO    | Found systemPath /home/noid/.android_sdk/system-images/android-33/google_apis_playstore/x86_64/
INFO    | Storing crashdata in: /tmp/android-noid/emu-crash-34.2.15.db, detection is enabled for process: 9068
INFO    | Duplicate loglines will be removed, if you wish to see each individual line launch with the -log-nofilter flag.
INFO    | Increasing RAM size to 2048MB
ERROR   | x86_64 emulation currently requires hardware acceleration!
CPU acceleration status: Could not open /dev/kvm : No such device
More info on configuring VM acceleration on Linux:
https://developer.android.com/studio/run/emulator-acceleration#vm-linux
General information on acceleration: https://developer.android.com/studio/run/emulator-acceleration.
android linux kvm
1个回答
0
投票

WSL 不支持 KVM 所需的嵌套虚拟化。您可以使用完整的 VM 或双启动来支持 KVM。

© www.soinside.com 2019 - 2024. All rights reserved.