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

mknod: missing operand after '10' #2

Open
kenanduman1988 opened this issue Dec 11, 2018 · 18 comments
Open

mknod: missing operand after '10' #2

kenanduman1988 opened this issue Dec 11, 2018 · 18 comments

Comments

@kenanduman1988
Copy link

kenanduman1988 commented Dec 11, 2018

I just did

  1. git clone
  2. docker-compose up -d
  3. connected via http://localhost:6080 with credentials root/secret
  4. I can see desktop(empty) -> Opened LXTerminal
  5. /app/entrypoint.sh

Seems can't create /dev/kvm with mknod

entrypoint_not_work

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

@kenanduman1988
Copy link
Author

kenanduman1988 commented Dec 11, 2018

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...

@BenSchZA
Copy link
Member

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.

@BenSchZA
Copy link
Member

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.

@kenanduman1988
Copy link
Author

screencapture-localhost-6080-2019-01-21-19_45_09 1

cd /app
./start-avd.sh

Not helped

@sealabr
Copy link

sealabr commented Oct 8, 2019

same problem here

@BenSchZA
Copy link
Member

BenSchZA commented Oct 8, 2019

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# 

@sealabr
Copy link

sealabr commented Oct 8, 2019

how I can call the shell of docker in my command line?

@BenSchZA
Copy link
Member

BenSchZA commented Oct 8, 2019

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

@sealabr
Copy link

sealabr commented Oct 8, 2019

okay, thanks

@Nottt
Copy link

Nottt commented Nov 24, 2019

I have the same issue

@BenSchZA
Copy link
Member

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.

@BenSchZA
Copy link
Member

For reference, this is where I got the qemu-kvm setup code originally: https://github.com/sivaramsk/docker-kvm

@BenSchZA
Copy link
Member

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.

@Nottt
Copy link

Nottt commented Nov 28, 2019

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

@smashah
Copy link
Member

smashah commented Jan 3, 2020

I'm 99% certain this is happening because the host machine does not have VT turned on in the bios.

@BenSchZA
Copy link
Member

BenSchZA commented Jan 4, 2020

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.

@smashah
Copy link
Member

smashah commented Jan 4, 2020

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

@xeniter
Copy link
Contributor

xeniter commented Dec 20, 2020

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"

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

6 participants