See existing directories in a Vagrant Machine

10 views
Skip to first unread message

JuanDavi Evora

unread,
Jun 14, 2017, 8:35:14 PM6/14/17
to Vagrant
Hi,

I'm trying to have a look at an existing directory in vagrant, but looks like if I use  
config.vm.synced_folder it creates a whole new directory in the vagrant machine and I'm only able to see the files added AFTER the machine started up.


Is there a way to share the existing content of a directory?

Cheers
 JD

Alvaro Miranda Aguilera

unread,
Jun 15, 2017, 2:45:53 AM6/15/17
to vagra...@googlegroups.com
Hello.

synced_folder will mount in the guest a folder from the host.

Alvaro

Virusvrij. www.avast.com

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/204e7350-6b86-4bbd-a600-5d790cc274b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

JuanDavi Evora

unread,
Jun 16, 2017, 9:03:27 AM6/16/17
to Vagrant
Ok, thank you.

Is there a way to do it the over way?

Cheers
Jd

On Thursday, 15 June 2017 07:45:53 UTC+1, Alvaro Miranda Aguilera wrote:
Hello.

synced_folder will mount in the guest a folder from the host.

Alvaro

Virusvrij. www.avast.com
On Thu, Jun 15, 2017 at 2:35 AM, JuanDavi Evora <jde...@gmail.com> wrote:
Hi,

I'm trying to have a look at an existing directory in vagrant, but looks like if I use  
config.vm.synced_folder it creates a whole new directory in the vagrant machine and I'm only able to see the files added AFTER the machine started up.


Is there a way to share the existing content of a directory?

Cheers
 JD

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

Alvaro Miranda Aguilera

unread,
Jun 16, 2017, 9:06:53 AM6/16/17
to vagra...@googlegroups.com
Hello

The way I do it is, copy the content to a temporary folder. Mount, and then copy.

Once the files are in the shared folder, use git to make them part of the project.

Alvaro


To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/69d03764-272f-4c72-9e1f-d55fcb059ebd%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

JuanDavi Evora

unread,
Jun 16, 2017, 9:37:11 AM6/16/17
to Vagrant
Ok,

But it is more for temporal  data, like the logs of the programns running on the guest machine

Cheers
 JD



--
Alvaro

Alvaro Miranda Aguilera

unread,
Jun 19, 2017, 10:02:09 AM6/19/17
to vagra...@googlegroups.com
in that case, if you mount a folder in the guest, the files will be created there. so will be available on the host.

Alvaro

To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/a3fc8a48-f0df-455e-b96a-e533f1e71804%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Reply all
Reply to author
Forward
0 new messages