wa-avd-docker
wa-avd-docker copied to clipboard
mknod: missing operand after '10'
I just did
- git clone
- docker-compose up -d
- connected via http://localhost:6080 with credentials root/secret
- I can see desktop(empty) -> Opened LXTerminal
- /app/entrypoint.sh
Seems can't create /dev/kvm with mknod
Please explain how i can run emulator with Pixel device..
Used Versions:
- Ubuntu 18.04
- Docker version 18.09.0, build 4d60db4
- docker-compose version 1.23.1, build b02f1306
Thank you
Tried with
docker run --privileged -p 6080:80 -e VNC_PASSWORD=secret -e HTTP_PASSWORD=secret docker-android
can not create /dev/kvm, tried that script https://github.com/kevinwallace/qemu-docker/blob/master/kvm-mknod.sh not helped...
Hi @kenanduman1988. Does manually running start-avd.sh
throw any similar errors? I haven't come across this before. Will see what I can find. I also haven't run/updated the project in a while, so maybe I need to check on package versions.
So I just tested it on my system without any issues. entrypoint.sh
is run when building the Docker image, you should run start-avd.sh
once you're in the graphical session - let me know if that works.
cd /app ./start-avd.sh
Not helped
same problem here
Here's the issue. The KVM driver seems to be missing. I'm a bit out of context, so will try investigate why that may be the case.
root@8d1f203c0c13:~# cd /app/
root@8d1f203c0c13:/app# ls
avd.desktop sdk-tools-linux-4333796.zip start-avd.sh
entrypoint.sh snapshots whatsapp.apk
root@8d1f203c0c13:/app# ./entrypoint.sh
mknod: missing operand after '10'
Try 'mknod --help' for more information.
root@8d1f203c0c13:/app# vim entrypoint.sh
bash: vim: command not found
root@8d1f203c0c13:/app# vi entrypoint.sh
root@8d1f203c0c13:/app# $(grep '\<kvm\>' /proc/misc | cut -f 1 -d' ')
root@8d1f203c0c13:/app# echo $(grep '\<kvm\>' /proc/misc | cut -f 1 -d' ')
root@8d1f203c0c13:/app# cat /proc/misc
55 rfkill
237 loop-control
200 tun
56 vboxnetctl
57 vboxdrvu
58 vboxdrv
235 autofs
236 device-mapper
249 zfs
59 memory_bandwidth
60 network_throughput
61 network_latency
62 cpu_dma_latency
228 hpet
231 snapshot
63 vga_arbiter
root@8d1f203c0c13:/app#
how I can call the shell of docker in my command line?
For the above shell, I accessed it from within the VNC session, at localhost:6080. Otherwise you could maybe go directly through the Docker process: e.g. docker exec -it <container name> /bin/bash
okay, thanks
I have the same issue
Okay, so something I really didn't know much about is that Docker containers share the host kernel and kernel modules... So that's the root of the issue I think.
What kernel version are you using @Nottt ?
See the following issues, which might lead to a work-around. My guess is that when I had this setup working, I had the kernel and modules all configured on host machine.
- https://stackoverflow.com/questions/33013539/docker-loading-kernel-modules
- https://forums.docker.com/t/kvm-module-is-not-loaded-in-container/50928
- https://forum.proxmox.com/threads/lxc-docker-containerd-cannot-find-lib-modules-4-15-18-9-pve.49406/
For reference, this is where I got the qemu-kvm setup code originally: https://github.com/sivaramsk/docker-kvm
I'm unfortunately running NixOS which complicates things slightly with loading the host kernel modules into the Docker container, but you could try something like binding the host modules -v /lib/modules:/lib/modules
.
I'm using Ubuntu 18.04 with 5.1.9-050109-generic
and haven't installed anything related to kvm, qemu or similar to host.
I'll try to play around again later
I'm 99% certain this is happening because the host machine does not have VT turned on in the bios.
If you'd like to check I found this helpful: https://stackoverflow.com/questions/11116704/check-if-vt-x-is-activated-without-having-to-reboot-in-linux
@smashah I see you forked the repo, let us know if you have any luck :) I'm pretty sure I have virtualization enabled though, but will double check I wasn't testing on a different machine.
My guess is still some sort of incompatibility between the host kernel version/modules and the container setup.
I have tried this on two servers at home. One has VT on and one doesn't. It worked fine on the one with VT on. This error popped up on the one without VT. Both Ubuntu 18.04.
I got it running ok, however it's temperamental to say the least. This finding is not unique to this image though as the same issues arise with budtmo/docker-android
I forked for the purpose of trying to implement v42loopback within the container itself (which I can then add an implementation of my library - sulla-hotfix).
The avd isn't reliable on the working host as when I hit the home button the avd crashes. Maybe time to upgrade the hardware (intel i5 nuc).
I've looked into genymotion but it's pretty expensive however it's reliable. I think there needs to be a concerted community effort to reverse engineer genymotion in order to build a reliable docker avd base image.
Can you walk me through the hardware on your host and it's actual performance?
Thanks for the legwork on this project @BenSchZA
had same issue, please verify first if /dev/kvm exists on host if not virtualization is most likely not enabled, in my case i had to enable virtualization support again (was disabled via bios update) with a amd cpu enter bios then go to “Advanced” > “CPU Configuration”. Go to “SVM Mode” and select “Enabled"