Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/dev/kvm not working #5

Open
amitg25 opened this issue Apr 15, 2019 · 1 comment
Open

/dev/kvm not working #5

amitg25 opened this issue Apr 15, 2019 · 1 comment

Comments

@amitg25
Copy link

amitg25 commented Apr 15, 2019

Hello,
I was follow most steps listed here but it seems below command is not working for me.

docker run -it --rm --device /dev/kvm -p 5554:5554 -p 5555:5555 thedrhax/android-avd

I am on MacOS X.
After googleing around i found that i need a KVM ubutu machine to resolve this machine but not sure what are the steps i should take to resolve this issue on MacOS X. So far i have done following steps

  1. Install VirtualBox with ubutu image.
  2. Again tried above given docker command but with no help.

Can you please help resolve this? Or guide what is required to resolve this issue.

@TheDrHax
Copy link
Member

Hi,

  1. It won't work in virtual machine because VirtualBox doesn't support nested hardware-accelerated virtualization. There are other virtual machines that support passing VT-x extension to their guests but it would be very inefficient setup (VM inside VM);

  2. To start AVD on your host you need to make sure that /dev/kvm exists. If it doesn't, you will need to enable VT-x and install/enable Intel HAXM. These answers may help;

  3. If Docker runs natively on macOS, it should be possible to mount /dev/kvm into container the same way as on Linux (--device /dev/kvm). However, I don't have any devices with macOS, so I can't test it myself;

  4. This container is more suitable for headless setups on Linux servers. On desktop you might want to use AVD without Docker (directly or via Android Studio). It will have the same functionality as well as faster UI and more flexibility.

Hope this helps,
Dmitry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants