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

Shared folders do not work with VMware Fusion 11.0.1 #15

Open
StefanScherer opened this issue Nov 17, 2018 · 8 comments
Open

Shared folders do not work with VMware Fusion 11.0.1 #15

StefanScherer opened this issue Nov 17, 2018 · 8 comments
Assignees

Comments

@StefanScherer
Copy link

I tried to create a Docker Machine with the boot2docker 18.06.1 ISO with both the built-in vmwarefusion driver and this vmware driver plugin from this repo, but with both I see an error mounting the shared folder into the VM.

I'm using VMware Fusion Pro 11.0.1 on macOS 10.14 and docker-machine 0.15.0 from Docker for Mac 18.06.1-ce-mac73.

vmware driver

With the machine-drivers/docker-machine-driver-vmware driver (here is the gist of the debug output) a machine is created, but there is no shared folder

$ docker-machine -D create -d vmware --vmware-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso vm18061
~/code/boot2docker on master*
$ ls 
Dockerfile      LICENSE         README.md       comment.md      stack.yml
~/code/boot2docker on master*
$ docker run -v $(pwd):/code alpine ls -a /code
.
..

-> lines 358ff of the debug output during creation shows errors Error: There was an error mounting the Shared Folders file system inside the guest operating system

vmwarefusion driver

With the vmwarefusion driver (here is the gist of the debug output) the creation aborts with an error.

$ docker-machine -D create -d vmwarefusion --vmwarefusion-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso vmw18061
...
Error creating machine: Error in driver during machine creation: exit status 255
notifying bugsnag: [Error creating machine: Error in driver during machine creation: exit status 255]

# try to enable shared folder manually again:

$ "/Applications/VMware Fusion.app/Contents/Public/vmrun" -gu docker -gp tcuser enableSharedFolders /Users/stefan/.docker/machine/machines/vmw18061/vmw18061.vmx
Error: There was an error mounting the Shared Folders file system inside the guest operating system

Does anybody else experience this problem with VMware Fusion 11?

@StefanScherer StefanScherer changed the title Shared folders does not work with VMware Fusion 11.0.1 Shared folders do not work with VMware Fusion 11.0.1 Nov 17, 2018
@jeffwubj
Copy link

Would mind having a try:

  1. "/Applications/VMware Fusion.app/Contents/Public/vmrun" start /Users/stefan/.docker/machine/machines/vmw18061/vmw18061.vmx nogui
  2. "/Applications/VMware Fusion.app/Contents/Public/vmrun" -gu docker -gp tcuser enableSharedFolders /Users/stefan/.docker/machine/machines/vmw18061/vmw18061.vmx
  3. Parse logs under ~/Library/Logs/VMware/vmware-vix-[xxxx].log, you can clear logs under that forlder before fetching new ones

@StefanScherer
Copy link
Author

Thanks @jeffwubj to point me to the logs folder.

This is what I did.

  1. docker-machine -D create -d vmwarefusion --vmwarefusion-boot2docker-url=https://github.com/boot2docker/boot2docker/releases/download/v18.06.1-ce/boot2docker.iso vmw18061
  2. To find the log better I then manually disabled the shared folder again with
    "/Applications/VMware Fusion.app/Contents/Public/vmrun" -gu docker -gp tcuser disableSharedFolders /Users/stefan/.docker/machine/machines/vmw18061/vmw18061.vmx
    No error happens here.
  3. rm ~/Library/Logs/VMware/vmware-vix*.log
  4. "/Applications/VMware Fusion.app/Contents/Public/vmrun" -gu docker -gp tcuser enableSharedFolders /Users/stefan/.docker/machine/machines/vmw18061/vmw18061.vmx
  5. ls -l ~/Library/Logs/VMware/

Step 4 gives me an error

$ "/Applications/VMware Fusion.app/Contents/Public/vmrun" -gu docker -gp tcuser enableSharedFolders /Users/stefan/.docker/machine/machines/vmw18061/vmw18061.vmx
Error: There was an error mounting the Shared Folders file system inside the guest operating system
~/Library/Logs/VMware
$ echo $?
255

The corresponding vmware-vix-33495.log is this

