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

Ability to share only specified folders, and provide a path to each #7

Closed
KieranP opened this issue Mar 9, 2010 · 1 comment
Closed

Comments

@KieranP
Copy link

KieranP commented Mar 9, 2010

It would be nice to specify which folders get shared, and where they should be shared.

Something like the following. First arg is local path, second is full path on the guest.

config.vm.share_folder('apps', '/rails_applications')
config.vm.share_folder('vhosts', '/etc/apache2/sites-available')

If none are provided, the default behaviour of sharing everything in /vagrant continues through

Note the second shared folder overlaps a possibly already existing directory. If not currently possible, this should make the contents of the guest and host synced, not overriding anything.

The end goal is to be able to place something in [host]/vhosts and have it show up in the VM at the right location.

@mitchellh
Copy link
Contributor

Kieran,

This feature was added in this commit: http://github.com/mitchellh/vagrant/commit/a71815df4e4599f97364f2e1ef360dc14e3e1fbb

It allows you to do the following:

config.vm.share_folder('name', '/guest/path', '/path/on/host/machine')

Which will setup additional shared folders.

Mitchell

This issue was closed.
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