I don't change the default shared folder settings from vagrant, so I have nothing on the Vagrantfile regarding them, but I've posted the contents below.
I setup all my VMs in VirtualBox with a shared folder name "Shared", this folder is placed in VirtualBox's VMs folder (where all VMs are created and where vagrant adds its files while a VM is up). For the "standard" VMs I used the VirtualBox settings panel and added a shared folder, and the Windows VMs even have it mapped to as a network drive. What I noticed was that while booting a machine in VirtualBox it started complaining about the missing "Shared" folder and that VMs could fail to run ( the usual error message when some resource is missing). I created the folder again in Finder (file explorer) and used the VM as I usually. Sometime later I went back to testing my vagrantfile and some changes to the provisioner script and noticed that the "Shared" folder was gone after shutting down the vagrant VM.
I run the process a few times and sure enough, as soon as the vagrant based VM is up the "Shared" folder is deleted, if I leave Finder's window open I see it being removed just when vagrant maps my host folder to /vagrant.
Vagrantfile:
-----
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# dummy Vagrantfile to get the basic examples.
# Currenlty loading boxes from the default Atlas/HashiCorp repository. Speed
# is good enough for initial loading/caching process.
config.vm.box = "chef/debian-7.7"
# Map local port to guest HTTP port, 9595 seems as "random" as expected but
# this could be made smarter
config.vm.network "forwarded_port", guest: 80, host: 9595
# VirtualBox-specific settings.
config.vm.provider "virtualbox" do |vb|
# vb.gui = true
vb.memory = "1024"
end
# "Simple" shell script to bootstrap development environment.
config.vm.provision "shell", path: "vagrant-bootstrap.sh"
end