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 doesn't mount host's user home directory on HyperV VM (Windows 10) #2357

Closed
addshore opened this issue Dec 23, 2017 · 10 comments
Closed
Labels
area/mount co/hyperv HyperV related issues kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. os/windows

Comments

@addshore
Copy link

addshore commented Dec 23, 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.24.1

  • OS (e.g. from /etc/os-release): Windows 10 (Version 1709 - OS Build 16299.125)
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): "DriverName": "hyperv",
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): "Boot2DockerURL": "file://C:/Users/adam/.minikube/cache/iso/minikube-v0.23.6.iso",

What happened:

I believe this could be similar to #716
My home directory is not mounted to the minikube VM.

minikube start --vm-driver=hyperv
minikube ssh
                         _             _
            _         _ ( )           ( )
  ___ ___  (_)  ___  (_)| |/')  _   _ | |_      __
/' _ ` _ `\| |/' _ `\| || , <  ( ) ( )| '_`\  /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )(  ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)

$ ls -la /
total 12
drwxr-xr-x  17 root root    0 Dec 23 10:26 .
drwxr-xr-x  17 root root    0 Dec 23 10:26 ..
lrwxrwxrwx   1 root root    7 Oct 19 16:45 bin -> usr/bin
drwxr-xr-x   2 root root 4096 Dec 23 10:26 data
drwxr-xr-x  16 root root 3040 Dec 23 10:26 dev
drwxr-xr-x  28 root root    0 Dec 23 10:26 etc
drwxr-xr-x   4 root root    0 Oct 19 17:23 home
-rwxr-xr-x   1 root root  176 Oct 19 17:23 init
lrwxrwxrwx   1 root root    7 Oct 19 16:45 lib -> usr/lib
lrwxrwxrwx   1 root root    3 Oct 19 16:45 lib64 -> lib
lrwxrwxrwx   1 root root   11 Oct 19 16:50 linuxrc -> bin/busybox
drwxr-xr-x   2 root root    0 Oct 19 16:37 media
drwxr-xr-x   3 root root    0 Dec 23 10:26 mnt
drwxr-xr-x   3 root root    0 Oct 19 17:17 opt
dr-xr-xr-x 131 root root    0 Dec 23 10:25 proc
drwxr-xr-x   2 root root    0 Oct 19 16:37 root
drwxr-xr-x  20 root root  660 Dec 23 10:26 run
lrwxrwxrwx   1 root root    8 Oct 19 16:45 sbin -> usr/sbin
drwxr-xr-x   2 root root    0 Dec 23 10:25 srv
dr-xr-xr-x  12 root root    0 Dec 23 10:25 sys
drwxr-xr-x   6 root root 4096 Dec 23 10:26 tmp
drwxr-xr-x   8 root root    0 Oct 19 16:37 usr
drwxr-xr-x   4 root root    0 Dec 23 10:25 var
$

What you expected to happen:

