Android emulator and virtualbox cannot run at same time

前端 未结 13 1011
無奈伤痛
無奈伤痛 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:07

    I resolved it by installing HAXM 6.1.2.

    Please refer to the following link for details :- https://forums.docker.com/t/cant-using-docker-for-mac-with-android-emulator-haxm/8939/11

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

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

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

    Though it's a workaround either, but definitely better than disabling KVM as everyone suggesting.

    Just run the virtualbox guest in KVM instead. For example (kvm here is just a script running a qemu-system-x86_64 -enable-kvm):

    kvm Win7.vdi -boot c -m 2G -vga qxl
    
    0 讨论(0)
  • 2020-12-01 00:12

    Here is how solved this issue, using vagrant and it's two plugins 'libvirt' and 'mutate':

    1. Open terminal and set environment variables:

       export VAGRANT_DEFAULT_PROVIDER=libvirt
       export VAGRANT_HOME=/home/directoryToStoreVagrant/
       VBoxManage list vms
      
    2. Now copy the a the code obtained from last command like "c1530713-aec2-4415-a6b5-b057928c7e5f" and use in the following:

      vagrant package --base c1530713-aec2-4415-a6b5-b057928c7e5f --output window7.box

       vagrant init window7
       vagrant up window7 --provider=libvirt 
       vagrant box list
      
    3. You need to install some vagrant plugins like libvirt and mutate. Mutate will convert .box to libvirt VM:

      vagrant plugin install vagrant-libvirt vagrant plugin install vagrant-mutate

    4. Converting vagrant box to libvirt:

      vagrant mutate window7_.box libvirt

    5. Now you can initialise the vagrant VM. If any error persist move to edit your Vagrant file. Like for me I uncomment the line starts with config.vm.network and then run command below:

      vagrant up --provider=libvirt

    This is how I was able get rid of this error completely

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

    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.

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

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

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