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

Unable to run xhyve vm for docker #222

Open
guidoilbaldo opened this issue Jul 4, 2019 · 1 comment
Open

Unable to run xhyve vm for docker #222

guidoilbaldo opened this issue Jul 4, 2019 · 1 comment

Comments

@guidoilbaldo
Copy link

Hi,

I have a brand new Macbook Pro (company provided) with iTerm2 and oh-my-zsh, and I'm willing to install docker via brew without using Docker Toolbox/Docker Desktop (because of their sluggishness) and xhyve virtualizator (instead of virtualbox).

I followed one of many tutorials that simply states that you should:

  • install Homebrew
  • install docker docker-machine docker-compose docker-machine-driver-xhyve with brew
  • start a xhyve VM and use it for docker with the command docker-machine create default --driver xhyve --xhyve-experimental-nfs-share

Here I started having some troubles. The above command returns:

Error: No machine name specified

while printing out docker-machine man page. So I started trying to figure out why the above command (used by many users to start a default VM) was failing only for me.

I searched the internet and tried the following to no avail:

  • docker-machine create default --driver xhyve --xhyve-experimental-nfs-share true
  • docker-machine create default --driver xhyve --xhyve-experimental-nfs-share=true
  • docker-machine create default --driver xhyve --xhyve-experimental-nfs-share xhyve-vm
  • docker-machine create default --driver xhyve --xhyve-experimental-nfs-share=xhyve-vm

Or any other combination with different names after --xhyve-experimental-nfs-share option. I tried using -d instead of --driver, tried putting VM name after all the options, but the only thing I can get from the above commands is this result:

Running pre-create checks...
Creating machine...
(default) Copying /Users/sguido/.docker/machine/cache/boot2docker.iso to /Users/sguido/.docker/machine/machines/default/boot2docker.iso...
(default) Creating VM...
(default) /dev/disk4          	                               	/Users/sguido/.docker/machine/machines/default/b2d-image
(default) "disk4" ejected.
(default) Generating 30000MB disk image...
(default) created: /Users/sguido/.docker/machine/machines/default/root-volume.sparsebundle
(default) Creating SSH key...
(default) Fix file permission...
(default) Generate UUID...
(default) Convert UUID to MAC address...
(default) Starting default...
(default) Waiting for VM to come online...
(default) Waiting on a pseudo-terminal to be ready... done
(default) Hook up your terminal emulator to /dev/ttys002 in order to connect to your VM
(default) NFS share folder must be root. Please insert root password.
Error creating machine: Error in driver during machine creation: Export verification failed:
exports:3: path contains non-directory or non-existent components: /Users/sguido/.docker/machine/machines/default/true
exports:3: no usable directories in export entry
exports:3: using fallback (marked offline): /

exit status 3

For the above output, I used docker-machine create default --driver xhyve --xhyve-experimental-nfs-share=true command.
I also tried using bash instead of zsh but, again, no success.
I'm really stuck here and can't understand what I'm missing since it seems that for everyone else this setup is really simple and straightforward. Any help would really be appreciated.

Stefano

@guidoilbaldo
Copy link
Author

Update: reading through your README, I tried mounting a local path on the guest VM.

docker-machine create default --driver xhyve --xhyve-experimental-nfs-share /opt                                                                                  1 ↵  23:42:32 
Running pre-create checks...
Creating machine...
(default) Copying /Users/sguido/.docker/machine/cache/boot2docker.iso to /Users/sguido/.docker/machine/machines/default/boot2docker.iso...
(default) Creating VM...
(default) /dev/disk2          	                               	/Users/sguido/.docker/machine/machines/default/b2d-image
(default) "disk2" ejected.
(default) Generating 20000MB disk image...
(default) created: /Users/sguido/.docker/machine/machines/default/root-volume.sparsebundle
(default) Creating SSH key...
(default) Fix file permission...
(default) Generate UUID...
(default) Convert UUID to MAC address...
(default) Starting default...
(default) Waiting for VM to come online...
(default) Waiting on a pseudo-terminal to be ready... done
(default) Hook up your terminal emulator to /dev/ttys000 in order to connect to your VM
(default) NFS share folder must be root. Please insert root password.
Password:
Error creating machine: Error in driver during machine creation: ssh command error:
command : echo -e "#/bin/bash\nsudo /usr/local/etc/init.d/nfs-client start\nsudo mkdir -p /xhyve-nfsshares//opt\nsudo mount -t nfs -o noacl,async 192.168.64.1:/opt /xhyve-nfsshares//opt\n" | sh
err     : Process exited with: 32. Reason was:  ()
output  : Starting nfs client utilities.
mount.nfs: an incorrect mount option was specified

I still don't understand what's happening and why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant