Closed shehzaman closed 5 years ago
Hi @shehzaman,
Unfortunately, that is not possible at this moment. Currently symlinks work only if they refer to folders inside /Users
directory.
I'm also not sure that the possible auto-detection is the good thing to go. However, I think we can implement the new CLI flag which will allow do define additional shared folder path or override the default one (currently it is hard-coded to /Users
: https://github.com/Parallels/docker-machine-parallels/blob/master/parallels_darwin.go#L29).
I will get back with a solution soon.
Is Machine's mount
command a possible workaround for this type of problems? Moreover is it possible to "overwrite" mount
from SSHFS to Parallels Shared Folders in case of our driver?
I don't think so. docker-machine mount
command works in other way around: it allows to mount the guest's path on the host
Files are actually being stored on the machine, not on the host. So make sure to make a copy of any files you want to keep, before removing it!
https://docs.docker.com/machine/reference/mount/
I was thinking about implementing some option similar to --virtualbox-share-folder
from virtualbox driver, but maybe using a list instead
https://github.com/docker/machine/blob/821e8c76f048ca9323ecc9440c0e3d3d5ec4906d/drivers/virtualbox/virtualbox.go#L248
For example:
--parallels-shared-folders="/Users"
(the default), --parallels-shared-folders="Users/myuser/dir"
,--parallels-shared-folders="/Users,/Volumes/Machintosh HD"
,
etc.@legal90 having a new CLI option will make it much easier! Thank you very much for looking into this.
I was thinking about implementing some option similar to
--virtualbox-share-folder
from virtualbox driver, but maybe using a list instead
Personally it'd rather follow VB "style"with specifying only one directory for consistency. But if multiple directories sharing is implemented I suggest to use colon as divider of the path list.
Personally it'd rather follow VB "style"with specifying only one directory for consistency.
OK. I just thought that this kind of consistency is not very important since drivers don't interact with each other and use unique CLI arguments anyway. So we have a chance to make our driver a bit more convenient for the end user.
For example, in VB (--virtualbox-share-folder
) in addition to the shared folder path, the user also has to specify the share name, which is just an internal identifier and not what user should worry about.
But if multiple directories sharing is implemented I suggest to use colon as divider of the path list.
Sorry, I'm not sure this is not the best choice. Looking at different CLI tools, I can say that in most cases the colon :
is used for mappings, while comma ,
is the right choice for lists.
I'll prepare the PR, so we will see how it looks.
Sorry, I'm not sure this is not the best choice. Looking at different CLI tools, I can say that in most cases the colon : is used for mappings, while comma , is the right choice for lists.
Comma is a valid symbol for a path component. And, for example, LD_LIBRARY_PATH
uses colon as a divider.
Alternative variant: can we support passing multiple --parallels-shared-folder
options? So each other adds new Shared Folder?
Alternative variant: can we support passing multiple --parallels-shared-folder options? So each other adds new Shared Folder?
Oh yes! We actually can. I will do it in that way 👍
@shehzaman in v1.4.0 we've added the --parallels-share-folder
option which allows you to mount custom paths, for example:
docker-machine create -d parallels \
--parallels-share-folder "/Volumes/Macintosh HD" \
--parallels-share-folder "/Users" \
test-vm
In this case your symlinks from /Users
to /Volumes/Macintosh HD
should work.
NB: Sharing the system paths with your VM is on your risk!
@legal90 Thank's a tonne! Tested and working very well!
NB: Yes, all risk is mine 👍
Is there a way to mount all folders that are symlinked in /Users?
/Users is mounted as expected when using the driver
If any folder inside /Users is symlinked outside /Users - the folder does not show up
The folders symlinked to
/Volumes/Machintosh HD/...
are not accessible inside boot2docker VM.Is there a way to mount these folders automatically?