(copied form #716) I should normally be able to access this directory through the VM. I need this to provide files to the containers controlled by Kubernetes.

--mount-string string The argument to pass the minikube mount command on start (default "C:\Users\USERNAME:/minikube-host")

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

(copied form #716) Run minikube start then minikube ssh. In the shell we are unable to find the mounted host directory under any names

Output of minikube logs (if applicable):

$ minikube logs |grep volume
Dec 23 10:26:36 minikube localkube[3287]: I1223 10:26:36.878439    3287 controllermanager.go:487] Started "persistentvolume-binder"
Dec 23 10:26:36 minikube localkube[3287]: I1223 10:26:36.878550    3287 pv_controller_base.go:259] Starting persistent volume controller
Dec 23 10:26:36 minikube localkube[3287]: I1223 10:26:36.878733    3287 controller_utils.go:1041] Waiting for caches to sync for persistent volume controller
Dec 23 10:26:36 minikube localkube[3287]: W1223 10:26:36.885288    3287 controllermanager.go:484] Skipping "persistentvolume-expander"
Dec 23 10:26:36 minikube localkube[3287]: W1223 10:26:36.888112    3287 probe.go:215] Flexvolume plugin directory at /usr/libexec/kubernetes/kubelet-plugins/volume/exec/ does not exist. Recreating.
Dec 23 10:26:36 minikube localkube[3287]: I1223 10:26:36.986777    3287 controller_utils.go:1048] Caches are synced for persistent volume controller
Dec 23 10:26:38 minikube localkube[3287]: I1223 10:26:38.296823    3287 kubelet_node_status.go:276] Setting node annotation to enable volume controller attach/detach
Dec 23 10:26:38 minikube localkube[3287]: I1223 10:26:38.321030    3287 volume_manager.go:246] Starting Kubelet Volume Manager
Dec 23 10:26:38 minikube localkube[3287]: I1223 10:26:38.421171    3287 kubelet_node_status.go:276] Setting node annotation to enable volume controller attach/detach
Dec 23 10:26:43 minikube localkube[3287]: I1223 10:26:43.422124    3287 reconciler.go:212] operationExecutor.VerifyControllerAttachedVolume started for volume "addons" (UniqueName: "kubernetes.io/host-path/7b19c3ba446df5355649563d32723e4f-addons") pod "kube-addon-manager-minikube" (UID: "7b19c3ba446df5355649563d32723e4f")
Dec 23 10:26:43 minikube localkube[3287]: I1223 10:26:43.422777    3287 reconciler.go:212] operationExecutor.VerifyControllerAttachedVolume started for volume "kubeconfig" (UniqueName: "kubernetes.io/host-path/7b19c3ba446df5355649563d32723e4f-kubeconfig") pod "kube-addon-manager-minikube" (UID: "7b19c3ba446df5355649563d32723e4f")
Dec 23 10:26:57 minikube localkube[3287]: I1223 10:26:57.887866    3287 reconciler.go:212] operationExecutor.VerifyControllerAttachedVolume started for volume "default-token-mmgt9" (UniqueName: "kubernetes.io/secret/cdf602ac-e7cb-11e7-bc5b-00155d380177-default-token-mmgt9") pod "storage-provisioner" (UID: "cdf602ac-e7cb-11e7-bc5b-00155d380177")
Dec 23 10:26:59 minikube localkube[3287]: I1223 10:26:59.122141    3287 reconciler.go:212] operationExecutor.VerifyControllerAttachedVolume started for volume "default-token-mmgt9" (UniqueName: "kubernetes.io/secret/cea3c935-e7cb-11e7-bc5b-00155d380177-default-token-mmgt9") pod "kubernetes-dashboard-dq6n8" (UID: "cea3c935-e7cb-11e7-bc5b-00155d380177")
Dec 23 10:26:59 minikube localkube[3287]: I1223 10:26:59.678984    3287 reconciler.go:212] operationExecutor.VerifyControllerAttachedVolume started for volume "kube-dns-config" (UniqueName: "kubernetes.io/configmap/ceeccf53-e7cb-11e7-bc5b-00155d380177-kube-dns-config") pod "kube-dns-86f6f55dd5-qxb4q" (UID: "ceeccf53-e7cb-11e7-bc5b-00155d380177")
Dec 23 10:26:59 minikube localkube[3287]: I1223 10:26:59.679183    3287 reconciler.go:212] operationExecutor.VerifyControllerAttachedVolume started for volume "default-token-mmgt9" (UniqueName: "kubernetes.io/secret/ceeccf53-e7cb-11e7-bc5b-00155d380177-default-token-mmgt9") pod "kube-dns-86f6f55dd5-qxb4q" (UID: "ceeccf53-e7cb-11e7-bc5b-00155d380177")
$ minikube logs |grep mount
Dec 23 10:26:38 minikube localkube[3287]: I1223 10:26:38.240151    3287 fs.go:140] Filesystem partitions: map[tmpfs:{mountpoint:/dev/shm major:0 minor:17 fsType:tmpfs blockSize:0} /dev/sda1:{mountpoint:/mnt/sda1 major:8 minor:1 fsType:ext4 blockSize:0}]

Full logs can be found @ https://phabricator.wikimedia.org/P6504

Anything else do we need to know:

I'm new to kubernetes on Windows so I could be screwing something up here.
But this looks so simple I surely can't be.

@r2d4 r2d4 added the kind/bug Categorizes issue or PR as related to a bug. label Mar 5, 2018
@sshilko
Copy link

sshilko commented May 6, 2018

W/o it fixed, unfortunatelly cant use minikube under windows 10 with hyperv for local development, unless some workaround for mount?

@gbraad
Copy link
Contributor

gbraad commented May 6, 2018 via email

@sshilko
Copy link

sshilko commented May 6, 2018

i understand, just wanted to confirm and bump the issue

https://kubernetes.io/docs/getting-started-guides/minikube/#mounted-host-folders
Hyper-V not supported etc. / not listed

@kochinc
Copy link

kochinc commented Jun 6, 2018

With minikube version: v0.27.0, when you run
minikube start --vm-driver=hyperv --mount
your home directory will be mounted on /minikube-host in your minikube virtual machine. Since normally there are lots of directories and files in the home directory, it would be cleaner to run the command with the directory specified, like
minikube start --vm-driver=hyperv --mount --mount-string="C:\Users\AUser\AFolder:/minikube-host"
Be aware that the host directory is mounted in the virtual machine as a Plan9 filesystem via TCP, so you need to make sure your firewall or security software is not dropping connections from minikube virtual machine.

@sshilko
Copy link

sshilko commented Jun 8, 2018

@kochinc sorry but is this change introduced in 0.27, cant find in changelogs cause this will realy fix many setups?Thx.

@kochinc
Copy link

kochinc commented Jun 9, 2018

The options --mount and --mount-string have been in minikube for several revisions already. But I just started using minikube on Hyper-V, so have no idea whether mounting host directory on Hyper-V was working or not before. And, there are still issues with the mounted directory. It is always mounted as root:root, and modification time is wrong. For copying files into and out of the Hyper-V virtual machine is working, though.

@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 Sep 7, 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

@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 Oct 20, 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

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/mount co/hyperv HyperV related issues kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. os/windows
Projects
None yet
Development

No branches or pull requests

8 participants