Currently new to google cloud
and working on vm.
Can anyone help me how can i use android emulator on vm.
it shows me
Emulator: emulator: ERROR: x86 emulation currently requires hardware acceleration!
now how can i enable hardware acceleration on vm??

- 27,060
- 21
- 118
- 148

- 21
- 1
- 6
-
did you enabled Hardware Virtualization from BIOS settings....? – VikaS GuttE Feb 24 '19 at 07:10
-
but how can i reach to BIOS setting on VM?? – Samar Khan Feb 24 '19 at 07:14
-
which laptop model you are using? – VikaS GuttE Feb 24 '19 at 07:15
-
lenovo G50 series – Samar Khan Feb 24 '19 at 07:17
-
but I'm working on google cloud VM – Samar Khan Feb 24 '19 at 07:18
-
Check this steps to enable VM from BIOS https://amiduos.com/support/knowledge-base/article/enabling-virtualization-in-lenovo-systems – VikaS GuttE Feb 24 '19 at 07:21
2 Answers
First of all you can not access BIOS on Google Compute Engine VM. When you restart the instance you will be automatically disconnected from the SSH session. As soon as you open another SSH session again you will be already logged in to the os.
Android Studio Emulator is another Virtual Machine that emulates the operation of an Android device. So what you are looking for is VM nested inside a Google Compute Engine VM, you can refer to the Enabling Nested Virtualization for VM Instances documentation, for further information.
However, you can use arm64-v8a or armeabi-v7a ABI. They are pretty slow but you will be able to test your applications there. You can make them faster, but it will require a powerful VM that will cost a lot of money. To use those images in Android Studio emulator:
- Go to
Tools > AVD Manager
. - On the bottom left corner click on
+ Create Virtual Device ...
. - In
Choose a device definition
, choose any device you want and clickNext
- In
Select a system image
go toOther images
tab - Choose any
arm64-v8a
orarmeabi-v7a
ABI. (Download if you don't have one) - Click on
Next
, give a name and clickFinish
Run the Virtual Device and give it some time, according to how powerful is your VM it will take some time to load. You will see an Android logo loading and after few minutes you will see the Home Screen. If it takes too long, try restarting the AVD and the Android Studio, then leave it some time to load. It is pretty slow, but it is working, I tested it myself.

- 27,060
- 21
- 118
- 148

- 2,735
- 1
- 14
- 21
Try below steps -
Open SDK Manager (In Android Studio, go to
Tools > Android > SDK Manager
) and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.Now go to your SDK directory
C:\users\%USERNAME%\AppData\Local\Android\sdk\extras\intel\Hardware_Accelerated_Execution_Manager\
and run the file named intelhaxm-android.exe.
In case you get an error like "Intel virtualization technology (vt, vt-x) is not enabled"
. Go to your BIOS settings and enable Hardware Virtualization
.
- Restart Android Studio and then try to start the AVD again.

- 1,636
- 2
- 14
- 38
-
-
error like "Intel virtualization technology (vt,vt-x) is not enabled" – Samar Khan Feb 24 '19 at 07:39
-
-
-
Switch off your VM and start again while starting Press Enter button continuously that might move you to BIOS or you can check this https://groups.google.com/forum/#!topic/gce-discussion/Z98riBTFF50 – VikaS GuttE Feb 24 '19 at 07:56
-
@VikaS From what I understand of Google VMs and Windows server, it's SSH based unless it's accessed directly. You can't go into BIOS using SSH with any of the normal techniques because the SSH server starts later, along with any other remote access software. While this is correct, it can't be applied to this case. – Zoe Feb 26 '19 at 11:36
-
This is an uncredited copy of [this old post from 2015](https://stackoverflow.com/a/27997670/1103872). – Marko Topolnik Apr 17 '19 at 18:57