Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

host volumes not working with vmwarefusion driver #641

Closed
adambiggs opened this issue Feb 27, 2015 · 37 comments
Closed

host volumes not working with vmwarefusion driver #641

adambiggs opened this issue Feb 27, 2015 · 37 comments

Comments

@adambiggs
Copy link

I just tried using docker-machine v0.1.0 with VMWare Fusion 7.1.1, but whenever I try to mount a host volume inside a container, the volume shows up empty...

docker-machine version 0.1.0
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): darwin/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
@sthulb
Copy link
Contributor

sthulb commented Feb 27, 2015

This is a known issue. It's being worked on.

@idyll
Copy link

idyll commented Mar 1, 2015

This causes all sorts of strange behaviour upstream when you don't expect it. Is there a good place to document this?

I spend several hours tracing this back because I thought Docker Compose was broken.

@mbrevoort
Copy link

+1

@alexisvincent
Copy link

+1

@oppegard
Copy link

oppegard commented Mar 6, 2015

+1

Agreed this should be documented; I also spent a fair bit of time trying to figure out if I was doing something wrong since no error was given and the missing feature isn't documented.

@alexisvincent
Copy link

So, this is rather an important issue... Is anyone working on it?

@sthulb
Copy link
Contributor

sthulb commented Mar 20, 2015

This is pretty much a dupe of #13

@duffytilleman
Copy link

+1, and even though Machine is in beta, it might be nice to have a list of which drivers support host volumes in the documentation.

@ream88
Copy link

ream88 commented Apr 6, 2015

I spend several hours tracing this back because I thought Docker Compose was broken. [2]

@cmoro-deusto
Copy link

+1 thanks very much

@frapposelli
Copy link
Contributor

AFAIK only Virtualbox supports mounting local volumes through the shared folders feat. we expect to have the same feature on Fusion with Docker 1.7.0 as B2D has to move to a 64bit userspace for shared folders to work with Fusion. see boot2docker/boot2docker#747 and boot2docker/boot2docker#748

@parknicker
Copy link

@frapposelli does shared folder support work with the VMWare Fusion driver in Docker 1.5/1.6 if it's run against the b2d image on your VMWare 64-bit branch (https://github.com/frapposelli/boot2docker/tree/vmware-64bit)?

@frapposelli
Copy link
Contributor

@parknicker yes it does, the branch is still in flux but has been tested on 1.5.0 and it's the one I use daily to build stuff.

Note that you'll have to mount /Users manually inside the machine as it's not done by the driver today.

@frapposelli
Copy link
Contributor

This PR adds shared folders support for Fusion #1034

@SvenDowideit
Copy link
Contributor

I've rebased the 64 bit boot2docker in #854 - lets see if we can get this merged for testing soon :)

@adambiggs
Copy link
Author

I just gave this another try with Compose 1.3.0rc1, Machine 0.3.0-dev, VMware Fusion 7.1.1, and the latest boot2docker.iso, but I still have the exact same problem. All volumes mapped to the host are empty... Am I missing something?

This is the command I used:

docker-machine create --driver vmwarefusion --vmwarefusion-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.6.2/boot2docker.iso --vmwarefusion-memory-size 4096 lmpm

@adambiggs
Copy link
Author

After some digging around, I came across @SvenDowideit's iso here: https://github.com/SvenDowideit/boot2docker/releases/tag/x64rc1

After rebuilding with that image, everything now seems to be working! 🍻

@Rodeoclash
Copy link

@adambiggs does Sven's release enable support for mounted volumes in all cases (Virtualbox, Digital Ocean etc) or just with Fusion?

@adambiggs
Copy link
Author

@Rodeoclash I’ve only tested with fusion.

@ehazlett
Copy link
Contributor

@Rodeoclash the local shared directory support is only for local providers (VirtualBox, VMware Fusion)

@adambiggs
Copy link
Author

Ok I've been testing with the above mentioned setup and have run into another problem...

