:
Vagrant.configure("2") do |config|
config.vm.define "worker".to_sym do |box|
box.vm.box = "ots-box"
box.vm.box_url = "http://testing.xxx.com.s3.amazonaws.com/ots-fe.box"
box.vm.host_name = "worker"
end
, (https://docs.vagrantup.com/v2/multi-machine/), case worker, worker VM Ruby , (box)
, Vagrantfile, ,
Vagrant.configure("2") do |config|
config.vm.box = "ots-box"
config.vm.box_url = "http://testing.xxx.com.s3.amazonaws.com/ots-fe.box"
config.vm.hostname = "worker"
end
-, config/box.vm.box Vagrant, , , . ( , http://www.vagrantbox.es/) . , , vagrant box list. , Vagrantfile, , ( - ubuntu/trusty64, , https://atlas.hashicorp.com/ubuntu/boxes/trusty64, )
-, config/box.vm.hostname ( hostname vs host_name), doc
config.vm.hostname - , . . nil, Vagrant . , .
, Vagrantfile , hostname ubuntu . , Vagrantfile
Vagrant.configure(2) do |config|
...
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "ubuntu"
...
vm,
fhenri@machine:~/project/examples/vagrant/ubuntu$ vagrant ssh
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.0-29-virtual x86_64)
* Documentation: https://help.ubuntu.com/
Last login: Tue Jan 5 10:21:54 2016 from 172.16.42.1
vagrant@ubuntu:~$ hostname
ubuntu
, config/box.vm.name ( VirtualBox), answer