Android emulator and virtualbox cannot run at same

2019-01-08 10:38发布

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.

12条回答
等我变得足够好
2楼-- · 2019-01-08 10:42

I had the same problem on Ubuntu 13.10. Try to remove kvm and kvm_intel kernel modules.

To do this:

  1. Stop all emulators.
  2. Run command: 'sudo rmmod kvm_intel kvm'

Without these kernel modules Virtualbox and Android emulators can work at the same time.

BTW, I do not know why the modules are loaded.

查看更多
smile是对你的礼貌
3楼-- · 2019-01-08 10:49

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

查看更多
三岁会撩人
4楼-- · 2019-01-08 10:59

In some cases, we need to keep virtualbox machines up and running therefore let all the virtualbox machines keep running, switch to physical mobile device to test your application instead of emulator.

you can use expo if you are doing with react-native or your real android/ios device.

查看更多
劳资没心,怎么记你
5楼-- · 2019-01-08 11:00

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.

查看更多
小情绪 Triste *
6楼-- · 2019-01-08 11:00

I stopped the virtual machines I had running with VirtualBox. This made the error disappear.

查看更多
神经病院院长
7楼-- · 2019-01-08 11:01

I finally made this problem obsolete by using Genymotion instead of the standard Android emulator. Besides not having this conflict, it is several times faster than the normal emulator.

查看更多
登录 后发表回答