Android emulator and virtualbox cannot run at same time

前端 未结 13 1013
無奈伤痛
無奈伤痛 2020-11-30 23:37

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) f         


        
相关标签:
13条回答
  • 2020-12-01 00:18

    This might be out of topic, due to the fact that OP requested VirtualBox + KVM in the same time, but still, it might be the workaround: I was looking for a way to launch Windows 7 and AVD on Ubuntu 18.10 x64. Turning off KVM is not an option due to the fact that performance of AVD is critical to me. I have installed Windows 7 via Virtual Machine Manager (virt-manager package) and now both the AVD and Windows 7 are hardware accelerated.

    0 讨论(0)
  • 2020-12-01 00:21

    You also can change CPT/ABI setting from x86 to arm in emulator settings.

    0 讨论(0)
  • 2020-12-01 00:21

    Another solution is to use libvirt backed vagrant using vagrant-libvirt plugin.

    0 讨论(0)
  • 2020-12-01 00:24

    There is finally a fix for this.

    Follow these steps for macOS:

    1. In Android Studio Go to Tools -> Android -> SDK Manager

    2. Confirm you have the latest version of Intel Emulator Accelerator HAXM installed (v6.1.1) .

    3. Go to the extras directory of the Android SDK location displayed in the preferences. On MacOS you can do this:

      open ~/Library/Android/sdk/extras

    4. Install the HAXM packing by opening IntelHAXM_6.1.1.dmg, then opening IntelHAXM_6.1.1.mpkg in the mounted folder, and following the installer instructions.

    Follow these steps for Windows:

    1. In Android Studio Go to Tools -> Android -> SDK Manager

    2. Confirm you have the latest version of Intel Emulator Accelerator HAXM installed (v6.1.1) .

    3. Go to the extras directory of the Android SDK location displayed in the preferences. Something like:

      C:\Users\<username>\AppData\Local\Android\sdk\extras

    4. In that directory is some kind of file like intelhaxm-android.exe. Run it.

    0 讨论(0)
  • 2020-12-01 00:27

    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.

    0 讨论(0)
  • 2020-12-01 00:27

    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.

    0 讨论(0)
提交回复
热议问题