Giter Site home page Giter Site logo

Comments (18)

kritarthh avatar kritarthh commented on August 18, 2024 4

Make sure that user running docker.hyperkit owns /dev/tap1
For me running docker_tap_install.sh with correct user did the trick.
Something like this:
sudo -u $(ps aux |grep '[d]ocker.hyperkit' |cut -d' ' -f1) ./docker_tap_install.sh -f

from docker-tuntap-osx.

jannal avatar jannal commented on August 18, 2024 1

@AlmirKadric Problem still exists

from docker-tuntap-osx.

AlmirKadric avatar AlmirKadric commented on August 18, 2024

@jannal you mean after you run the install script, every time you restart your mac and docker starts up, the interfaces aren't created? What is the process you followed from the beginning?

from docker-tuntap-osx.

jannal avatar jannal commented on August 18, 2024

@AlmirKadric right

from docker-tuntap-osx.

jannal avatar jannal commented on August 18, 2024

@AlmirKadric

docker version: 18.06.1-ce-mac73 (26764)
mac: MacOS Sierra 10.12.6 MacBook Pro (Retina, 15-inch, Mid 2014)

first install

$ brew tap caskroom/cask
$ brew cask install tuntap
$ ./sbin/docker_tap_install.sh
$ ./sbin/docker_tap_up.sh
$ sudo launchctl list |grep tap

  • 0 net.sf.tuntaposx.tun
  • 0 net.sf.tuntaposx.tap
  • 0 com.fortinet.fctappfw

restart mac

start docker

$ sudo ./docker_tap_up.sh
ifconfig: interface tap1 does not exist

$ ls -l /dev/tap*
crw-rw---- 1 root wheel 22, 0 10 12 17:33 /dev/tap0
crw-rw---- 1 jannal wheel 22, 1 10 20 12:40 /dev/tap1
crw-rw---- 1 root wheel 22, 10 10 12 17:33 /dev/tap10
crw-rw---- 1 root wheel 22, 11 10 12 17:33 /dev/tap11
crw-rw---- 1 root wheel 22, 12 10 12 17:33 /dev/tap12
crw-rw---- 1 root wheel 22, 13 10 12 17:33 /dev/tap13
crw-rw---- 1 root wheel 22, 14 10 12 17:33 /dev/tap14
crw-rw---- 1 root wheel 22, 15 10 12 17:33 /dev/tap15
crw-rw---- 1 root wheel 22, 2 10 12 17:33 /dev/tap2
crw-rw---- 1 root wheel 22, 3 10 12 17:33 /dev/tap3
crw-rw---- 1 root wheel 22, 4 10 12 17:33 /dev/tap4
crw-rw---- 1 root wheel 22, 5 10 12 17:33 /dev/tap5
crw-rw---- 1 root wheel 22, 6 10 12 17:33 /dev/tap6
crw-rw---- 1 root wheel 22, 7 10 12 17:33 /dev/tap7
crw-rw---- 1 root wheel 22, 8 10 12 17:33 /dev/tap8
crw-rw---- 1 root wheel 22, 9 10 12 17:33 /dev/tap9

$ sudo /sbin/kextload /Library/Extensions/tap.kext
$ sudo /sbin/kextload /Library/Extensions/tun.kext
$ sudo ./docker_tap_up.sh
ifconfig: interface tap1 does not exist

I can only re-execute the install

from docker-tuntap-osx.

AlmirKadric avatar AlmirKadric commented on August 18, 2024

@jannal
I see, the reason for that error is because docker hasn't bound itself to that tap interface
Can you give me the output of the docker hyper command after a restart ps -axf | grep hyper
Also instead of re-running the install script, try restarting docker to see if it attaches itself to the tap interface

from docker-tuntap-osx.

jannal avatar jannal commented on August 18, 2024

@AlmirKadric

