22

I have a VirtualBox VM on my computer, the VM is running Windows 7 64bit. I installed Android Studio on that VM. I only have the basic Hello World application. When I try to run AVD I get this message:

Intel HAXM is required to run this AVD. Android Emulator is incompatible with Hyper-V.

Unfortunately, you cannot have Hyper-V running and use the emulator. Here is hat you can do:

1) Start a command prompt as Administrator

2) Run the following command: C:\Windows\system32> bcdedit /set hypervisorlaunchtype off

3) Reboot your machine.

I tried running this command and restart multiple time, doesn't change anything.

I also tried to do some port forwarding : http://paulsdevworld.blogspot.ca/2013/06/make-android-studio-work-with-androvm.html I was unable to connect No connection could be made because the target machine actively refused it.

I've check this question, I'm not having the same issue because OP has a android image directly in VirtualBox Test android app on Virtual Box from Android studio

Anyone knows a way to make this work or something that I could try? Feel free to ask any question.

EDIT: I installed Intel HAXM but when I try to run it I get this message enter image description here

Those are my current settings, virtualization is clearly enabled. Is that the correct settings? enter image description here

Is there any way to make this work in a VM?

Starting a bounty the answer doesn't need to be with Virtual Box but has to be free of cost.

HOST PC host GUEST PC guest

I downloaded the free trial version of VMware and I manage to get it working using those settings below. I tried the exact same settings in VirtualBox and I get the Hyper-V error. settings screenshot

SOLUTION:

If anyone is wondering I was able to run it in Virtual Box. This is the settings I used on the AVD: Solution Warning slow.

Community
  • 1
  • 1
phil652
  • 1,484
  • 1
  • 23
  • 48
  • Latest Android Studio targets only API 26 or 27. There isn't a corresponding arm image, last one is 25. So VirtualBox etc doesn't seem workable. – James_UK_DEV Mar 07 '18 at 13:49
  • @James_UK_DEV You can use an older Android Studio version. I'm running version 2.2.2 right now – phil652 Mar 13 '18 at 15:21
  • Installed latest on main machine and hoped for the best. Worked fine. I think a couple of pages suggested the older versions weren't available to try and put you off. – James_UK_DEV Mar 16 '18 at 09:30
  • https://stackoverflow.com/questions/32308519/intel-haxm-installation-error-in-vmware try this – Wikki Aug 20 '18 at 15:10

7 Answers7

5

The below process works if your system supports Intel Virtualization Technology (VT-x):

  1. Go to BIOS using F10 on Boot-up.
  2. Go to System Configuration/System Settings.
  3. Enable Virtualization Technology.
  4. Press F10 to Save and Exit.
  5. Reboot and your VT-x should be working.
Sneh Pandya
  • 8,197
  • 7
  • 35
  • 50
  • 1
    I'm pretty sure VT-x feature is not for the guest OS, but for the host OS. I could be wrong. – phil652 Feb 13 '17 at 16:58
  • Enabling VT-x from BIOS supports Host OS as well as Guest OS. – Sneh Pandya Feb 13 '17 at 17:48
  • It's already enable. I updated my question to show that it doesn't work on the guest pc – phil652 Feb 14 '17 at 15:39
  • Virtualization Technology for Guest PC can also be enabled from Virtual Machine Softwares like VMWare or VirtualBox once its enabled from BIOS. – Sneh Pandya Feb 14 '17 at 17:29
  • What about the turn off Hyper-V issue, how do I fix that? – phil652 Feb 14 '17 at 19:44
  • Go to Control Panel -> Programs and Features -> Turn Windows features on or off from **left pane** and enable/disable Hyper-V options. – Sneh Pandya Feb 14 '17 at 19:46
  • This option is not available in my host and guest PC. Also I updated my question, I got it to work in VMware but I still have the same issue in VirtualBox – phil652 Feb 14 '17 at 22:14
  • Check your system specifications on Intel website & if it supports Hyper-V, download the compatible Hyper-V installer from Intel website itself. – Sneh Pandya Feb 15 '17 at 04:16
  • Can't find Hyper-V on the Intel website, Hyper-V is a Microsoft product. – phil652 Feb 16 '17 at 21:16
  • Which edition of Windows are you using? "Home" version doesn't support Hyper-V at all. All other PC versions support Hyper-V only if they have 64-Bit architechture. Verify here: https://en.wikipedia.org/wiki/Windows_10_editions#Comparison_chart – Sneh Pandya Feb 17 '17 at 07:35
  • Host is running Windows 7 Enterprise and guest is Windows 7 pro – phil652 Feb 17 '17 at 14:09
  • Is host 64-bit OS? Is your processor 64-bit? – Sneh Pandya Feb 17 '17 at 17:55
  • Yes both 64bit. – phil652 Feb 17 '17 at 17:55
  • Maybe Android is also refusing Hyper-V to be used, you can try downloading a pre-configured VM file and directly load it and use it instead of configuring one. – Sneh Pandya Feb 17 '17 at 18:03
