which directory?

16 views
Skip to first unread message

Henri KONSTAIN

unread,
Dec 31, 2015, 3:25:22 AM12/31/15
to Vagrant
On a WIN 8.1 64bit system.

I have installed Virtualbox and Vagrant (Vagrant in the default dir C:\HashiCorp\Vagrant)

I then opened a shell, where the prompt is C:\Users\<MyUserName>

Then I ran the 2 commands from this tutorial: https://docs.vagrantup.com/v2/getting-started/

$ vagrant init hashicorp/precise32
$ vagrant up

OK the Vagrant is installed - I see it when I open Virtualbox - with the long default name, which I am also wondering if I can change to a shorter name myself?

My questions are:
I did everything with the default settings, and this means that Vagrant and the Virtualbox files are now all installed in my username folder root. And the Vagrant install in C:\HashiCorp\Vagrant
That is a bit messy IMO. 
Should I have been running the 2 commands above in another dir? Eg. I have all my VM's in a special folder on another drive.
Should I have been running the commands within the Hashi\Vagrant folder - or somewhere else?
This info I am missing in the tutorial.

Alvaro Miranda Aguilera

unread,
Jan 3, 2016, 4:50:18 AM1/3/16
to vagra...@googlegroups.com
Hello Henri,

I will try to reply all your questions, but feel free to tell me if I miss one or you got more.

1. Installation patch is c:\hashicorp/vagrant

This is correct, basically is in this way because some components have issues with spaces and I am not sure some character when the language is not english.

2. open the shell.

The default directory where your shell open is called your home directory.

here will be .vagrant.d directory that hold information and cache the boxes.

You can use CMD/bash to move around

mkdir precise64
cd precise64
vagrant init -m hashicorp/precise32

in this way the path will be

c:/users/<your_user>/precise32

3. Vagrant VM long name.

This is the default, you can ofcouse update it.

edit the Vagrantfile

config.vm.hostname = "hostname" 

^ change the hostname inside the OS, not how it looks in VirtualBox

The name in the gui:

config.vm.provider "virtualbox" do |v|
  v.name = "my_vm"
end

4. Run the command in other dir:

A lot of components are involved here, let's say your user is henri

your home for Windows will be  c:\users\henri

a. Vagrant binaries:
c:\HashiCorp\Vagrant

b. Virtualbox binaries:
c:\Program Files\Oracle\VirtualBox

c. Vagrant home
c:\Users\henri\.vagrant.d

d. VirtualBox default path for new VM
c:\Users\henri\VirtualBox VMs

e. Project that hold Vagrantfile and code
c:\<some_path>

As you can see is a lot of components here.

If you have a 2nd drive, and you create your project as:

d:\MyAwesomeApp\

Take note.
- Vagrant boxes will be downloaded and store in [c]
- VMs will be created in [d]

So, if your C drive is short in space, or you want to create the boxes in a different drive are lots of options.

Hope this clarify all the components and path, if you can chare what you will like to move [a,b,c,d,e], I cna help you to understand how's that done.

Thanks
Alvaro








--
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/18aea08d-6a22-46a1-9dc4-16e3d1da6c04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages