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 error on Windows 7 #2072

Closed
makcumka2000 opened this issue Oct 17, 2017 · 9 comments
Closed

Minikube mount error on Windows 7 #2072

makcumka2000 opened this issue Oct 17, 2017 · 9 comments

Comments

@makcumka2000
Copy link

makcumka2000 commented Oct 17, 2017

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

Please provide the following details:

Environment:

Minikube version (use minikube version): minikube version: v0.22.3

  • OS (e.g. from /etc/os-release): windows 7
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): virtual box
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): minikube-v0.23.5.iso
  • Install tools: chocolatey
  • Others:

What happened:
When I try to mount local diretory to minikube: "minikube mount .:/remote/directory", I got an error:
E1017 11:55:29.816914 3504 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
It is really looks like this issue #1473

What you expected to happen:
Command start a daemon and it mount local directory to remote directory

How to reproduce it (as minimally and precisely as possible):
"minikube mount .:/remote/directory"
Output of minikube logs (if applicable):

Anything else do we need to know:
I've understood where is a problem:
In a minikube source code an interface name get from this code:

out, err := exec.Command(detectVBoxManageCmd(), "showvminfo", "minikube", "--machinereadable").Output()
		if err != nil {
			return []byte{}, errors.Wrap(err, "Error running vboxmanage command")
		}
		re := regexp.MustCompile(`hostonlyadapter2="(.*?)"`)
		iface := re.FindStringSubmatch(string(out))[1]
		ip, err := getIPForInterface(iface)

And for me result is "VirtualBox Host-Only Ethernet Adapter #2", but my networks interface name is "VirtualBox Host-Only Network #2"(without Ethernet ), and therefore I got an error.
Workaround for me: I renamed my interface to "VirtualBox Host-Only Ethernet Adapter #2" and minikube mount work!

--

therefore

@dlorenc
Copy link
Contributor

dlorenc commented Oct 19, 2017

Yeah looks like a bug in the way we detect the IP to use for VBox.

@kti-matt
Copy link

I see this issue in Windows 10 Pro.

To add some detail, here's a way to duplicate the issue outside of Minikube. Simply run:

C:\Users\Matt>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" hostonlyif create
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interface 'VirtualBox Host-Only Ethernet Adapter #3' was successfully created

VirtualBox reports this name in VBoxManage.exe list hostonlyifs and in the GUI under File->Host Network Manager.

Then observe that the following interface has been created:

C:\Users\Matt>ipconfig

Windows IP Configuration

...snip...

Ethernet adapter VirtualBox Host-Only Network #3:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::f429:ae61:5857:2b9a%34
   IPv4 Address. . . . . . . . . . . : 192.168.227.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Note that the names don't match, which confuses Minikube. But the root of the problem seems to be either VirtualBox or Windows, not Minikube.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 26, 2018
@RobertDiebels
Copy link

Having this issue as well on Windows 10
/remove-lifecycle stale

Info

  • OS: Windows 10 Home
  • Driver: VirtualBox
  • Minikube version: v0.24.1
  • Install tools: minikube.exe

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 27, 2018
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 26, 2018
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@reecebradley
Copy link

reecebradley commented Oct 11, 2018

same issue here, running under admin powershell prompt.
/remove-lifecycle rotten

minikube version: v0.30.0

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.17134 N/A Build 17134
minikube mount --v=7 --alsologtostderr c:\_\:/host-home/
I1011 05:42:27.643178    7776 notify.go:121] Checking for updates...
Mounting c:\\_\\ into /host-home/ on the minikube VM
This daemon process needs to stay alive for the mount to still be accessible...
ufs starting
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
[stdout =====>] : Running

[stderr =====>] :
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM minikube ).networkadapters[0]).ipaddresses[0]
[stdout =====>] : 192.168.255.60

[stderr =====>] :
Using SSH client type: native
&{{{<nil> 0 [] [] []} docker [0x815090] 0x815060  [] 0s} 192.168.255.60 22 <nil> <nil>}
About to run SSH command:
sudo umount /host-home/;
SSH cmd err, output: Process exited with status 32: umount: /host-home/: not mounted.

[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
[stdout =====>] : Running

[stderr =====>] :
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM minikube ).networkadapters[0]).ipaddresses[0]
[stdout =====>] : 192.168.255.60

[stderr =====>] :
Using SSH client type: native
&{{{<nil> 0 [] [] []} docker [0x815090] 0x815060  [] 0s} 192.168.255.60 22 <nil> <nil>}
About to run SSH command:

sudo mkdir -p /host-home/ || true;
sudo mount -t 9p -o trans=tcp,port=51850,dfltuid=1001,dfltgid=1001,version=9p2000.u,msize=262144 192.168.255.1 /host-home/;
sudo chmod 775 /host-home/ || true;

@k8s-ci-robot
Copy link
Contributor

@reecebradley: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

same issue here, running under admin powershell prompt.
/reopen
/remove-lifecycle rotten

minikube mount --v=7 --alsologtostderr c:\_\:/host-home/
I1011 05:42:27.643178    7776 notify.go:121] Checking for updates...
Mounting c:\\_\\ into /host-home/ on the minikube VM
This daemon process needs to stay alive for the mount to still be accessible...
ufs starting
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
[stdout =====>] : Running

[stderr =====>] :
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM minikube ).networkadapters[0]).ipaddresses[0]
[stdout =====>] : 192.168.255.60

[stderr =====>] :
Using SSH client type: native
&{{{<nil> 0 [] [] []} docker [0x815090] 0x815060  [] 0s} 192.168.255.60 22 <nil> <nil>}
About to run SSH command:
sudo umount /host-home/;
SSH cmd err, output: Process exited with status 32: umount: /host-home/: not mounted.

[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state
[stdout =====>] : Running

[stderr =====>] :
[executing ==>] : C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Hyper-V\Get-VM minikube ).networkadapters[0]).ipaddresses[0]
[stdout =====>] : 192.168.255.60

[stderr =====>] :
Using SSH client type: native
&{{{<nil> 0 [] [] []} docker [0x815090] 0x815060  [] 0s} 192.168.255.60 22 <nil> <nil>}
About to run SSH command:

sudo mkdir -p /host-home/ || true;
sudo mount -t 9p -o trans=tcp,port=51850,dfltuid=1001,dfltgid=1001,version=9p2000.u,msize=262144 192.168.255.1 /host-home/;
sudo chmod 775 /host-home/ || true;

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants