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

Add 9p support for mounting /home #2

Open
dhiltgen opened this issue Sep 11, 2015 · 5 comments
Open

Add 9p support for mounting /home #2

dhiltgen opened this issue Sep 11, 2015 · 5 comments

Comments

@dhiltgen
Copy link
Owner

No description provided.

@jimmidyson
Copy link

Any thoughts on this? Would love this for minikube/minishift.

@dhiltgen
Copy link
Owner Author

Haven't had the bandwidth to investigate it. Long long ago I played with KVM+9p on a different project and found it was too flaky for what I was trying to do (nested builds within a VM) so I abandoned it. Perhaps things are more stable/reliable now... I'm not sure.

@afbjorklund
Copy link

As a workaround, I added a "sshfs"* command: docker/machine#4018
You can use it to mount some machine directory locally (i.e. over SSH).

As far as I know* , 9p is deprecated and vsock is emerging...
Which probably leaves NFS or something as the only option.

@afbjorklund
Copy link

The current Boot2Docker image still has 9p support, though.

https://github.com/boot2docker/boot2docker/blob/master/kernel_config

CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
# CONFIG_NET_9P_DEBUG is not set
CONFIG_9P_FS=y
CONFIG_9P_FS_POSIX_ACL=y
# CONFIG_9P_FS_SECURITY is not set

Then again it still uses AUFS as the storage driver, as well...

https://github.com/boot2docker/boot2docker/blob/master/Dockerfile

# https://www.kernel.org/
ENV KERNEL_VERSION  4.4.74

# http://aufs.sourceforge.net/
ENV AUFS_REPO       https://github.com/sfjro/aufs4-standalone
ENV AUFS_BRANCH     aufs4.4
ENV AUFS_COMMIT     dcfa30307f2a165069545a0ad2094ca31fcb490b

But maybe 9p is still a reasonable option, until virtio-vsock lands ?
(and even then, it would still need something like NFS on top of it too)

And it looks like there are SELinux things left to sort out, as well...
(even though there might be "Virt-FS" support available in RHEL 7.x)

@afbjorklund
Copy link

Using 9p does work OK, but the current boot2docker ISO doesn't mount /hosthome under KVM.

https://github.com/docker/machine/blob/master/drivers/virtualbox/virtualbox_linux.go#L40

https://github.com/docker/machine/blob/master/drivers/virtualbox/virtualbox.go#L445

So it will only mount /Users (Mac) and /C/Users (Win), and only for the VirtualBox driver.


To make this work, there are changes needed both for machine (in driver) and for boot2docker.

https://wiki.qemu.org/Documentation/9psetup

-fsdev local,id=test_dev,path=/home/guest/9p_setup/shared,security_model=none -device virtio-9p-pci,fsdev=test_dev,mount_tag=test_mount

 mount -t 9p -o trans=virtio test_mount /tmp/shared/ -oversion=9p2000.L,posixacl,cache=loose

But whole design, with hardcoding /Users /C/Users /home, seems to be a bit flawed anyway ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants