与 VirtualBox 机器一起运行 Android Emulator

Gab*_*yer 7 virtualization android virtualbox virtual-machine android-emulator

我使用的是 Windows 10 1903,需要在使用 Android Emulator 时运行 Linux VM。我使用的是 AMD Ryzen 5 3600x CPU。

如果我禁用 Windows 管理程序平台,VM 可以工作,但模拟器不工作(除了 arm 图像,我相信,但我没有测试过它们,因为它们的性能并不理想)。

VirtualBox 似乎最近对此提供了一些支持,但最新的 Windows 更新根据线程破坏了它。

显然,不幸的是,使用 Genymotion 模拟器是一种选择,但不是免费的。切换到 Linux 也不是一种选择。

有没有办法在不依赖手臂图像的情况下做到这一点?任何想法将不胜感激,因为我已经在这方面花费了太多时间。

对于更多上下文,vm 日志显示以下消息(感兴趣):

00:00:01.324766 ********************* End of CFGM dump **********************
00:00:01.324820 HM: HMR3Init: Attempting fall back to NEM: AMD-V is not available
00:00:01.353579 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
00:00:01.353588 NEM: WHvCapabilityCodeExtendedVmExits      = 0x0000000000000007
Run Code Online (Sandbox Code Playgroud)

并最终:

00:00:01.354665 NEM: Adjusting APIC configuration from X2APIC to APIC max mode.  X2APIC is not supported by the WinHvPlatform API!
00:00:01.354667 NEM: Disable Hyper-V if you need X2APIC for your guests!
Run Code Online (Sandbox Code Playgroud)

我假设这与 Hyper-V 占用了所有 AMD-V 使用能力有关,或者在这种情况下是 Windows 管理程序平台,因为这是唯一启用的 Windows 虚拟化功能。

Gab*_*yer 1

另一种方法是使用Google新发布的AMD Hypervisor 模拟器。

我花了一段时间才找到它,但它使您不需要 Hyper-V 或 WHP,很好地解决了这个问题。性能似乎也与 HAXM 相当。