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
888 stars 73 forks source link

NFS and Virtio9p mounts setup refactoring #195

Closed huguesalary closed 7 years ago

huguesalary commented 7 years ago

I have been working those past few days on xhyve's ability to mount multiple folders from the Host to the Guest, either via NFS or via Virtio9p.

At this point, the NFS work has already been merged into master: https://github.com/zchee/docker-machine-driver-xhyve/pull/121

Since this last PR (#121), I have been working on allowing multiple mount point using Virtio9p, and have submitted a PR currently waiting for approval: https://github.com/zchee/docker-machine-driver-xhyve/pull/194. Until that point, xhyve's was "hardcodingly" mounting the Host /Users folder into the Guest via Virtio9p, and the user had no choice in the matter.

At the same time, I have been working on modifying minikube (https://github.com/kubernetes/minikube) to allow minikube users to create minikube machines with multiple mounts (either NFS or Virtio9p).

However, while working on minikube I ran into issues that ultimately were caused by xhyve's use of the bootlocal.sh script for setting up NFS and Virtio9p mount points: when I would create a new minikube machine, my mount points would not show up at creation time. They would only show up after a minikube stop followed by a minikube start.

After debugging I realized that the bootlocal.sh script wasn't being executed when the minikube machine was created the very first time. After looking around, I found this boot2docker FAQ explaining the role of the bootlocal.sh script, which made me realize that xhyve's use of this script was 1- not proper, 2- superfluous.

This Pull Request addresses this issue and will also allow me to submit a PR to the minikube project allowing minikube users to make use of multiple, user-defined, NFS and/or Virtio9p shared folders.

zchee commented 7 years ago

@huguesalary Thanks pull request :) I'll check tonight.

huguesalary commented 7 years ago

Great, thanks! Let me know if you need some more clarification.

zchee commented 7 years ago

@huguesalary merged. Thanks!

huguesalary commented 7 years ago

Awesome, thanks!