machine-drivers / docker-machine-driver-xhyve

docker-machine/minikube/minishift driver plugin for xhyve/hyperkit (native macOS hypervisor.framework)
https://godoc.org/github.com/machine-drivers/docker-machine-driver-xhyve
BSD 3-Clause "New" or "Revised" License
889 stars 73 forks source link

DNS Configuration doesn't include local network DNS #187

Open kevinkirkup opened 7 years ago

kevinkirkup commented 7 years ago

I'm working in a corporate network and I need to have the VM hosting the docker daemon to include the DNS servers for our network, otherwise I can't download the OpenShift/Kubernetes images to start a cluster in minikube/minishift.

This doesn't seem to be and issue when I use docker-machine.

I've been able to get around this by adding the DNS servers to resolve.conf and resolved.conf after the VM has been created. Due to changes in minishift however, this no longer works.

Is there a way to specify addition DNS servers that can be configured? Is there a configuration that I should be checking?

Version Info

% brew info docker-machine-driver-xhyve
docker-machine-driver-xhyve: stable 0.3.3 (bottled), HEAD
Docker Machine driver for xhyve
https://github.com/zchee/docker-machine-driver-xhyve
/usr/local/Cellar/docker-machine-driver-xhyve/0.3.3 (3 files, 10.3MB) *
  Poured from bottle on 2017-06-30 at 08:53:44
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/docker-machine-driver-xhyve.rb
==> Dependencies
Build: go ✔
Required: opam ✔, libev ✔
Recommended: docker-machine ✔
==> Requirements
Build: git ✔
Required: macOS >= 10.10 ✔
==> Options
--without-docker-machine
    Build without docker-machine support
--without-qcow2
    Do not support qcow2 disk image format
--HEAD
    Install HEAD version
==> Caveats
This driver requires superuser privileges to access the hypervisor. To
enable, execute
    sudo chown root:wheel /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
    sudo chmod u+s /usr/local/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
kevinkirkup commented 7 years ago

Looks like this was being caused by having dnsmasq enabled. Not sure why that would be though. After disabling dnsmasq everything seems to be working correctly.

zchee commented 7 years ago

@kevinkirkup Thanks for advice. I’ll check this isuue later.

jasonmacdonald commented 7 years ago

I just hit the same issue and have been wasting hours trying to figure out why I could not build an image inside minikube when following the tutorial - I kept getting errors "read: connection refused" when trying to pull an image off of dockerhub. This post guided me to turning off dnsmasq, which I forgot I even had on this laptop, CHEERS!

igostv commented 7 years ago

@kevinkirkup @jasonmacdonald thanks a lot, disabling dnsmasq helped me too. Dnsmasq was installed as dependency to valet to service .dev domain. Is there any way to make them work simultaneously?

roadrunner commented 6 years ago

@kevinkirkup if you're using local dnsmasq, you need to tell the dnsmasq listen docker host interface as well.

 ~ cat /usr/local/etc/dnsmasq.conf |grep -i listen-add
#listen-address=
listen-address=127.0.0.1
listen-address=192.168.64.1

don't forget to reload dnsmasq service, after editing configuration file.