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.
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.
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.
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.
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.
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.
I got the same VirtualBox conflict. Solved it by using ABI different from "x86" (armeabi-v7a in my case)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With