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

Volumes: vboxguest + vboxsf modules #282

Closed
steeve opened this Issue Mar 13, 2014 · 16 comments

Comments

Projects
None yet
9 participants
@steeve
Contributor

steeve commented Mar 13, 2014

After discussing with @samalba, we've seen that the VBox modules are pretty small.

Considering there is still a lot of work to do before NFS and/or SMB becomes a viable option, I'm proposing we include them in the image, at least for now.

Sure, it won't be the fastest thing. Sure, it will tie us to VBox (we are anyway via boot2docker-cli), but it will relieve a lot of pain for our users, in the interim of a better solution.

They will be built in rootfs/Dockerfile

-rw-r--r-- 1 root root 376K Feb 27 01:13 vboxguest.ko
-rw-r--r-- 1 root root  70K Feb 27 01:13 vboxsf.ko
-rw-r--r-- 1 root root 6.6K Feb 27 01:13 vboxvideo.ko
@samalba

This comment has been minimized.

Show comment
Hide comment
@samalba

samalba Mar 13, 2014

👍

Being tied to VBox is not a big deal right now. If we switch to something else (nfs) later, it won't change the UI and it will be transparent for the user...

samalba commented Mar 13, 2014

👍

Being tied to VBox is not a big deal right now. If we switch to something else (nfs) later, it won't change the UI and it will be transparent for the user...

@steeve

This comment has been minimized.

Show comment
Hide comment
@steeve

steeve Mar 13, 2014

Contributor
filename:       /lib/modules/3.8.0-35-generic/updates/dkms/vboxguest.ko
version:        4.3.8
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation
srcversion:     218713B77F864CE49260220
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
depends:
vermagic:       3.8.0-35-generic SMP mod_unload modversions
filename:       /lib/modules/3.8.0-35-generic/updates/dkms/vboxsf.ko
version:        4.3.8 (interface 0x00010004)
license:        GPL
author:         Oracle Corporation
description:    Oracle VM VirtualBox VFS Module for Host File System Access
srcversion:     5FCE44049D9999314F6022B
depends:        vboxguest
vermagic:       3.8.0-35-generic SMP mod_unload modversions
parm:           follow_symlinks:Let host resolve symlinks rather than showing them (int)
Contributor

steeve commented Mar 13, 2014

filename:       /lib/modules/3.8.0-35-generic/updates/dkms/vboxguest.ko
version:        4.3.8
license:        GPL
description:    Oracle VM VirtualBox Guest Additions for Linux Module
author:         Oracle Corporation
srcversion:     218713B77F864CE49260220
alias:          pci:v000080EEd0000CAFEsv00000000sd00000000bc*sc*i*
depends:
vermagic:       3.8.0-35-generic SMP mod_unload modversions
filename:       /lib/modules/3.8.0-35-generic/updates/dkms/vboxsf.ko
version:        4.3.8 (interface 0x00010004)
license:        GPL
author:         Oracle Corporation
description:    Oracle VM VirtualBox VFS Module for Host File System Access
srcversion:     5FCE44049D9999314F6022B
depends:        vboxguest
vermagic:       3.8.0-35-generic SMP mod_unload modversions
parm:           follow_symlinks:Let host resolve symlinks rather than showing them (int)

steeve added a commit that referenced this issue Mar 14, 2014

@SvenDowideit

This comment has been minimized.

Show comment
Hide comment
@SvenDowideit

SvenDowideit Mar 14, 2014

Contributor

@samalba it will change the UI, as the nfs share will be from a data-volume (ie, you mount the share on your OSX box) rather than the less secure and less perfomant mount an nfs share on my OSX into the VM, and then bind mount it into the container.

imo having the data located on the docker host is safer, places the data where it is processed, and sets the docker user up using a pattern that will work well when they deploy the container to their production farm.

Contributor

SvenDowideit commented Mar 14, 2014

@samalba it will change the UI, as the nfs share will be from a data-volume (ie, you mount the share on your OSX box) rather than the less secure and less perfomant mount an nfs share on my OSX into the VM, and then bind mount it into the container.

imo having the data located on the docker host is safer, places the data where it is processed, and sets the docker user up using a pattern that will work well when they deploy the container to their production farm.

steeve added a commit that referenced this issue Mar 14, 2014

steeve added a commit that referenced this issue Mar 14, 2014

@eugeneware

This comment has been minimized.

Show comment
Hide comment
@eugeneware

eugeneware Mar 18, 2014

Contributor

My own caveat to adding vboxfs is that there's a serious bug with vboxfs at the moment (https://www.virtualbox.org/ticket/819#comment:55) that prevents you doing mmap calls. So if you're trying to run anything that needs to do memory mapped operations using a mapped file system (like most databases, and a lot of software that uses mmap under the hood - eg. apache), then it's a non-starter.

It doesn't seem to be high on their list of priorities to fix at the moment. Many people won't have a problem with that, but for a lot of my use cases the only viable option is nfs which I can't wait to be supported as a first-class citizen in boot2docker.

