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

Minikube mount fails in v0.19.0 #1473

Closed
TanmayaAPYL opened this issue May 10, 2017 · 18 comments
Closed

Minikube mount fails in v0.19.0 #1473

TanmayaAPYL opened this issue May 10, 2017 · 18 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@TanmayaAPYL
Copy link

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

Minikube version (use minikube version): v0.19.0

Environment:

  • OS : Ubuntu 16.04.2 LTS (Xenial Xerus)
  • VM Driver: virtualbox
  • ISO version : v0.18.0

What happened:
minikube mount command fails in v0.19.0, which was working in minikube v0.18.0.
It exits with error:

E0510 14:28:27.988073    6989 mount.go:91] Error getting the host IP address to use from within the VM:  Error getting VM/Host IP address: Error finding IPV4 address for vboxnet0

What you expected to happen:
Expected the host directory to be mounted within minikube VM

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

  1. Start the cluster minikube start --insecure-registry="192.168.0.2:5000" --memory 4096 --vm-driver="virtualbox"
  2. Try mounting a dir:
wrkstn$ minikube mount /home/myuser/src:/src
E0510 14:28:27.988073    6989 mount.go:91] Error getting the host IP address to use from within the VM:  Error getting VM/Host IP address: Error finding IPV4 address for vboxnet0

Anything else do we need to know:

wrkstn$ kubectl describe node 
Name:			minikube
Role:			
Labels:			beta.kubernetes.io/arch=amd64
			beta.kubernetes.io/os=linux
			kubernetes.io/hostname=minikube
Annotations:		node.alpha.kubernetes.io/ttl=0
			volumes.kubernetes.io/controller-managed-attach-detach=true
Taints:			<none>
CreationTimestamp:	Wed, 10 May 2017 14:10:31 +0530
Phase:			
Conditions:
  Type			Status	LastHeartbeatTime			LastTransitionTime			Reason				Message
  ----			------	-----------------			------------------			------				-------
  OutOfDisk 		False 	Wed, 10 May 2017 15:41:46 +0530 	Wed, 10 May 2017 14:10:31 +0530 	KubeletHasSufficientDisk 	kubelet has sufficient disk space available
  MemoryPressure 	False 	Wed, 10 May 2017 15:41:46 +0530 	Wed, 10 May 2017 14:10:31 +0530 	KubeletHasSufficientMemory 	kubelet has sufficient memory available
  DiskPressure 		False 	Wed, 10 May 2017 15:41:46 +0530 	Wed, 10 May 2017 14:10:31 +0530 	KubeletHasNoDiskPressure 	kubelet has no disk pressure
  Ready 		True 	Wed, 10 May 2017 15:41:46 +0530 	Wed, 10 May 2017 14:10:31 +0530 	KubeletReady 			kubelet is posting ready status
Addresses:		192.168.99.100,192.168.99.100,minikube
Capacity:
 cpu:		2
 memory:	4046840Ki
 pods:		110
Allocatable:
 cpu:		2
 memory:	3944440Ki
 pods:		110
System Info:
 Machine ID:			4cd8ff42d41644d9a529dd244dfd09
 System UUID:			9C3E6FD0-B88A-473F-9000-5F2E2A4FF2B1
 Boot ID:			70f7908d-2e9b-4075-abcd-ee037313c89b
 Kernel Version:		4.7.2
 OS Image:			Buildroot 2016.08
 Operating System:		linux
 Architecture:			amd64
 Container Runtime Version:	docker://1.11.1
 Kubelet Version:		v1.6.0
 Kube-Proxy Version:		v1.6.0
ExternalID:			minikube
Non-terminated Pods:		(5 in total)
  Namespace			Name					CPU Requests	CPU Limits	Memory Requests	Memory Limits
  ---------			----					------------	----------	---------------	-------------
  kube-system			kube-addon-manager-minikube		5m (0%)		0 (0%)		50Mi (1%)	0 (0%)
  kube-system			kube-dns-268032401-6htv2		260m (13%)	0 (0%)		110Mi (2%)	170Mi (4%)
  kube-system			kubernetes-dashboard-hmjfx		0 (0%)		0 (0%)		0 (0%)		0 (0%)
  myapp			postgres-3189009613-f5bcs		0 (0%)		0 (0%)		0 (0%)		0 (0%)
  myapp			redis-3067652467-hr1r6			100m (5%)	0 (0%)		100Mi (2%)	0 (0%)
Allocated resources:
  (Total limits may be over 100 percent, i.e., overcommitted.)
  CPU Requests	CPU Limits	Memory Requests	Memory Limits
  ------------	----------	---------------	-------------
  365m (18%)	0 (0%)		260Mi (6%)	170Mi (4%)
Events:		<none>
@TanmayaAPYL
Copy link
Author

