netblue30 / firejail

Linux namespaces and seccomp-bpf sandbox

Home Page:https://firejail.wordpress.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot start android emulator in firejail when virtualbox is running

esp13 opened this issue · comments

Is your feature request related to a problem? Please describe.

When I have virtualbox already in use and I try to run android emulator through firejail with android studio profile, I get this error:

ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy
qemu-system-x86_64: failed to initialize KVM: Device or resource busy
WARNING | QEMU main loop exits abnormally with code 1

Describe the solution you'd like

I would like to have both virtual box and a firejailed android emulator running at the same time on the same computer
No idea how do do this.
I can run multiple virtualbox on same computer so I guess it's technically possible to run android emulator and virtualbox at the same time.

Describe alternatives you've considered

I will try to run both virtualbox and android emulator through firejail, but not sure this would resolve the error.

Additional context

Linux Mint 20.3
Firejail version 0.9.72

When I have virtualbox already in use and I try to run android emulator
through firejail with android studio profile, I get this error:

ioctl(KVM_CREATE_VM) failed: 16 Device or resource busy
qemu-system-x86_64: failed to initialize KVM: Device or resource busy
WARNING | QEMU main loop exits abnormally with code 1

Does it work if:

  • Both programs are executed without firejail?
  • KVM is disabled in the android emulator?
  • An architecture other than x86_64 is used in the android emulator?

https://developer.android.com/studio/run/emulator-acceleration#vm-accel-restrictions

Depending on your operating system and hypervisor, you may not run software that uses another virtualization technology at the same time that you run a VM-accelerated emulator.

Did you make sure this is caused by firejail? Did you tried with --noprofile?