HAXM不支持嵌套虚拟机GCP [英] HAXM does not support nested virtual machines GCP

查看:104
本文介绍了HAXM不支持嵌套虚拟机GCP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的android开发环境(GCP Compute Engine Windows服务器虚拟机)上使用Android虚拟设备(AVD).

I am trying to use an Android virtual device (AVD) on my android development environment which is a GCP Compute Engine Windows server Virtual Machine.

当我尝试创建虚拟android设备时,我得到一条建议,指出:

When I try to create a virtual android device I get a recommendation that states:

HAXM不支持嵌套虚拟机

HAXM does not support nested virtual machines

如何在GCP Windows Server VM的侧面创建Android虚拟设备?

How can I create an Android virtual device in side of my GCP Windows Server VM?

Google跟踪器问题

推荐答案

这确实是一个很难解决的问题. Preet Parekh ,我终于想出了一个解决方案.结果非常好.借助Cloud的强大功能,我们可以在1秒内完成第一个Gradle构建!

This was indeed a hard problem to solve. Preet Parekh and I finally came up with a solution for this. The results were extremely wonderful. With the power of Cloud, we could do the first Gradle Builds in just 1 second!!

解决方案的依据

因此,GCP或任何其他云支持者都无法为您提供创建嵌套虚拟机的能力.默认情况下,它已被阻止,因此Android Studio可以工作,但您将无法运行AVD,这没什么用.

So, GCP or for that matter any other cloud supporter will not provide you the ability to create nested virtual machines. It is blocked by default so the Android studio would work but you would not be able to run an AVD, that’s not much useful.

因此,我们为VM使用不同的体系结构以支持嵌套虚拟化.

So, we use a different architecture for the VMs to support nested virtualization.

在GCP中,只能为在Haswell处理器或更高版本上运行的L1 VM启用嵌套虚拟化.如果区域的默认处理器是Sandy Bridge或Ivy Bridge,则可以使用最少的CPU选择为特定实例选择Haswell或更高版本.

In GCP Nested virtualization can only be enabled for L1 VMs running on Haswell processors or later. If the default processor for a zone is Sandy Bridge or Ivy Bridge, you can use minimum CPU selection to choose Haswell or later for a particular instance.

这意味着您只能在以下操作系统上允许嵌套虚拟化

Which means you can only allow nested virtualization on the following OSes

为此,您将在创建虚拟机时添加以下许可证-

To allow this you would then add the following license while VM creation-

https://compute.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx

这只是您要做的一小段以及所涉及的主要步骤,但是,我强烈建议您阅读 Preet 和我提供了逐步操作指南.准备在1秒钟内完成Gradle构建!

This was just a short just of what you would do and the major steps involved, however, I highly recommend you to read this blog by Preet and me which provides a step by step guide to doing so. Get ready to do Gradle builds in 1 second!!

这篇关于HAXM不支持嵌套虚拟机GCP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