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

Fix NFS mount for macOS 10.14 #217

Open urbantrout opened 5 years ago

urbantrout commented 5 years ago

Fixes the following error:

(default) Error setting up mounts: Something went wrong running an SSH command!
(default) command : echo -e "#/bin/bash\nsudo mkdir -p /Users\nsudo /usr/local/etc/init.d/nfs-client start\nsudo mount -t nfs -o noacl,async 192.168.64.1:/Users /Users\n" | sudo tee /var/lib/boot2docker/bootlocal.sh && sudo chmod +x /var/lib/boot2docker/bootlocal.sh && /var/lib/boot2docker/bootlocal.sh
NorseGaud commented 5 years ago

Might be a good idea to if/else wrap and check [ -z $(sw_vers | grep 10.14) ]. Also, the CI looks to be broken and unrelated to your changes. :(

NorseGaud commented 5 years ago

Also, full error:

(default) Error setting up mounts: Something went wrong running an SSH command!
(default) command : echo -e "#/bin/bash\nsudo mkdir -p /Users\nsudo /usr/local/etc/init.d/nfs-client start\nsudo mount -t nfs -o noacl,async 192.168.64.1:/Users /Users\n" | sudo tee /var/lib/boot2docker/bootlocal.sh && sudo chmod +x /var/lib/boot2docker/bootlocal.sh && /var/lib/boot2docker/bootlocal.sh
(default) err     : exit status 32
(default) output  : #/bin/bash
(default) sudo mkdir -p /Users
(default) sudo /usr/local/etc/init.d/nfs-client start
(default) sudo mount -t nfs -o noacl,async 192.168.64.1:/Users /Users
(default) 
(default) Starting nfs client utilities.
(default) mount.nfs: an incorrect mount option was specified
(default) 
(default) 
(default) NFS share folder must be root. Please insert root password.
Waiting for machine to be running, this may take a few minutes...
urbantrout commented 5 years ago

I added the OS version check. Don't know what to do about the CI issues. I don't think this is related to my issue.

NorseGaud commented 5 years ago

I added the OS version check. Don't know what to do about the CI issues. I don't think this is related to my issue.

Nah, it isn't. I think this project is dead unfortunately. The travis setup is broken due to dependencies being out of date.

iworker commented 4 years ago

@NorseGaud @urbantrout Actually, the problem is here: $( [ -n "$(sw_vers | grep 10.14)" ] && echo ",nfsvers=3 ") Here is screenshot from Travis build: image

Probably, it would be simple and not bad solution to replace this checking with just nfsvers=3 and forget about old macOS versions :)