I created a Vagrantfile with the following content:
Vagrant::Config.run do |config|
config.vm.define :foo do |cfg|
cfg.vm.box = 'foo'
cfg.vm.host_name = "foo.localdomain.local"
cfg.vm.network :hostonly, "192.168.123.10"
end
Vagrant.configure("2") do |cfg|
cfg.vm.customize [ "modifyvm", :id , "--name", "foo" , "--memory", "2048", "--cpus", "1"]
cfg.vm.synced_folder "/tmp/", "/tmp/src/"
end
end
After vagrant up
or vagrant reload
I get:
[foo] Attempting graceful shutdown of VM...
[foo] Setting the name of the VM...
[foo] Clearing any previously set forwarded ports...
[foo] Fixed port collision for 22 => 2222. Now on port 2200.
[foo] Creating shared folders metadata...
[foo] Clearing any previously set network interfaces...
[foo] Preparing network interfaces based on configuration...
[foo] Forwarding ports...
[foo] -- 22 => 2200 (adapter 1)
[foo] Booting VM...
[foo] Waiting for VM to boot. This can take a few minutes.
[foo] VM booted and ready for use!
[foo] Setting hostname...
[foo] Configuring and enabling network interfaces...
[foo] Mounting shared folders...
[foo] -- /vagrant
My questions are:
- Why is Vagrant mounting the
/vagrant
shared folder? I read shared folders are deprecated in favour of synced folders, and I never defined any shared folder in my Vagrantfile. - Why is the synced folder not set up?
I'm using Vagrant version 1.2.7 on MacOX 10.8.4.
vagrant up --debug
orvagrant reload --debug
might be usefull – Shalon