2018-11-21T08:44:14.766+01:00| vix| I125: Log for Vix pid=33495 version=-1 build=build-10738065 option=Release
2018-11-21T08:44:14.766+01:00| vix| I125: The process is 64-bit.
2018-11-21T08:44:14.766+01:00| vix| I125: Host codepage=UTF-8 encoding=UTF-8
2018-11-21T08:44:14.766+01:00| vix| I125: Host is Mac OS X 10.14.1 (18B75) Darwin 18.2.0
2018-11-21T08:44:14.760+01:00| vix| I125: DictionaryLoad: Cannot open file "/Library/Preferences/VMware Fusion/config": No such file or directory.
2018-11-21T08:44:14.760+01:00| vix| I125: [msg.dictionary.load.openFailed] Cannot open file "/Library/Preferences/VMware Fusion/config": No such file or directory.
2018-11-21T08:44:14.760+01:00| vix| I125: PREF Optional preferences file not found at /Library/Preferences/VMware Fusion/config. Using default values.
2018-11-21T08:44:14.760+01:00| vix| I125: DictionaryLoad: Cannot open file "/Applications/VMware Fusion.app/Contents/Library/settings": No such file or directory.
2018-11-21T08:44:14.760+01:00| vix| I125: [msg.dictionary.load.openFailed] Cannot open file "/Applications/VMware Fusion.app/Contents/Library/settings": No such file or directory.
2018-11-21T08:44:14.760+01:00| vix| I125: PREF Optional preferences file not found at /Applications/VMware Fusion.app/Contents/Library/settings. Using default values.
2018-11-21T08:44:14.760+01:00| vix| I125: DictionaryLoad: Cannot open file "/Applications/VMware Fusion.app/Contents/Library/config": No such file or directory.
2018-11-21T08:44:14.760+01:00| vix| I125: [msg.dictionary.load.openFailed] Cannot open file "/Applications/VMware Fusion.app/Contents/Library/config": No such file or directory.
2018-11-21T08:44:14.760+01:00| vix| I125: PREF Optional preferences file not found at /Applications/VMware Fusion.app/Contents/Library/config. Using default values.
2018-11-21T08:44:14.760+01:00| vix| I125: DictionaryLoad: Cannot open file "/Users/stefan/Library/Preferences/VMware Fusion/config": No such file or directory.
2018-11-21T08:44:14.760+01:00| vix| I125: [msg.dictionary.load.openFailed] Cannot open file "/Users/stefan/Library/Preferences/VMware Fusion/config": No such file or directory.
2018-11-21T08:44:14.760+01:00| vix| I125: PREF Optional preferences file not found at /Users/stefan/Library/Preferences/VMware Fusion/config. Using default values.
2018-11-21T08:44:14.765+01:00| vix| I125: lib/ssl: OpenSSL using RAND_SSLeay for RAND
2018-11-21T08:44:14.765+01:00| vix| I125: lib/ssl: protocol list tls1.2
2018-11-21T08:44:14.765+01:00| vix| I125: lib/ssl: protocol list tls1.2 (openssl flags 0x17000000)
2018-11-21T08:44:14.765+01:00| vix| I125: lib/ssl: cipher list !aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES
2018-11-21T08:44:14.766+01:00| vix| I125: OBJLIB-LIB: Objlib initialized.
2018-11-21T08:44:14.766+01:00| vix| I125: Foundry Init: setting up global state (1 poll threads, 0 worker threads).
2018-11-21T08:44:14.766+01:00| vix| I125: Vix_InitializeGlobalState: vixLogLevel = 0
2018-11-21T08:44:14.766+01:00| vix| I125: Vix_InitializeGlobalState: vixApiTraceLevel = 0
2018-11-21T08:44:14.766+01:00| vix| I125: Vix_InitializeGlobalState: vixDebugPanicOnVixAssert = 0
2018-11-21T08:44:14.766+01:00| vix| I125: Vix_InitializeGlobalState: vixLogRefcountOnFinalRelease = 0
2018-11-21T08:44:14.766+01:00| vix| I125: Vix_InitializeGlobalState: asyncOpWarningThreshold = 1000000
2018-11-21T08:44:14.766+01:00| vix| I125: Vix_InitializeGlobalState: enableSyncOpSelection = FALSE
2018-11-21T08:44:14.766+01:00| vix| I125: Vix_InitializeGlobalState: enableExternalThreadInterface = TRUE
2018-11-21T08:44:14.766+01:00| vix| I125: Vix_InitializeGlobalState: enableVigor = FALSE
2018-11-21T08:44:14.769+01:00| vix| I125: Msg_SetLocaleEx: HostLocale=UTF-8 UserLocale=en
2018-11-21T08:44:14.769+01:00| vix| I125: DictionaryLoad: Cannot open file "/Applications/VMware Fusion.app/Contents/Library/messages/en/vmware.vmsg": No such file or directory.
2018-11-21T08:44:14.770+01:00| vix| I125: VixHost_ConnectEx: version -1, hostType 1, hostName (null), hostPort 0, options 0
2018-11-21T08:44:14.770+01:00| vix-poll| I125: Vix: [foundryAsyncOps.c:1975]: FoundryAsyncOp_ThreadMainLoop: Vix poll thread started.
2018-11-21T08:44:14.799+01:00| vix| I125: WQPoolAllocPoll : pollIx = 1, signalHandle = 21
2018-11-21T08:44:14.799+01:00| vix| I125: vmxFilePath="/Applications/VMware Fusion.app/Contents/Library/vmware-vmx"
2018-11-21T08:44:14.799+01:00| vix| I125: vmxFilePathDebug="/Applications/VMware Fusion.app/Contents/Library/vmware-vmx-debug"
2018-11-21T08:44:14.799+01:00| vix| I125: vmxFilePathStats="/Applications/VMware Fusion.app/Contents/Library/vmware-vmx-stats"
2018-11-21T08:44:14.840+01:00| vix| I125: HOSTDEV-MAC:  HostDeviceInfo_FindHostSoundDevices: Found default sound devices [AppleHDAEngineOutput:1B,0,1,1:0|AppleHDAEngineInput:1B,0,1,0:1].
2018-11-21T08:44:14.841+01:00| vix| I125: Warning: SGHostEnumerate not yet implemented
2018-11-21T08:44:14.841+01:00| vix| I125: SMBIOS: can't open /dev/mem: Could not find the file
2018-11-21T08:44:14.841+01:00| vix| I125: VmhsHostInfoPopulateSystem:  Could not get information from smbios to populate VMDB.
2018-11-21T08:44:14.954+01:00| vix| I125: DictionaryLoad: Cannot open file "/Library/Preferences/VMware Fusion/config": No such file or directory.
2018-11-21T08:44:14.957+01:00| vix-async-pipe| I125: /Users/stefan/.docker/machine/machines/vmw18061/vmw18061.vmx: Connected to testAutomation-fd, remote end sent pid: 32499
2018-11-21T08:44:14.957+01:00| vix-poll| I125: SOCKET 1 (25) AsyncTCPSocketSetOption: Option layer/level [6], option/name [1]: could not set OS option for TCP socket; error [102: Operation not supported on socket].