Contributor

eugeneware commented Mar 18, 2014

My own caveat to adding vboxfs is that there's a serious bug with vboxfs at the moment (https://www.virtualbox.org/ticket/819#comment:55) that prevents you doing mmap calls. So if you're trying to run anything that needs to do memory mapped operations using a mapped file system (like most databases, and a lot of software that uses mmap under the hood - eg. apache), then it's a non-starter.

It doesn't seem to be high on their list of priorities to fix at the moment. Many people won't have a problem with that, but for a lot of my use cases the only viable option is nfs which I can't wait to be supported as a first-class citizen in boot2docker.

@dduportal

This comment has been minimized.

Show comment
Hide comment
@dduportal

dduportal Mar 27, 2014

Contributor

👍 Because running docker on a constrained dev windows env is pretty straightforward. Bringing boot2docker with vboxsf will ease all ! (Replacing an ubuntu ~700 Mo base box by boot2docker will change all user experience and adoption ! )

Thanks for implementing this !

Contributor

dduportal commented Mar 27, 2014

👍 Because running docker on a constrained dev windows env is pretty straightforward. Bringing boot2docker with vboxsf will ease all ! (Replacing an ubuntu ~700 Mo base box by boot2docker will change all user experience and adoption ! )

Thanks for implementing this !

nsfmc added a commit to nsfmc/boot2docker that referenced this issue Mar 29, 2014

@shaftoe

This comment has been minimized.

Show comment
Hide comment
@shaftoe

shaftoe Apr 5, 2014

To us the missing sharing folders feature is a blocker, given that we use Docker mainly to run tests on code files living on our host desktop/laptop machines. So thanks a lot @steeve for the iso 👍

shaftoe commented Apr 5, 2014

To us the missing sharing folders feature is a blocker, given that we use Docker mainly to run tests on code files living on our host desktop/laptop machines. So thanks a lot @steeve for the iso 👍

@sysless

This comment has been minimized.

Show comment
Hide comment
@sysless

sysless Apr 7, 2014

👍 This is a must-have to run quick tests on local machine.

sysless commented Apr 7, 2014

👍 This is a must-have to run quick tests on local machine.

@dduportal

This comment has been minimized.

Show comment
Hide comment
@dduportal

dduportal Apr 9, 2014

Contributor