4

Read this post from virtual box as well and see if it applies to your situation please. :) https://forums.virtualbox.org/viewtopic.php?f=6&t=69076. If this is the case I'm afraid that as you requested there would be no free option, as you may have to go for a software such as VMWare which is license based.

What you could otherwise do is not use Intel HAXM inside your existing VirtualBox. That is by using an Android image that does not need hardware acceleration. This is because it is not possible to run two different emulation stacks on your processor at the same time. So since you are already running Virtual Box it would be better to use an emulator that does not need hardware acceleration. You could refer this post: Can I run an emulator without HAXM in Android Studio? if you like. Cheers

EDIT: phil did you try this? It would seem like the only viable option since VMWare isn't free

imaadhrizni
  • 428
  • 4
  • 11
1

I had the same issue, solved it by Installing the Intel Hardware Accelerated Execution Manager. Download it with the SDK Manager, it's in Extras. After this, go to the folder

[Android SDK Root]\extras\intel\Hardware_Accelerated_Execution_Manager

then run IntelHaxm.exe and install.

Here the link of the Intel Hardware Accelerated IntelHaxm.exe for Microsoft Windows,Mac OS* X, and Linux Ubuntu

enter image description here

You'll get the following message if you don't have virtualization enabled in your BIOS:

enter image description here

sumeet
  • 305
  • 9
  • 24
1

enable intel virtualization in bios

enter image description here

rohit salaria
  • 196
  • 1
  • 13
1

if you've already enabled VT-x in the BIOS setting, make sure that you have installed intel haxm that comes with android sdk. If you haven't install it yet, you can open your SDK manager and install it from there or you can download it from this https://dl-ssl.google.com/android/repository/extras/intel/addon/haxm-windows_r6_0_5.zip, unzip it to extras folder in your android sdk then install.

iamLinker
  • 88
  • 1
  • 10
  • Oh my bad, please remove 'addon" from the link and it will automatically download intel haxm https://dl-ssl.google.com/android/repository/extras/intel/haxm-windows_r6_0_5.zip – iamLinker Feb 16 '17 at 17:46
  • I get VT not supported error. Look at @sumeet screenshot. – phil652 Feb 16 '17 at 18:07
1

You can also try GenyMotion intead of AVD. It has better performance than AVD. It's free if you use it non-commercially. GenyMotion uses Virtual Box, you can check if VB working properly.

Thracian
  • 43,021
  • 16
  • 133
  • 222
  • Does it has the same functionality as AVD? Is it easy to setup? – phil652 Feb 17 '17 at 14:29
  • Yes, it may have more functionality than AVD, i haven't used AVD more than 6 months. It was definitely faster than AVD and consumes less CPU and your app starts faster. You can install Play Store to it, use it's phony camera to test, battery or location features. These are the most i use. It has a bundled setup like any other Windows program. After setup, you create Virtual devices using it's interface and add GM's plugin to Android Studio, select device from program's or plugin's interface. That's it. It's easy, and with better performance. – Thracian Feb 17 '17 at 15:17
0

If you are Not in situation to Enable Intel-VT from BIOS menu, You should use Different processors for your VM, like ARM or 32 bit processors. cause Intel-VT let's you use 64bit VMs.

Mahdi-Malv
  • 16,677
  • 10
  • 70
  • 117
  • It's enabled, can you give more details about using different processors, like which one and what else need to be setup to get it working? – phil652 Feb 16 '17 at 21:09