2
votes

I'm trying to run an android emulator on a EC2 t2.medium instance with ubuntu. Whe I try to run this:

/home/ubuntu/tools/android-sdk/tools/emulator -engine classic -ports 5724,5725 -report-console tcp:5854,max=60 -avd Samsung_Galaxy_S4_Mini_API_19 -no-snapshot-load -no-snapshot-save -no-window

I get:

sh: 1: glxinfo: not found emulator: WARNING: Ignoring invalid SDCard path: /Users/danielsierraf/.android/avd/Samsung_Galaxy_S4_Mini_API_19.avd/sdcard.img sh: 1: glxinfo: not found emulator: WARNING: Classic qemu does not support SMP. The hw.cpu.ncore option from your config file is ignored. emulator: 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

So I try:

sudo /usr/sbin/kvm-ok

INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

I've read on the internet something about enabling virtualization in BIOS. But I can't do that on EC2, can I? I this really the solution?

1
I'm no expert on this, but I'd look into an HVM image, as that claims to support Intel's virtualization extensions.CommonsWare

1 Answers

4
votes

Well as the error states AWS doesn't support KVM extensions. I found out that this hardware acceleration is required for x86 processors, but not for ARM, so I ended up installing my emulators as armeabi-v7a ABI and it worked. This work is for continuos integration so I don't need it to be super fast.

For those still interested in running a x86 emulator on AWS I also read about Ravello to run the Android Emulator (with Hardware Acceleration) on Amazon EC2.