Docker-machine fails to build VMware machine and enable shared folders

Hi,
I have a Mac running macOS 10.13.4 and have done a brew install of docker, docker-machine and docker-compose. I have also installed docker-machine-driver-vmare.

When I build a machine, although the machine is created and I can ssh to it and even use “docker run” to create containers. I cannot access any of the host machine’s files.

Running docker-machine --debug create --driver vmware medium I get the following debug messages:

(medium) DBG | Creating Tar key bundle…
(medium) DBG | executing: /Applications/VMware Fusion.app/Contents/Public/vmrun -gu docker -gp tcuser directoryExistsInGuest /Users/ddix/.docker/machine/machines/medium/medium.vmx /var/lib/boot2docker
(medium) DBG | The directory exists.
(medium) DBG | executing: /Applications/VMware Fusion.app/Contents/Public/vmrun -gu docker -gp tcuser CopyFileFromHostToGuest /Users/ddix/.docker/machine/machines/medium/medium.vmx /Users/ddix/.docker/machine/machines/medium/userdata.tar /home/docker/userdata.tar
(medium) DBG | executing: /Applications/VMware Fusion.app/Contents/Public/vmrun -gu docker -gp tcuser runScriptInGuest /Users/ddix/.docker/machine/machines/medium/medium.vmx /bin/sh sudo sh -c “tar xvf /home/docker/userdata.tar -C /home/docker > /var/log/userdata.log 2>&1 && chown -R docker:staff /home/docker”
(medium) DBG | executing: /Applications/VMware Fusion.app/Contents/Public/vmrun -gu docker -gp tcuser runScriptInGuest /Users/ddix/.docker/machine/machines/medium/medium.vmx /bin/sh sudo /bin/mv /home/docker/userdata.tar /var/lib/boot2docker/userdata.tar
(medium) DBG | executing: /Applications/VMware Fusion.app/Contents/Public/vmrun -gu docker -gp tcuser enableSharedFolders /Users/ddix/.docker/machine/machines/medium/medium.vmx
(medium) DBG | Error: There was an error mounting the Shared Folders file system inside the guest operating system
(medium) DBG | executing: /Applications/VMware Fusion.app/Contents/Public/vmrun -gu docker -gp tcuser addSharedFolder /Users/ddix/.docker/machine/machines/medium/medium.vmx Users /Users
(medium) DBG | Error: There was an error mounting the Shared Folders file system inside the guest operating system
(medium) DBG | executing: /Applications/VMware Fusion.app/Contents/Public/vmrun -gu docker -gp tcuser runScriptInGuest /Users/ddix/.docker/machine/machines/medium/medium.vmx /bin/sh [ ! -d /hosthome ]&& sudo mkdir /hosthome; sudo mount --bind /mnt/hgfs//hosthome /hosthome || [ -f /usr/local/bin/vmhgfs-fuse ]&& sudo /usr/local/bin/vmhgfs-fuse -o allow_other .host:/Users /hosthome || sudo mount -t vmhgfs -o uid=$(id -u),gid=$(id -g) .host:/Users /hosthome

The enableSharedFolders and addSharedFolder commands are failing, but if I ssh into the machine I can see that the hfs driver is working because it has mounted /mnt/hgfs and /mnt/hosthome. I can also browse any of the Mac host files from these mount points.

Can anyone point me in the direction of what I may be doing wrong or how to resolve this?

VMware Fusion: VMware Fusion: Professional Version 10.1.1 (7520154)
docker-machine: docker-machine version 0.14.0, build 89b8332docker

1 Like