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

HyperKit Driver #1543

Closed
dlorenc opened this issue May 31, 2017 · 12 comments
Closed

HyperKit Driver #1543

dlorenc opened this issue May 31, 2017 · 12 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. os/macos

Comments

@dlorenc
Copy link
Contributor

dlorenc commented May 31, 2017

This is a tracking issue for possibly creating a hyperkit driver, instead of the xhyve one we're currently using.

@dlorenc
Copy link
Contributor Author

dlorenc commented May 31, 2017

I was able to get hyperkit to boot minikube, however it looks like hyperkit has dropped support for running the vmnet framework in host mode, which means we can't get an IP address that the host can connect to.

@r2d4 r2d4 added kind/feature Categorizes issue or PR as related to a new feature. os/macos labels May 31, 2017
@copumpkin
Copy link

copumpkin commented Jun 1, 2017

This is probably relevant too once we have it working: https://blog.docker.com/2017/05/user-guided-caching-in-docker-for-mac/

Edit: erm, I guess osxfs isn't open-source 😦

@scottrigby
Copy link

@copumpkin Also, osxfs has this long standing issue for projects with many directories and files (such as PHP Symfony or Drupal). This is one of the main reasons I have been using the xhyve driver with Minikube for local development on K8S.

See this PR for more context: helm/charts#1057 CC @lypht @rabellamy @michelleN @ryanj @tomdavidson. You know, we may want to make some master issue to track the work related to K8S local file mounting (generally for local development, but really for any purpose).

@tomdavidson
Copy link

tomdavidson commented Jun 5, 2017

@dlorenc doesnt hyperkit rely on vpnkit for host network connectivity?

@scottrigby I think moving forward with hyperkit may eventually solve the "host volume mounting" fracture because I think one of Moby's goals to reduce the explicit requirement for Linux kernel features. The history of host volume mounting is rocky with lots of shims and bandaids and only worked in certain configurations (and still does not work completely with Docker for Windows). Prior to Docker for OSX with xhyve didn't OSX users have to result to nfs shares or rsync? This is an underlying OS and hypervisor combo specific problem and not unique to Docker, k8s, or minikube. For example, create a xhyve or vbox machine on your OSX laptop, you don't need docker, use whatever guest OS you want, but do configure the host volume mounting. Run a nodemon or some file watch in the guest and then modify the files from the host ... the guest will not get the updates without polling.

I think eventually for a Moby based solution is a long way off and minikube, such as helm/charts#1057, might have be better suited with a volume sync sidecar and a kubectl proxy / sync wrapper ( ... that wouldn't work with hyperkit unless there was networking ).

@dlorenc dlorenc mentioned this issue Jun 6, 2017
@aaron-prindle
Copy link
Contributor

A hyperkit driver was mentioned as a priority for the minishift team as well. Linking the relevant meeting doc here:
https://docs.google.com/document/d/1zauvKVsxUNR9r8WhYE8dpCGeRnt7Tc6R67JxrCgtY6I/edit#

@copumpkin
Copy link

@tomdavidson I thought the 9p filesystem was to avoid the NFS stuff, but haven't looked recently. I've definitely seen support for it in hyperkit.

Also, in case anyone was wondering, if we don't require a distinct IP for the VM (and are okay with just mapping ports to localhost), we can actually run a completely unprivileged hyperkit VM, so no need for suid bits or any of that annoyance.

@sampowers
Copy link

sampowers commented Jun 21, 2017 via email

@copumpkin
Copy link

@sampowers my understanding stems mostly from moby/hyperkit#136 (comment), which suggests that HyperKit can run with no superuser privileges when using VPNKit (instead of vmnet), and VPNKit would only need privileges if opening ports <1024. So if you were willing to map all ports above 1024 and handle the mapping yourself on localhost, you could run the whole shebang with no setuid.

@dlorenc
Copy link
Contributor Author

dlorenc commented Jul 9, 2017

Just spent some more time playing with this. I got the docker-machine-driver-xhyve code booting with hyperkit, but now I'm stuck trying to get the IP/mac address back out. The existing code shells out to xhyve with a special flag to print the mac address for a given UUID, but hyperkit doesn't have that feature.

@dlorenc
Copy link
Contributor Author

dlorenc commented Jul 10, 2017

@r2d4
Copy link
Contributor

r2d4 commented Sep 7, 2017

I think we can close this, since we have this merged in tree now.

@r2d4 r2d4 closed this as completed Sep 7, 2017
@copumpkin
Copy link

copumpkin commented Sep 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. os/macos
Projects
None yet
Development

No branches or pull requests

7 participants