As a temp workaround, I'm using minikube v0.18.0 only to mount the host directory

wrkstn$ minikube.0.18 mount /home/myuser/src
Mounting /home/myuser/src into /mount-9p on the minikubeVM
This daemon process needs to stay alive for the mount to still be accessible...
ufs starting

@aaron-prindle aaron-prindle added the kind/bug Categorizes issue or PR as related to a bug. label May 10, 2017
@aaron-prindle
Copy link
Contributor

aaron-prindle commented May 10, 2017

Thanks for reporting this. This has to do with minikube now assuming that you are using vboxnet0 when registering the mount. We should fix this so that minikube properly identfies which network interface the minikubeVM is running on. In the meantime I believe you can configure the network interface that virtualbox uses from the vbox UI. Changing the interface from vboxnetN to vboxnet0 should fix the issue for now.

@aaron-prindle
Copy link
Contributor

aaron-prindle commented May 11, 2017

We should add a flag to mount so that users can specify the ip to use. We should also look at the vbox driver implementation and copy how it find the right interface and duplicate that so that the default interface is correct

@viridia
Copy link

viridia commented May 14, 2017

I'm having similar difficulties, and the suggested workaround (changing the virtualbox network interface) causes other problems. I'm having to revert to 0.18.0 to get my work done.

@aaron-prindle aaron-prindle added the kind/feature Categorizes issue or PR as related to a new feature. label May 15, 2017
@aaron-prindle
Copy link
Contributor

Closing. This has been fixed with #1481 and will be available in the next release of minikube.

@romandubrov
Copy link

I'm still having this problem with v0.21.0 on windows 10 with hyper-v

PS D:\Work> minikube mount d:/Work/data:/data
E0816 18:02:39.443496    6388 mount.go:113] Error getting the host IP address to use from within the VM:  Error getting VM/Host IP address: Error finding IPV4 address for vEthernet ()

@Y-Less
Copy link

Y-Less commented Sep 21, 2017

Also having the same problem on Windows 8.1 with virtualbox and v0.21.0

E0921 15:20:42.806387    7308 mount.go:113] Error getting the host IP address to use from within the VM:  Error getting VM/Host IP address: Error finding IPV4 address for VirtualBox Host-Only Ethernet Adapter #2

@sbueringer
Copy link
Member

@aaron-prindle

Same problem on Windows 7 and v0.22.2

@makcumka2000
Copy link

The same problem on windows 7 and v0.21.0

@tjma2001
Copy link

Is there any work around for this?

@makcumka2000
Copy link

Work around for me: I renamed my interface to "VirtualBox Host-Only Ethernet Adapter #2" and minikube mount work!
You must remove "interface" from your network interface name

@makcumka2000
Copy link

Or you can use virtual box shared folders instread minikube mount

@adamhenson
Copy link

I'm reproducing this in 0.24.1. Can someone provide links or more in-depth instructions regarding the workaround?

@makcumka2000
Copy link

See my previous comment. It works for me.
But I reject using minikube mount, because there is bad perfomance. Now I'm using VB shared folders for my files.

@adamhenson
Copy link

adamhenson commented Aug 6, 2018

Hi @makcumka2000 - thanks - I was hoping someone could provide in-depth instructions as I'm a newbie (and I imagine many others are too). I don't know exactly know the meaning of I renamed my interface to "VirtualBox Host-Only Ethernet Adapter #2".

My setup is a standard for Mac OS setup. I followed all the standard documentation to get here.

My mount command:

$ sudo minikube mount /opt/software/app/nginx/etc/nginx:/etc/nginx

My error:

E0806 10:48:51.939210   18370 mount.go:113] Error getting the host IP address to use from within the VM:  Error running vboxmanage command: exit status 1

UPDATE

I had tried sudo and I didn't realize it gave me different error output. Below is my original error without sudo:

This daemon process needs to stay alive for the mount to still be accessible...
E0806 11:13:44.674567   18650 mount.go:127] Error finding port for mount:  Error accessing port 0

@makcumka2000
Copy link

makcumka2000 commented Aug 6, 2018

@adamhenson it means your virtual machine turn off.
Run the minikube ip in terminal
If you get an error - run minikube start command.

@adamhenson
Copy link

adamhenson commented Aug 6, 2018

Hmmm nope @makcumka2000. That was the output when i used sudo. When I don't use sudo - I see this error. This is the original error I saw - which led me here via Google search:

E0806 11:04:34.656848   18561 mount.go:127] Error finding port for mount:  Error accessing port 0

@makcumka2000 - $ minikube ip yields 192.168.99.100.

@adamhenson
Copy link

adamhenson commented Aug 6, 2018

@makcumka2000 - I found an issue mine is probably more related to: #2442. I'll add any further comments over there.

Thanks for trying though.

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. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

9 participants