Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android emulator and virtualbox cannot run at same time

Whenever I have Virtualbox running, I cannot start an Android emulator image (and vice versa). The error message in the AVD manager is

ioctl(KVM_CREATE_VM) failed: Device or resource busy ko:failed to initialize KVM 

How can I make both run at the same time?

That is a Ubuntu 64 bit, all involved software is of the latest released version.

like image 960
Bananeweizen Avatar asked Apr 23 '13 11:04

Bananeweizen


People also ask

Can you run android emulator on virtual machine?

Android Emulator allows you to run emulations of Android devices on Windows, macOS or Linux machines. The Android Emulator runs the Android operating system in a virtual machine called an Android Virtual Device (AVD). The AVD contains the full Android software stack, and it runs as if it were on a physical device.

How do I open an Android emulator in a separate window?

To run the emulator in a separate window instead go to File > Settings > Tools > Emulator (Android Studio > Preferences > Tools > Emulator on macOS) and deselect Launch in a tool window.

Can you use an emulator on a virtual machine?

The emulator is running a system image created for an x86-based virtual device. You can't run a VM-accelerated emulator inside another VM, such as a VM hosted by VirtualBox, VMware, or Docker (unless using WSL2). You must run the Android emulator directly on your system hardware.

Can VirtualBox emulate Android?

All you need to do is to install your chosen version of Android on a normal virtual machine or VM using VirtualBox. Simply follow the steps below and you'll have Android up and running in no time.


2 Answers

Removing the kvm kernel modules (using 'sudo rmmod kvm_intel kvm') makes it possible to run the Virtualbox and the Android emulator at the same time but the performance of the Android emulator in such a setup is extremely bad. If possible it is better to shutdown the Virtualbox emulator and unload its driver (vboxdrv) by running 'sudo /etc/init.d/vboxdrv stop'. Google suggests this "solution" on its Android Emulator page in the section about Linux.

like image 124
traber Avatar answered Sep 19 '22 12:09

traber


I got the same VirtualBox conflict. Solved it by using ABI different from "x86" (armeabi-v7a in my case)

like image 29
Stanislav Makarenko Avatar answered Sep 22 '22 12:09

Stanislav Makarenko