netblue30 / firejail

Linux namespaces and seccomp-bpf sandbox
https://firejail.wordpress.com
GNU General Public License v2.0
5.68k stars 556 forks source link

Cannot start android emulator in firejail when virtualbox is running (KVM) #6188

Open esp13 opened 7 months ago

esp13 commented 7 months ago

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

kmk3 commented 7 months ago

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:

rusty-snake commented 7 months ago

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?