Synced folder disappears after a while (Fedora 22 host, CentOS 7 box, VirtualBox provider)

157 views
Skip to first unread message

bbur...@ontraport.com

unread,
Sep 18, 2015, 3:22:42 PM9/18/15
to Vagrant
I keep running into an issue where my synced folders mount on startup, but at some random time later (could be minutes, could be several hours) they unmount and those files are gone from the box.

I haven't been able to associate the unmounting with any particular event. The only thing I notice is that if I have ssh'd into the box that connection is disrupted. I am able to ssh in again, but at that point the synced folders are always empty.

My development host is running Fedora 22, the virtual box is running CentOS 7. I'm using the VirtualBox provider. The box uses both a NAT and host-only adapters.

It's pretty frustrating to have to stop and restart the boxes regularly to get my synced folders back, so I'll have to figure this out soon or abandon Vagrant.

Let me know if I can provide more info or if you have any clues to debug this.
Thank you!

Alvaro Miranda Aguilera

unread,
Sep 18, 2015, 9:37:51 PM9/18/15
to vagra...@googlegroups.com
Hello,

I haven't seen that.

How much memory your host have and how much memory and VMs are trying to run at the same time?

What are the versions of OSX, Virtualbox and vagrant?

VBoxManage --version

vagrant version

vagrant plugin list



Phone: (855) 668-7276
Web: ONTRAPORT.com 
Social: facebook.com/ontraport

Read the latest from the ONTRAPORT Blog. 

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b009011b-1ea8-43b3-bb7f-5e123a3ed983%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bbur...@ontraport.com

unread,
Sep 21, 2015, 11:18:09 AM9/21/15
to Vagrant
I have 16G memory, and I am running 5 virtual boxes with 2G memory each.

Here is the Vbox and vagrant info:
[bburleson@bburleson-ontraport ontrapages]$ VBoxManage --version
4.3.30r101610
[bburleson@bburleson-ontraport ontrapages]$ vagrant version
Installed Version: 1.7.4
Latest Version: 1.7.4
 
You're running an up-to-date version of Vagrant!
[bburleson@bburleson-ontraport ontrapages]$ vagrant plugin list
vagrant-share (1.1.4, system)
[bburleson@bburleson-ontraport ontrapages]$

My local system is  

[bburleson@bburleson-ontraport ontrapages]$ uname -a
Linux bburleson-ontraport 4.1.6-200.fc22.x86_64 #1 SMP Mon Aug 17 19:54:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[bburleson@bburleson-ontraport ontrapages]$

And the virtual box that keeps losing its shared folders is

[vagrant@projectblack ~]$ uname -a
Linux projectblack.riviera 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[vagrant@projectblack ~]$
 
Thank you!
-Ben

Alvaro Miranda Aguilera

unread,
Sep 22, 2015, 2:20:11 AM9/22/15
to vagra...@googlegroups.com
Hello,

Maybe you can upgrade VirtualBox. to the current 4.x version. Is pretty Stable.

5.x works fine, but still too new, so not sure if you will miss some feature, but highest 4.x will work for sure.

Other than that, I am not sure how to debug this.

In old version of Virtualbox was an issue when the host went to sleep/hibernate/close lid that caused some issues, but I can't remember the version that fixed that.

Alvaro.

bbur...@ontraport.com

unread,
Sep 22, 2015, 11:19:41 AM9/22/15
to Vagrant
Hi Alvaro,

From what I can tell 4.3.30 is the latest 4.x version. Is there a later one I can't find?

I might try 5.0 in the mean time.

Thanks,
Ben

bbur...@ontraport.com

unread,
Sep 22, 2015, 12:29:45 PM9/22/15
to Vagrant
Well, 5.0 at least works to run my boxes, but the synced folders are still disappearing after a while :-/

Current version:
[bburleson@bburleson-ontraport ontrapages]$ VBoxManage --version
5.0.4r102546
[bburleson@bburleson-ontraport ontrapages]$

I might have to abandon Vagrant at this point :-( 

bbur...@ontraport.com

unread,
Sep 22, 2015, 12:32:22 PM9/22/15
to Vagrant
Maybe if there was just a way to force synced folders to reconnect, I could live with that. Is there a command to remount those after the box has already been running?

bbur...@ontraport.com

unread,
Sep 22, 2015, 5:05:54 PM9/22/15
to Vagrant
I also tried installing the vagrant plugin mentioned here to update the vbox guest additions on the boxes, but that didn't help.

dragon788

unread,
Oct 21, 2015, 3:10:34 PM10/21/15
to Vagrant
If you are mapping the same folder to multiple guests that is probably your issue. If you are using the native Virtualbox folder mapping that is DEFINITELY your issue. I'd highly suggest using NFS instead of the Virtualbox shared folder type as it supports concurrent access and should also give better performance than the native Virtualbox shared folders.

bbur...@ontraport.com

unread,
Oct 21, 2015, 3:16:04 PM10/21/15
to Vagrant
Yes, I am sharing the same folder via native Vbox share, so I will try out the NFS share. Thank you!!

bbur...@ontraport.com

unread,
Oct 28, 2015, 11:31:58 AM10/28/15
to Vagrant
This seems to be working! Thank you so much!

As a side note, I had to change the Vagrant file to use a switch from a local config file to determine whether or not to use NFS or default on the synced folders because we have at least one developer on Windows here.


On Wednesday, October 21, 2015 at 12:10:34 PM UTC-7, dragon788 wrote:

Joaquin Menchaca

unread,
Nov 13, 2015, 8:30:52 PM11/13/15
to Vagrant
What does your vagrant file look like, I was thinking to play with NFS, but have not yet.  I have 3 virtual machines, sharing the same folder, but they only access it one at at time during provisioning.  If there was some software writing to the shared folder, I might have had concurrency issues as well... 

Ben Burleson

unread,
Nov 16, 2015, 4:59:47 PM11/16/15
to vagra...@googlegroups.com
I haven't had any issue with this since switching to NFS.

Switching was dead simple too, just add "type: nfs" to the share description in the Vagrantfile. Check docs for proper syntax.

I'm on Fedora 23, which already had NFS support, so I didn't have to install anything and Vagrant handled all the configuration.

--
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 a topic in the Google Groups "Vagrant" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vagrant-up/uqYog54eOk0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/fab01849-e9e9-4497-baea-be46d7eb9371%40googlegroups.com.

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



--
Ben Burleson
Senior Backend Engineer
Reply all
Reply to author
Forward
0 new messages