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

VMware Fusion driver Start() always mount shared folder whether --vmwarefusion-no-share was set or not #3757

Open
norio-nomura opened this issue Sep 16, 2016 · 7 comments

Comments

@norio-nomura
Copy link

I don't know golang, but
https://github.com/docker/machine/blob/master/drivers/vmwarefusion/fusion_darwin.go#L415:

    if shareDir != "" {

should be following?

    if shareDir != "" && !d.NoShare {
@crook
Copy link

crook commented Oct 8, 2016

There is no '--vmwarefuion-no-share' option when start, it's only vaild to create docker machine.

docker-machine create --driver=vmwarefusion --help
docker-machine start -help

@norio-nomura
Copy link
Author

Options on creating are saved in config.json as following:

$ cat ~/.docker/machine/machines/default/config.json
{
    "ConfigVersion": 3,
    "Driver": {
        "IPAddress": "172.16.241.138",
        "MachineName": "default",
        "SSHUser": "docker",
        "SSHPort": 22,
        "SSHKeyPath": "/Users/norio/.docker/machine/machines/default/id_rsa",
        "StorePath": "/Users/norio/.docker/machine",
        "SwarmMaster": false,
        "SwarmHost": "tcp://0.0.0.0:3376",
        "SwarmDiscovery": "",
        "Memory": 1024,
        "DiskSize": 20000,
        "CPU": 1,
        "ISO": "/Users/norio/.docker/machine/machines/default/boot2docker.iso",
        "Boot2DockerURL": "",
        "SSHPassword": "tcuser",
        "ConfigDriveISO": "/Users/norio/.docker/machine/machines/default/configdrive.iso",
        "ConfigDriveURL": "",
        "NoShare": true
    },
…                                                                                                                                                                                                         ```

@crook
Copy link

crook commented Oct 8, 2016

I mean '--vmwarefuion-no-share' parameter only works for creating.

@norio-nomura
Copy link
Author

I'm reporting that the machine created with --vmwarefuion-no-share mount shared folder.

@crook
Copy link

crook commented Oct 8, 2016

oops, that would be a bug. I just tried the command docker-machine create --driver=vmwarefusion --vmwarefusion-no-share <NAME> and see the 'NoShare' is set to true. However, the shared folder din;t appear in the docker.

btw, how you check the shared folder is mounted?

@norio-nomura
Copy link
Author

norio-nomura commented Oct 8, 2016

Here is a screenshot of mount on VMware Fusion console:
screenshot 2016-10-08 22 58 44
test is created with docker-machine create --driver=vmwarefusion --vmwarefusion-no-share test.
/Users is not mounted on booted by create.
/Users is mounted after rebooted by docker-machine stop test; docker-machine start test.

@crook
Copy link

crook commented Oct 8, 2016

got your point, your patch looks good to me.

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

No branches or pull requests

2 participants