Vagrantfile in C > Users > Username?

19 views
Skip to first unread message

Willem-Siebe Spoelstra

unread,
Mar 3, 2015, 3:10:09 PM3/3/15
to vagra...@googlegroups.com
Hi all,

In my personal 'C partition' location : C > Users > my Username I see beside the .vagrant, .vagrant.d, .VirtualBox and VirtualBox VMs folders also a 'Vagrantfile'.
Is it normal there is a Vagrantfile on this location or did it end up there by myself?

I just don't understand why it is there since the Vagrantfile is something you place in every project folder.
Looking further I found out there are actually other places where Vagrantfiles can be: http://docs.vagrantup.com/v2/vagrantfile/index.html


  • Vagrantfile packaged with the box that is to be used for a given machine.
  • Vagrantfile in your Vagrant home directory (defaults to ~/.vagrant.d). This lets you specify some defaults for your system user.
  • Vagrantfile from the project directory. This is the Vagrantfile that you'll be modifying most of the time.
  • Multi-machine overrides if any.
  • Provider-specific overrides, if any.


I don't see anywhere mentioned the Vagrantfile I have in my "C > Users > my Username" folder. 
And I don't see any vagrantfile in my 'vagrant home directory', because when I open the .vagrant.d folder I don't see a Vagrantfile there.

Hope somebody can clearify these questions for me.

Kind regards,

Willem-Siebe Spoelstra 

Alvaro Miranda Aguilera

unread,
Mar 3, 2015, 3:15:16 PM3/3/15
to vagra...@googlegroups.com
Hello,

You can have:

- Global Vagrantfile
- Box/Template Vagrantfile
- Project Vagrantfile

when you do vagrant <command>, Vagrant read all of those, can generate
what will be all the action list.

Think ~/.vagrant.d as the global Vagrantfile. useful if you want some
configuration to be in ALL the boxes you want to create

Then, there is a vagrantfile in the
~/.vagrant.d/boxes/<box/version>/include that is a Vagrantfile with
extra bits you want to have when you distribute a box

Plus, the my_project/Vagrantfile is where you have your very own customizations

Let me know if this make sense and helps to clarify.

Alvaro.
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.

Willem-Siebe Spoelstra

unread,
Mar 3, 2015, 3:23:39 PM3/3/15
to vagra...@googlegroups.com
Hi,

That makes sense because it matches the explenation on the website of Vagrant.

To be sure: the Vagrant file that should be placed in the ".vagrant.d" folder is not there by default right? Only when I create one myself. Because it's not visible there right now:

Inline afbeelding 1


And please als confirm that my Vagrantfile in my C > Users > my Username folder should not be there, since Vagrant will not be looking there for a Vagrantfile right? I don't know how this vagrantfile ended up there, but that's also the reason why I ask here first if I can remove this:

Inline afbeelding 2

Kind regards,

Willem


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/sDrgMOw49n4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vagrant-up+...@googlegroups.com.

Alvaro Miranda Aguilera

unread,
Mar 3, 2015, 3:25:19 PM3/3/15
to vagra...@googlegroups.com
What's in that file? What's the content?

You can move it out, and see if anything breaks :D

but I think is fine to delete.

Willem-Siebe Spoelstra

unread,
Mar 3, 2015, 3:46:46 PM3/3/15
to vagrant-up
Nothing special, only the " config.vm.box = "hashicorp/precise32" " setting from the getting started guide. 
I think I maybe opened git bash one time in my C > Users > myUsername folder and did a vagrant init there.
Since this location is not mentioned in the Vagrant docs about the Vagrant file, I just delete it.

Thanks for the quick help.
Reply all
Reply to author
Forward
0 new messages