我一直在 Windows 10 上使用 qemu。我发现 HAXM 加速器速度很慢(对我来说,其性能与 TCG 相同),我想要更好的体验。我发现 qemu 支持 WHPX,使用-M accel=whpx
。我启用了 Windows Hypervisor Platform 以及 Windows 功能中 Hyper-V 类别中的所有内容,然后重新启动了机器。我尝试使用 whpx 运行 qemu,但出现此错误:
qemu-system-x86_64: WHPX: No accelerator found, hr=00000000
qemu-system-x86_64: failed to initialize whpx: No space left on device
以下是systeminfo的相关部分:
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19043 N/A Build 19043
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
System Manufacturer: Micro-Star International Co., Ltd.
System Model: MS-7C89
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 165 Stepping 3 GenuineIntel ~3600 Mhz
BIOS Version: American Megatrends Inc. 1.50, 21/07/2020
Windows Directory: C:\Windows
System Directory: C:\Windows\system32
Boot Device: \Device\HarddiskVolume2
System Locale: en-us;English (United States)
Input Locale: en-us;English (United States)
Total Physical Memory: 16,320 MB
Hotfix(s): 5 Hotfix(s) Installed.
[01]: KB5007289
[02]: KB5000736
[03]: KB5008212
[04]: KB5007273
[05]: KB5005699
Network Card(s): 7 NIC(s) Installed.
Hyper-V Requirements: VM Monitor Mode Extensions: Yes
Virtualization Enabled In Firmware: Yes
Second Level Address Translation: Yes
Data Execution Prevention Available: Yes
我需要自己重建 qemu 吗?注意:我使用了这个安装文件:https://qemu.weilnetz.de/w64/qemu-w64-setup-20211215.exe
答案1
最有可能的是虚拟机管理程序的启动被禁用。它可能已安装,但需要在启动时启动。在管理员命令提示符中使用此命令,然后重新启动。这将强制 Windows 在每次启动时启动虚拟机管理程序。
bcdedit /set hypervisorlaunchtype on