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 VM #716

Closed
bmerlet90 opened this issue Oct 19, 2016 · 10 comments
Closed

Minikube doesn't mount host's user home directory on VM #716

bmerlet90 opened this issue Oct 19, 2016 · 10 comments
Labels
co/virtualbox kind/bug Categorizes issue or PR as related to a bug.

Comments

@bmerlet90
Copy link

Is this a BUG REPORT or FEATURE REQUEST?:
BUG REPORT

Minikube version : v0.11.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:
My home directory is not mounted on the minkube VM. I tried using 'minikube ssh' to directly find it inside the VM but I can't find it anywhere on the VM

What you expected to happen:
I should normally be able to access this directory through the VM. I need this to provide files to the containers controlled by Kubernetes.

How to reproduce it (as minimally and precisely as possible):
Run minikube start then minikube ssh. In the shell we are unable to find the mounted host directory under any names

Anything else do we need to know:
Running the virtualbox GUI, the minikube VM correctly shows the mounted directory.
While running minikube ssh the docker version of the VM is shown: 1.11.1 build5604cbe

@r2d4
Copy link
Contributor

r2d4 commented Oct 19, 2016

Have you verified that its not mounted at /hosthome in the VM?

https://github.com/kubernetes/minikube#mounted-host-folders

@bmerlet90
Copy link
Author

Yes that's the first place where I looked for the mount

here is what I get from a ll / command on the VM :
screenshot from 2016-10-19 16_54_10_2

@bmerlet90
Copy link
Author

I also tried a mount command inside the minikube VM and got this :

tmpfs on / type tmpfs (rw,relatime,size=917796k)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /mnt/sda1 type ext4 (rw,relatime,data=ordered)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu type cgroup (rw,relatime,cpu)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,relatime,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,relatime,net_cls)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,relatime,perf_event)
cgroup on /sys/fs/cgroup/net_prio type cgroup (rw,relatime,net_prio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,relatime,pids)
/dev/sda1 on /mnt/sda1/var/lib/docker/aufs type ext4 (rw,relatime,data=ordered)
tmpfs on /mnt/sda1/var/lib/kubelet/pods/43f145b8-946c-11e6-bd38-322487babf8f/volumes/kubernetes.iosecret/default-token-w9cuf type tmpfs (rw,relatime)
tmpfs on /mnt/sda1/var/lib/kubelet/pods/9d34dcd1-9544-11e6-9640-023ccb98745f/volumes/kubernetes.io
secret/default-token-hkeia type tmpfs (rw,relatime)
none on /mnt/sda1/var/lib/docker/aufs/mnt/8148a6af92dd5a7d08487a49ed524169f944664110f11ef924f16bd42432b0f5 type aufs (rw,relatime,si=aa651f807be2f019,dio,dirperm1)
shm on /mnt/sda1/var/lib/docker/containers/06640247beb8474c6608e806558abb07c197a01d38f5930b4ce28c8c3fe4dd12/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
none on /mnt/sda1/var/lib/docker/aufs/mnt/17a8e1d804defbfb4a65dca42a9477d7d7c8c0d11bb406ef4baa887afa950e07 type aufs (rw,relatime,si=aa651f807bd21019,dio,dirperm1)
shm on /mnt/sda1/var/lib/docker/containers/29a808e385462229baf669233840af59791b4dd05211083ae8a2171237357677/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
none on /mnt/sda1/var/lib/docker/aufs/mnt/cd725d75970a78e469a0f86a92d612bfca2672a51923e2c393c42f58f049944b type aufs (rw,relatime,si=aa651f807bd84019,dio,dirperm1)
nsfs on /var/run/docker/netns/default type nsfs (rw)
shm on /mnt/sda1/var/lib/docker/containers/3b7e605879fd0006ae614f0ed7533d2813a66e28e031a911934e7b59e646a851/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=65536k)
nsfs on /var/run/docker/netns/64a865071bd2 type nsfs (rw)
nsfs on /var/run/docker/netns/7e4490f10e95 type nsfs (rw)
none on /mnt/sda1/var/lib/docker/aufs/mnt/3b340afcd3564b538c81e5126cf00870edbaed8f16f4bdbf247ffb793ca4714c type aufs (rw,relatime,si=aa651f807b32f019,dio,dirperm1)
none on /mnt/sda1/var/lib/docker/aufs/mnt/a51ccf5c94d15077121f4aa9ab8b0785fcf08410a27b78355a10da8fb4485f24 type aufs (rw,relatime,si=aa651f807b3e9019,dio,dirperm1)
none on /mnt/sda1/var/lib/docker/aufs/mnt/9d2d2a019ee302efd49d18fdc3e6413cd2788150a62a342f057e4600d4adaa06 type aufs (rw,relatime,si=aa651f804e33b019,dio,dirperm1)

Here again, no sign of the mounted directory

@r2d4
Copy link
Contributor

r2d4 commented Oct 19, 2016

Well after some investigation it seems like mounting /hosthome never worked with virtualbox. The command is run, but doesn't do anything.

(minikube) DBG | COMMAND: /usr/bin/VBoxManage sharedfolder add minikube --name hosthome --hostpath /home --automount

A fix is found in either of these PR - which we should probably include even if they aren't merged in

boot2docker/boot2docker#1086
boot2docker/boot2docker#1088

I'll update the incorrect minikube docs for now. Sorry about the indirection

@r2d4 r2d4 added kind/bug Categorizes issue or PR as related to a bug. co/virtualbox labels Oct 19, 2016
@dlorenc
Copy link
Contributor

dlorenc commented Oct 19, 2016

Yeah, we should merge one of those and make the corresponding change to the rkt ISO.

@bmerlet90
Copy link
Author

Thanks for your replies.

Is there anyway I can bypass this in the meantime?

@r2d4
Copy link
Contributor

r2d4 commented Oct 20, 2016

As a workaround for now, some users have created NFS mounts between the VM and the host. You can find some examples in this issue #2

@itamarst
Copy link

Looks like boot2docker/boot2docker#1088 was merged into boot2docker, so is it possible to get this done now?

@peterrosell
Copy link

I just started using minikube on Ubuntu and read the section in the readme file that mounting the host wasn't working for linux at the moment, but I just found the /hosthome directory in my virtual machine and there I found my user directory. So I think this is fixed now and the documentation need an update. I'm running in Virtualbox on Ubuntu 16.04

$ uname -a
Linux minikube 4.7.2 #1 SMP Fri Feb 10 23:33:54 UTC 2017 x86_64 GNU/Linux
$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
devtmpfs                982956         0    982956   0% /dev
tmpfs                  1024324         0   1024324   0% /dev/shm
tmpfs                  1024324    103172    921152  10% /run
tmpfs                  1024324         0   1024324   0% /sys/fs/cgroup
tmpfs                  1024324        52   1024272   0% /tmp
/dev/sda1             18714020   1887624  15837264  11% /mnt/sda1
/hosthome            915156316 609994660 305161656  67% /hosthome

@r2d4
Copy link
Contributor

r2d4 commented Feb 16, 2017

@peterrosell you're right! We happily accept PRs, or if not, we will get around to updating the documentation soon.

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

No branches or pull requests

5 participants