Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run android emulator x86 using Docker under Mac OS

I installed docker.app on the my and I want to start up android x86 emulator in the docker image.
Unfortunately I met the following error(s) while trying to start the emulator. (emulator @nexus7)

ERROR: x86 emulation currently requires hardware acceleration!
Please ensure KVM is properly installed and usable.
CPU acceleration status: KVM requires a CPU that supports vmx or svm

Given my Mac OS actually seems to support vmx, how could I startup android x86 emulator?

like image 614
Caroline Li Avatar asked Feb 09 '18 08:02

Caroline Li


1 Answers

The way I've managed to do this (for now) is somewhat convoluted: I've set up an ubuntu vm in Parallels and enabled "nested virtualization"

enter image description here

With that setting I've managed to spin up and run our Android UI tests via docker on a Mac.

I've yet to figure out how to do that without the additional Parallels VM layer.

like image 144
sas Avatar answered Sep 28 '22 11:09

sas