I don't know what you're referring to when saying "are like 3 separate 
things". 

It seems to me a part of your reply is missing.

Anyways, I had a look at vagrant's code and indeed it doesn't seem possible 
to customize "default" to something else, from within the Vagrant file that 
is inside a box.

It would have been nice to be able to do it in case a box is used in a 
single machine setup. Like, I would have liked all my Debian Jessie base 
boxes named "#{current_folder}_jessie_#{timestamp}" by default. And if the 
Vagrantfile using that box wants to further customize this with 
config.vm.define or machie.vm.box then fine.

Gregory

On Wednesday, February 25, 2015 at 11:10:52 PM UTC+1, Alvaro Miranda 
Aguilera wrote:
>
> Hello, 
>
> are like 3 separate things.. 
>
> let's me explain. 
>
> config.vm.hostname = "blabla" 
>
> will set the hostname inside the vm, at OS leve. 
>
>
> If you use virtualbox, and you want the gui name changed, you need 
> something like this: 
>
>   config.vm.provider :virtualbox do |vb| 
>     vb.name = "my_machine" 
>   end 
>
> and 3rd, the define is to be able to have separate codeblocks.. 
>
> to setup a box to be used globally inside the vagrantfile, then you 
> can use define to be able to setup a multivm envrioment: 
>
> config.vm.box = "hashicorp/ubuntu32" 
>
>   config.vm.define "web" do |web| 
>     web.vm.box = "apache" 
>   end 
>
>   config.vm.define "db" do |db| 
>     db.vm.box = "mysql" 
>   end 
>
>
> === 
>
> but, if you will like to be able to define different boxes, then you 
> can use those define do , and use the local name in the block 
>
>   config.vm.define "web" do |web| 
>     web.vm.box = "apache" 
>     web.vm.box = "hashicorp/ubuntu32" 
>   end 
>
>   config.vm.define "db" do |db| 
>     db.vm.box = "mysql" 
>     db.vm.box = "hashicorp/ubuntu64" 
>   end 
>
>
> Make sense?? 
>
> Let me know if still not clear. 
>
> If this answer your question, and you think the documentation is not 
> clear or easy, please let us know where and how you would like to see 
> it, and I will try to get the documentation updated. 
>
> Thanks, 
> Alvaro. 
>
>
>
> On Tue, Feb 24, 2015 at 6:45 AM, Grégory Pakosz 
> <[email protected] <javascript:>> wrote: 
> > Hello, 
> > 
> > Is it expected doing config.vm.define "foo" from the Vagrant file 
> shipped 
> > within a Vagrant box has no effect? 
> > 
> > When doing vagrant up, the machine is still named 
> > "#{current_folder}_default_#{timestamp}". 
> > 
> > Regards 
> > Gregory 
> > 
> > -- 
> > 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 [email protected] <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

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

Reply via email to