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 74 forks source link

Multiple NFS shares #121

Closed huguesalary closed 6 years ago

huguesalary commented 8 years ago

Added the ability to setup multiple NFS Shares By default (changeable with xhyve-experimental-nfs-share-root, see below) NFS shares are rooted at /xhyve-nfsshares to avoid the situation where a NFS Share /usr would be mounted at /usr

2 backward incompatible changes:

Other change:

Here's an example of how to use:

docker-machine -D create -d xhyve --xhyve-disk-size 40000 --xhyve-memory-size 4000 --xhyve-cpu-count 2 --xhyve-experimental-nfs-share-enable --xhyve-experimental-nfs-share /Users --xhyve-experimental-nfs-share /usr/ --xhyve-experimental-nfs-share-root /nfsharesfromhost test

This command will share the host folders /Users and /usr in the guest at /nfsharesfromhost/Users and /nfsharesfromhost/usr

razic commented 8 years ago

Just curious what the status of this is?

jaredallard commented 7 years ago

Please merge!

huguesalary commented 6 years ago

Hi there,

Would rebasing this on top of the latest master allow it to be merged?

zchee commented 6 years ago

@huguesalary Oh, thanks reply. and Sorry for very late reply... Now, @dlorenc developing https://github.com/zchee/docker-machine-driver-xhyve/pull/189, So maybe we will switch to Docker for Mac instead of xhyve cgo binding. So, remove originally xhyve interface, also use osxfs disk sharing by default.

Current disk sharing is two options. virtio-9p or NFS. virtio-9p sharing uses lib9p, so if switching to Docker for Mac, will remove lib9p code because Docker for Mac internal's virtio-9p is different to lib9p. But AFAIK, we can leave the NSF option because that's use enable with ssh (bootscript hack).

So, If you try to rebase to master, I want to merge this PR. However, @dlorenc is implementing #189, I want to hear his opinion.

huguesalary commented 6 years ago

Thanks @zchee for the context.

I think keeping the NFS option is valuable. osxfs is still incredibly slow and personally the only way I've been able to have a usable docker machine was by using NFS.

At worst it gives people the option to use NFS.

I'll try to rebase and resubmit soon.

dlorenc commented 6 years ago

Yeah this nfs implementation should be fine to keep. If anything we might standardize some flags on the minikube side, but it won't effect this.

huguesalary commented 6 years ago

Alright just rebased this on the latest master

zchee commented 6 years ago

@huguesalary Thanks!! I’ll merge it after checking.

zchee commented 6 years ago

@huguesalary sorry, i'm busy. I'll check today.

huguesalary commented 6 years ago

No worries! Take your time.

zchee commented 6 years ago

@huguesalary merged. thanks!