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 manually mount directories on minikube VM using nfs #744

Closed
bmerlet90 opened this issue Oct 24, 2016 · 8 comments
Closed

Unable to manually mount directories on minikube VM using nfs #744

bmerlet90 opened this issue Oct 24, 2016 · 8 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@bmerlet90
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Minikube version : v0.12.0

Environment:

  • OS : Ubuntu 14.04 LTS
  • VM Driver : VirtualBox 5.1.6
  • Docker version (e.g. docker -v): 1.12.2 build bb80604
  • Install tools:
  • Others:

What happened:
I'm trying to resolve my previous issue ( #716 ) using comments from #2 as suggested by @r2d4. In order to do this I'm trying to manually mount my directory to the minikube VM.

I configured my /etc/exports like this:
/home/user/share 192.168.99.100(rw, no_root_squash,no_subtree_check,sync,insecure)

I tried these mount commands:

minikube ssh -- sudo mount -t nfs 10.0.2.2:/home/user/share /mnt/hostshare -o default,rw,user,vers=3

The returned error is :

mount: 10.0.2.2:/home/user/share failed, reason given by server: Permission denied
mount: mounting 10.0.2.2:/home/user/share/ on /mnt/hostshare failed: Bad file descriptor
E1024 10:28:02.934318    5956 ssh.go] Error attempting to ssh/run-ssh-command: exit status 110

I then tried to use the mount command from the host side:

sudo mount -t nfs /home/user/share 192.168.99.100:/mnt/hostshare -o default,rw,user,vers=3

and

sudo mount -t nfs /home/user/share 192.168.99.100:/home/docker/hostshare -o default,rw,user,vers=3

For both commands, I get the same type of error:

mount.nfs: mount point 192.168.99.100:/home/docker/hostshare does not exist 

but the command minikube ip returns the correct ip address 192.168.99.100 and the folder hostshare does exist on the VM

Is there something I missed? Is the minikube VM ip different than the one given by the minikube ip command?

What you expected to happen:
I expected the mount to be successful ...

How to reproduce it (as minimally and precisely as possible):

Anything else do we need to know:
When I use ping 192.168.99.100, there is no packets lost so the ip address should be the correct one.

@r2d4 r2d4 added the kind/bug Categorizes issue or PR as related to a bug. label Oct 25, 2016
@aaron-prindle
Copy link
Contributor

aaron-prindle commented Oct 27, 2016

Thanks for the detailed report. This is a solution for Mac which should be similar to Ubuntu. Make sure to run it in the VM:
#2 (comment)

@r2d4
Copy link
Contributor

r2d4 commented Nov 3, 2016

@bmerlet90 Any success setting up NFS in minikube yet?

@r2d4
Copy link
Contributor

r2d4 commented Nov 3, 2016

@bmerlet90 using the buildroot ISO will allow your host /home to be mounted at /hosthome in the VM. You can get this working with

minikube start --iso-url=http://storage.googleapis.com/minikube/iso/buildroot/minikube-v0.0.6.iso

If you'd like to skip passing this flag everytime you create a minikube VM, you should set the environmental variable

MINIKUBE_ISO_URL=http://storage.googleapis.com/minikube/iso/buildroot/minikube-v0.0.6.iso

@bmerlet90
Copy link
Author

@r2d4 no the given command doesn't solve this issue.
The mounted volume is visible through the virtualbox UI but is still not present when I use minikube ssh

Do I have to upgrade the minikube version (to the new v0.12.2) in order for this to work?

@aaron-prindle
Copy link
Contributor

Did you do a minikube delete before you attempted the minikube start with the new iso?

@pcm32
Copy link

pcm32 commented Nov 28, 2016

A collaborator tried the

minikube delete
minikube start --iso-url=http://storage.googleapis.com/minikube/iso/buildroot/minikube-v0.0.6.iso

suggested, but got:

E1128 18:31:49.959481   24107 start.go:92] Error starting host: Error creating host: Error creating machine: Error checking the host: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": dial tcp 192.168.99.100:2376: i/o timeout

@aaron-prindle
Copy link
Contributor

Closing. We have recently added the minikube mount command which can be configured to mount a specified host directory into the minikubeVM.

@bersace
Copy link

bersace commented Apr 23, 2018

@aaron-prindle can we have minikube mount at boot ?

EDIT : responding myself :

Just pass --mount to minikube start.

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

No branches or pull requests

5 participants