@steeve @samalba i tried to build a vagrant box with boot2docker inside (Goal : running this into a Windows env).
I used the @mitchellh repository for building my basebox (https://github.com/mitchellh/boot2docker-vagrant-box), using the iso pointed by @steeve in #284.

It seems that Vagrant use these commands for mounting shared folder inside the VM :

mount -t vboxsf -o uid=`id -u docker`,gid=`getent group docker | cut -d: -f3` /home/docker /home/docker
mount -t vboxsf -o uid=`id -u docker`,gid=`id -g docker` /home/docker /home/docker

But it works when mounting manually (while vagrant has auto-configured the VBox mount, i just had to run a sudo mount -t vboxsf with basic parameters) 👍

The vagrant error came from getent binary (http://man7.org/linux/man-pages/man1/getent.1.html) isn't installed so from here, two roads :

  • Pull requesting Vagrant for managing vbox sharedfolder for Tiny Core Linux guests (https://github.com/mitchellh/vagrant/tree/master/plugins/guests/tinycore) : aiming at using a simpler mount command
  • Installing getent into boot2docker from boot2docker-vagrant project (i understand this is not the philosophy of boot2docker, so moving it appart seems the "right" decision).

What do you think about it ?

Is there any plan for docker / boot2docker from Windows as light as possible ?

Contributor

dduportal commented Apr 9, 2014

@steeve @samalba i tried to build a vagrant box with boot2docker inside (Goal : running this into a Windows env).
I used the @mitchellh repository for building my basebox (https://github.com/mitchellh/boot2docker-vagrant-box), using the iso pointed by @steeve in #284.

It seems that Vagrant use these commands for mounting shared folder inside the VM :

mount -t vboxsf -o uid=`id -u docker`,gid=`getent group docker | cut -d: -f3` /home/docker /home/docker
mount -t vboxsf -o uid=`id -u docker`,gid=`id -g docker` /home/docker /home/docker

But it works when mounting manually (while vagrant has auto-configured the VBox mount, i just had to run a sudo mount -t vboxsf with basic parameters) 👍

The vagrant error came from getent binary (http://man7.org/linux/man-pages/man1/getent.1.html) isn't installed so from here, two roads :

  • Pull requesting Vagrant for managing vbox sharedfolder for Tiny Core Linux guests (https://github.com/mitchellh/vagrant/tree/master/plugins/guests/tinycore) : aiming at using a simpler mount command
  • Installing getent into boot2docker from boot2docker-vagrant project (i understand this is not the philosophy of boot2docker, so moving it appart seems the "right" decision).

What do you think about it ?

Is there any plan for docker / boot2docker from Windows as light as possible ?

@dduportal

This comment has been minimized.

Show comment
Hide comment
@dduportal

dduportal Apr 21, 2014

Contributor

Here is a working version for building a vagrant basebox with vboxsf by default for /vagrant mount : https://github.com/dduportal/boot2docker-vagrant-box/tree/1a92a02eb8839d5210df044e9553f5f06e098090.

It works very well !

Contributor

dduportal commented Apr 21, 2014

Here is a working version for building a vagrant basebox with vboxsf by default for /vagrant mount : https://github.com/dduportal/boot2docker-vagrant-box/tree/1a92a02eb8839d5210df044e9553f5f06e098090.

It works very well !

@leeola

This comment has been minimized.

Show comment
Hide comment
@leeola

leeola Apr 22, 2014

👍 #284 is a lifesaver. I'm not sure what the "right" move is, but from a UX perspective 284 was amazing for me.

leeola commented Apr 22, 2014

👍 #284 is a lifesaver. I'm not sure what the "right" move is, but from a UX perspective 284 was amazing for me.

@SvenDowideit

This comment has been minimized.

Show comment
Hide comment
@SvenDowideit

SvenDowideit May 30, 2014

Contributor

we're making boot2docker as simple and small as possible - so at this point, adding tools that are not relevant to all usecases (bare HW, vbox, vagrant, hyper-v, vmware, kvm, etc) is not on the plan. This may change in future, but we havn't completed our original feature set yet.

Contributor

SvenDowideit commented May 30, 2014

we're making boot2docker as simple and small as possible - so at this point, adding tools that are not relevant to all usecases (bare HW, vbox, vagrant, hyper-v, vmware, kvm, etc) is not on the plan. This may change in future, but we havn't completed our original feature set yet.

@leeola

This comment has been minimized.

Show comment
Hide comment
@leeola

leeola May 30, 2014

Can't say i agree that sharing folders / forwarding ports via docker isn't in the normal use case, but oh well. If you can, update the documentation to reflect a "roll your own" approach, rather than pointing to this thread as a solution edit: Pointing to 284, that is

leeola commented May 30, 2014

Can't say i agree that sharing folders / forwarding ports via docker isn't in the normal use case, but oh well. If you can, update the documentation to reflect a "roll your own" approach, rather than pointing to this thread as a solution edit: Pointing to 284, that is

@SvenDowideit

This comment has been minimized.

Show comment
Hide comment
@SvenDowideit

SvenDowideit May 30, 2014

Contributor

@leeolayvar you don't need vbox extensions for that. thats kinda the point - port forwarding works now, and sharing folders is much more scalable and docker-ized if you use volume containers and share from there. Especially when you then consider that running in vbox is a gateway to running b2d on real hardware.

Contributor

SvenDowideit commented May 30, 2014

@leeolayvar you don't need vbox extensions for that. thats kinda the point - port forwarding works now, and sharing folders is much more scalable and docker-ized if you use volume containers and share from there. Especially when you then consider that running in vbox is a gateway to running b2d on real hardware.

@SvenDowideit

This comment has been minimized.

Show comment
Hide comment
@SvenDowideit

SvenDowideit May 30, 2014

Contributor

Yes, I am working on real documentation - but havn't gotten to it yet.

Contributor

SvenDowideit commented May 30, 2014

Yes, I am working on real documentation - but havn't gotten to it yet.

@steeve

This comment has been minimized.

Show comment
Hide comment
@steeve

steeve May 30, 2014

Contributor

@leeolayvar check out PR #284

Contributor

steeve commented May 30, 2014

@leeolayvar check out PR #284

@jmmills

This comment has been minimized.

Show comment
Hide comment
@jmmills

jmmills Jul 2, 2014

I've got this method working, and it does behave nicely with things like fig.
Now it seems however that since the guest additions are running that clock sync is functioning but in my particular case the guest is syncing 2 seconds behind the host, which causes things like make to complain about files with {m,c,a}times in the future.

jmmills commented Jul 2, 2014

I've got this method working, and it does behave nicely with things like fig.
Now it seems however that since the guest additions are running that clock sync is functioning but in my particular case the guest is syncing 2 seconds behind the host, which causes things like make to complain about files with {m,c,a}times in the future.

steeve added a commit that referenced this issue Aug 4, 2014

tianon added a commit to tianon/boot2docker-legacy that referenced this issue Sep 8, 2014

tianon added a commit to tianon/boot2docker-legacy that referenced this issue Sep 8, 2014

tianon added a commit to tianon/boot2docker-legacy that referenced this issue Sep 10, 2014

tianon added a commit to tianon/boot2docker-legacy that referenced this issue Sep 10, 2014

tianon added a commit to tianon/boot2docker-legacy that referenced this issue Sep 11, 2014

tianon added a commit to tianon/boot2docker-legacy that referenced this issue Sep 11, 2014

tianon added a commit to tianon/boot2docker-legacy that referenced this issue Sep 14, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment