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]> 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].
> 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.