@StefanScherer
Copy link
Author

BTW: The vmxnet3 patch for boot2docker.iso 18.09.0 has been merged and I have created an ISO file to try it also with this vmware driver plugin. I repeat my comments of docker/machine#4607 (comment) here to have everything in one place:

There is a problem in boot2docker.iso 18.09.0 which is fixed with boot2docker/boot2docker#1350 by adding missing kernel modules and fixing the /etc/init.d/docker script.

There is another problem with docker-machine 0.14.0 and newer using the vmwarefusion driver. In all my macOS machines (baremetal and nested VM) it aborts at the "vmrun ... enableSharedFolders" command also with older boot2docker.iso versions.

There is an external driver plugin vmware which can be used right now as it does not abort at the "vmrun ... enableSharedFolders" command.

I have built the boot2docker.iso with the fix for vmware and put it into a GitHub release of my fork.

docker-machine -D create -d vmware --vmware-boot2docker-url=https://github.com/StefanScherer/boot2docker/releases/download/18.09.0-vmware/boot2docker.iso default

The shared folders are mounted to /hosthome instead of /Users in the b2d VM. At the moment using -v $(pwd):/xxx does not work:

$ pwd
/Users/stefan/code/boot2docker

$ docker run -v $(pwd):/test alpine ls -a /test
.
..

$ docker run -v /hosthome/stefan/code/boot2docker:/test alpine ls -a /test
.
..
.dockerignore
.git
.gitignore
.travis.yml
Dockerfile
FAQ.md
LICENSE
MAINTAINERS
README.md
boot2docker.iso
files
update.sh

I try to figure out why this happens and send PR's to the corresponding repos.

@marek-obuchowicz
Copy link

@StefanScherer did you have any chance to progress on this feature? We'd love to migrate to vmware fusion and lack of shared folders is the latest blocking issue

@jgangemi
Copy link

jgangemi commented Apr 1, 2019

i'm running vmware fusion 10.1.3 and shared folders are working for me if i use the vmware driver instead of vmwarefusion and change the mount path for my local machine to start with /hostname instead of /Users.

i don't know if it successfully works w/ version 11, which is why i've been hesitant to upgrade.

@marek-obuchowicz
Copy link

marek-obuchowicz commented Apr 2, 2019

I can confirm that vmware driver works with vmware fusion 11.0.3. This /hostname thing is however a big disadvantage, as tools like docker-compose (having often volume specified like .:/app) won't work without changing mount paths every time. Do you know if there is any roadmap to make vmware driver behave in the same way, as other drivers?

@gcavalcante8808
Copy link

@marek-obuchowicz This is somewhat a side-effect, but you can still link the /hosthome dir to /Users.

@marek-obuchowicz
Copy link

@gcavalcante8808 it's clear how to workaround it. I would expect however docker-machine driver to take care about that (for example by setting symlink), so that vmware driver behaves in the same way as other drivers (like virtualbox or parallels)

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

6 participants