I'm trying to mount two directories on my boot2docker vm to share them with a docker container.
I run this :
boot2docker --vbox-share="/nfs/zfs-student-3/users/2013_paris/user/Code/web/mysite/logs=logs:/nfs/zfs-student-3/users/2013_paris/user/Code/web/mysite/data=data" up
boot2docker ssh "sudo mkdir /data; sudo mount -t vboxsf data /data"
boot2docker ssh "sudo mkdir /logs; sudo mount -t vboxsf logs /logs"
But I got the following :
mount.vboxsf: mounting failed with the error: Protocol error
mount: mounting data on /data failed: Invalid argument
error in run: exit status 1
mount.vboxsf: mounting failed with the error: Protocol error
mount: mounting logs on /logs failed: Invalid argument
error in run: exit status 1
What could be the reason and how could I fix this?
I also tried this tutorial : https://medium.com/boot2docker-lightweight-linux-for-docker/boot2docker-together-with-virtualbox-guest-additions-da1e3ab2465c
But I only get a "permission denied" when trying to mount the volume.
Boot2docker's version is 1.7.1, virtualbox's is 4.3.22.
Everything was ok, but I had to do a fresh installation.
I followed these steps (from here) :
boot2docker delete
brew uninstall docker
brew uninstall boot2docker
rm -rf /Users/<your-username>/.boot2docker/
rm -rf /Users/<your-username>/VirtualBox\ VMs/boot2docker-vm
brew install boot2docker
boot2docker init
boot2docker up
And it worked fine! I think there was just something wrong with my VM.