mac:~ jannal$ ps -axf | grep hyper
501 646 635 0 9:15δΈ‹εˆ ?? 0:41.55 /Applications/Docker.app/Contents/Resources/bin/com.docker.hyperkit.original -A -u -F vms/0/hyperkit.pid -c 4 -m 4096M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=vpnkit.eth.sock,uuid=9c42dae8-af56-4e9f-88fa-cc2536b3b172 -U fd63f0d1-3986-481b-9644-600050528e65 -s 2:0,ahci-hd,file:///Volumes/O/docker/imagesLocation/Docker.qcow2?sync=os&buffered=1,format=qcow,qcow-config=discard=true;compact_after_unmaps=262144;keep_erased=262144;runtime_asserts=false -s 2:1,virtio-tap,tap1 -s 3,virtio-sock,guest_cid=3,path=vms/0,guest_forwards=2376;1525 -s 4,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker-for-mac.iso -s 5,ahci-cd,vms/0/config.iso -s 6,virtio-rnd -s 7,virtio-9p,path=vpnkit.port.sock,tag=port -l com1,autopty=vms/0/tty,asl -f bootrom,/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd,,
501 899 824 0 9:17δΈ‹εˆ ttys001 0:00.00 grep hyper

from docker-tuntap-osx.

pawelniewie avatar pawelniewie commented on August 18, 2024

Had the same issue, closed Docker, re-run install and up scripts and it's running again.

from docker-tuntap-osx.

hemanthpai avatar hemanthpai commented on August 18, 2024

I have the same issue

from docker-tuntap-osx.

ilovefood2 avatar ilovefood2 commented on August 18, 2024

I have same issue

from docker-tuntap-osx.

AlmirKadric avatar AlmirKadric commented on August 18, 2024

@jannal are you still getting the issue on the latest version?
please try pulling down the latest code, and re-installing the shim
you can do this with ./sbin/docker_tap_install.sh -f

please let me know if anyone is still having the same issues

from docker-tuntap-osx.

jannal avatar jannal commented on August 18, 2024

@AlmirKadric Thank you, I will try

from docker-tuntap-osx.

jwundrak avatar jwundrak commented on August 18, 2024

Are they some suggestions, how to fix this? Of course running ./sbin/docker_tap_install.sh -f resolves the problem, but why the tap1 device is not enabled after a reboot?

Comparing the parameters after reboot and then after execution docker_tap_install, the command of starting hyperkit is exactly the same:

/Applications/Docker.app/Contents/Resources/bin/com.docker.hyperkit.original -A -u -F vms/0/hyperkit.pid -c 4 -m 2048M -s 0:0,hostbridge -s 31,lpc -s 1:0,virtio-vpnkit,path=vpnkit.eth.sock,uuid=9253c68a-912d-4c40-8281-dbf7dc6b1b99 -U f027a0c4-0502-4616-9f9d-65b11da9aa1a -s 2:0,ahci-hd,/Users/jwn/Library/Containers/com.docker.docker/Data/vms/0/Docker.raw -s 2:1,virtio-tap,tap1 -s 3,virtio-sock,guest_cid=3,path=vms/0,guest_forwards=2376;1525 -s 4,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker-desktop.iso -s 5,ahci-cd,vms/0/config.iso -s 6,ahci-cd,/Applications/Docker.app/Contents/Resources/linuxkit/docker.iso -s 7,virtio-rnd -l com1,autopty=vms/0/tty,asl -f bootrom,/Applications/Docker.app/Contents/Resources/uefi/UEFI.fd,,

from docker-tuntap-osx.

AlmirKadric avatar AlmirKadric commented on August 18, 2024

@jwundrak, in theory, you shouldn't need to run the install script after a reboot. Once the shim is installed, all you should need to do is bring the tap interfaces up with ./sbin/docker_tap_up.sh

However, sometimes docker will start up before the tap interfaces are ready at a system level. This is why the -f option is needed since it forces a restart of docker and at this point, the tap interfaces are guaranteed to be available at a system level.

I guess I could add a waiting check within the shim which waits for the tap interfaces to be available. will take a look and see what can be done.

Do you mind opening another issue for this?

from docker-tuntap-osx.

jwundrak avatar jwundrak commented on August 18, 2024

@AlmirKadric Sorry for the late response.
I think, this is the exactly the issue of the OP @jannal . I saw currently no option for the delay, but if you find something, it would be so great.

Else I need to write a script, that is restart docker, after the first start, which is really ugly.
You never got this behaviour or run you we -f-flag after a reboot (like me) :)

from docker-tuntap-osx.

zek avatar zek commented on August 18, 2024

Same here

from docker-tuntap-osx.

sagiBarkol avatar sagiBarkol commented on August 18, 2024

same here

from docker-tuntap-osx.

vinothbellie avatar vinothbellie commented on August 18, 2024

Same here with Docker Version: 19.03.8

from docker-tuntap-osx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.