环境为ESXI6.0,虚拟机为Server 2008R2 X64
遇到的问题,以及解决方案,如下。
1. 需要Intel HAWM,但是安装失败了。原因是虚拟机的虚拟化配置没有打开。解决方法:编辑ESXI服务器上的 vi /etc/vmware/config 加入一行 vhv.enable = "TRUE" (最后一行)
libdir = "/usr/lib/vmware"
authd.proxy.nfc = "vmware-hostd:ha-nfc"
authd.proxy.nfcssl = "vmware-hostd:ha-nfcssl"
authd.proxy.vpxa-nfcssl = "vmware-vpxa:vpxa-nfcssl"
authd.proxy.vpxa-nfc = "vmware-vpxa:vpxa-nfc"
authd.fullpath = "/sbin/authd"
vhv.enable = "TRUE"
然后 /etc/init.d/hostd restart 使之生效。 再关闭虚拟机的电源,重启。
2. 安装Interl HAWM还是出错。解决方法是参考https://software.intel.com/en-us/blogs/2013/04/25/workaround-patch-for-haxm-installation-error-failed-to-configure-driver-unknown,手动安装。注意这里有个问题。就是不知道intel怎么搞的,这个驱动的签名有问题。可以看到驱动被安装了,但是无法Load,因为签名的问题。所以还需要开机按F8 - 禁用驱动程序签名。最后用
sc query intelhaxm来确认状态为RUNNING (参见 https://software.intel.com/en-us/blogs/2014/10/20/how-to-ensure-you-are-using-intel-haxm-for-android-emulator)
3. 因为虚拟机的显卡驱动是一个简单的驱动,所以GPU加速不能打开。要在AVD Manager里面禁用Host GPU (取消掉"Use Host GPU“)(参见http://stackoverflow.com/questions/30686324/error-while-running-android-application-could-not-initialize-opengles-emulatio)
这样就能运行了。