Shared volumes show up inside containers, and files can be read as expected, but writing to a file causes it to become corrupted. The contents show up as empty.

Should I open a different issue for this?

@adambiggs
Copy link
Author

I was able to reproduce this from inside boot2docker by editing the same files inside the /Users/... shared directory.

Seems like maybe a vmhgfs problem... I know there have been similar issues in the past.

@ehazlett
Copy link
Contributor

ehazlett commented Jun 2, 2015

@adambiggs yeah we've seen the same issue (#1275).

@vovimayhem
Copy link

+1!

@idyll
Copy link

idyll commented Jun 14, 2015

If you use the the latest "rc2" of machine and compile your own boot2docker from master this is resolved.

Just waiting for official release.

@ehazlett
Copy link
Contributor

FYI you can also use the b2d RC candidates here: https://github.com/tianon/boot2docker/releases

@hairyhenderson
Copy link
Contributor

So... B2D 1.7 was released - should this issue be closed now?
/cc @adambiggs @ehazlett

@adambiggs
Copy link
Author

Yes this is now working for me.

@hairyhenderson
Copy link
Contributor

🎉

@CWSpear
Copy link

CWSpear commented Sep 7, 2015

I don't know if this is related, but I have an issue where if the size of my file does not change, then it doesn't get copied to the guest.

As far as I can tell, it has to do with the vmhgfs of sharing files, as I've had issues with this before with Vagrant, too, and if I use nfs, all is well. Looking through the code, it looks like it's hard coded with vmhgfs, tho, and so I can't find a way for it to pick up changes unless the size of the file changes, which is a lot more annoying than one might think.

@dallas
Copy link

dallas commented Oct 16, 2015

This seems to still be an issue for me.

Docker version 1.8.3, build f4bf5c7
docker-machine version 0.4.1 (HEAD)
docker-compose version: 1.4.2
Boot2Docker version 1.8.3, build master : af8b089 - Mon Oct 12 18:56:54 UTC 2015

Inside docker-machine ssh dev:

docker@dev:~$ ls -la /Users/dallas/Code/church-donation/
total 0
drwxr-xr-x    2 root     root            40 Oct 16 15:17 ./
drwxr-xr-x    3 root     root            60 Oct 16 15:17 ../

should have these files:

dallas > ~ > Code > church-donation > tree -aL 1
.
├── .dockerignore
├── .git
├── .gitignore
├── .yo-rc.json
├── Dockerfile
├── LICENSE
├── app
├── bin
├── bower.json
├── docker-compose.yml
├── gulpfile.coffee
├── package.json
├── src
├── test
├── webpack.config.coffee
└── webpack.config.mine.coffee

5 directories, 11 files

@frapposelli
Copy link
Contributor

@dallas can you please open a new issue and CC me? Shared folders support has changed dramatically since this issue was worked on.

Make sure to include a df -h in the new issue.

@dallas
Copy link

dallas commented Oct 16, 2015

Perhaps I should also mention this is all on a brand new MacBook Pro running El Capitan. VMware Fusion version 8.0.1 (3094680). I had initially downloaded and install the Docker Toolkit with VirtualBox and then later added VMware Fusion at which point I completely uninstalled Docker (using this script: https://github.com/docker/toolbox/blob/master/osx/uninstall.sh) and VirtualBox (by manual file deletion) and then reinstalled the Docker tools listed above using Homebrew.

@dallas
Copy link

dallas commented Oct 16, 2015

Will do. Thanks, @frapposelli!

@theladyjaye
Copy link

I am getting the same issue as @dallas. I'm on 10.10 though. Tried with both fusion 7 and fusion 8.

@frapposelli
Copy link
Contributor

@aventurella see #1995

@theladyjaye
Copy link

@frapposelli yup.. sorry I was literally just in 1995 and started building it and I was about to come back here and edit my last comment to see #1995 =)

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

No branches or pull requests