kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.41k stars 4.88k forks source link

minikube mount not working with Hyper-V on Windows 10 Release 1709 #2164

Closed ghost closed 6 years ago

ghost commented 6 years ago

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.23.0

What happened:

minikube mount C:\Users\tapuzzo\Documents:/mnt/laptop

PS > minikube mount C:\Users\tapuzzo\Documents:/mnt/laptop DEBUG: 1+ >>>> minikube mount C:\Users\tapuzzo\Documents:/mnt/laptop Mounting C:\Users\tapuzzo\Documents into /mnt/laptop on the minikube VM This daemon process needs to stay alive for the mount to still be accessible... ufs starting


However, on the minikube vm `minikube ssh` there is nothing at /mnt/laptop:

PS > minikube ssh ( ) ( ) (_) ()| |/') | |_ /' ` \| |/' _| || , < ( ) ( )| '_`\ /'\ | ( ) ( ) || || ( ) || || |\\ | () || |) )( _/ () () ()()() ()()() (_)\___/'(_,__/'____)

$ ls /mnt/laptop $


**What you expected to happen**:

`ls /mnt/laptop` should have something in it (the contents of my Documents folder)

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

Below, use whatever adapter name you need to get out to outside world `Ethernet 2` in my case.

NOTE: Using Start-Job or running the mount in a separate console window doesn't matter, it fails either way.

PS > New-VMSwitch -SwitchType External -SwitchName ExternalSwitch -NetAdapterName "Ethernet 2" -AllowManagementOS $true PS > minikube start --vm-driver=hyperv --hyperv-virtual-switch=ExternalSwitch --alsologtostderr --cpus=4 --memory=4096 --kubernetes-version=v1.8.0 PS > Start-Job { minikube mount C:\Users\tapuzzo\Documents:/mnt/laptop } PS > minikube ssh


**Output of `minikube logs` (if applicable)**:
[minikube-logs.txt](https://github.com/kubernetes/minikube/files/1448429/minikube-logs.txt)

**Anything else do we need to know**:

Network does work, if that matters:

PS > minikube ssh ( ) ( ) (_) ()| |/') | |_ /' ` \| |/' _| || , < ( ) ( )| '_`\ /'\ | ( ) ( ) || || ( ) || || |\\ | () || |) )( _/ () () ()()() ()()() (_)\___/'(_,__/'____)

$ ping my.yahoo.com PING my.yahoo.com (98.138.252.38): 56 data bytes 64 bytes from 98.138.252.38: seq=0 ttl=52 time=25.381 ms 64 bytes from 98.138.252.38: seq=1 ttl=52 time=24.630 ms 64 bytes from 98.138.252.38: seq=2 ttl=52 time=25.069 ms ^C --- my.yahoo.com ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss

nightmare6m commented 6 years ago

I have this same issue. I run the command: minikube mount ./nodejs-express-example:/nodejs-express-example

The output of the above includes: SSH cmd err, output: Process exited with status 32: umount: /nodejs-express-example: mountpoint not found

And the final line of the putput: SSH cmd err, output: <nil>: mount: mount [ip] on /nodejs-express-example failed: Connection timed out

I would love some help with this also.

ghost commented 6 years ago

I tried this again after upgrading to minikube 0.24.1 ( minikube-v0.23.6.iso ) and it is working with a manually configured ExternalSwitch as described above. NOTE: It is not working with the Windows 10 1709 Default Switch though. Since the Default Switch is the simplest configuration now I will leave this open.

Dynamo6Dev commented 6 years ago

I'm using minikube 0.24.1 on Windows 10 with HyperV enabled. I'm using the ExternalSwitch setup described above but I'm still unable to mount folders to the minikube host. Always results in Connection timed out ... here's the verbose output ...

C:\Users\Mike\Documents>minikube mount C:\Users\Mike\Documents:/mikedocs --v=10
Mounting C:\Users\Mike\Documents into /mikedocs 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 ( Get-VM minikube ).state
[stdout =====>] : Running

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

[stderr =====>] :
SSH binary not found, using native Go implementation
&{{{<nil> 0 [] [] []} docker [0x83feb0] 0x83fe60  [] 0s} 192.168.4.96 22 <nil> <nil>}
About to run SSH command:
sudo umount /mikedocs;
SSH cmd err, output: Process exited with status 32: umount: /mikedocs: mountpoint not found

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

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

[stderr =====>] :
SSH binary not found, using native Go implementation
&{{{<nil> 0 [] [] []} docker [0x83feb0] 0x83fe60  [] 0s} 192.168.4.96 22 <nil> <nil>}
About to run SSH command:

sudo mkdir -p /mikedocs || true;
sudo mount -t 9p -o trans=tcp,port=57978,dfltuid=1001,dfltgid=1001,version=9p2000.u,msize=262144 192.168.3.25 /mikedocs;
sudo chmod 775 /mikedocs;
SSH cmd err, output: <nil>: mount: mount 192.168.3.25 on /mikedocs failed: Connection timed out

Any help would be much appreciated :)

fejta-bot commented 6 years ago

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

fejta-bot commented 6 years ago

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

kochinc commented 6 years ago

@Dynamo6 Check your firewall log to see whether connections are being dropped. If that's the case, create a firewall rule allows connections from minikube virtual machine to the minikube program on your host machine.

Dynamo6Dev commented 6 years ago

Thanks @kochinc - it turned out to be our antivirus software that was restricting access in the end

fejta-bot commented 6 years ago

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