config.vm refers to all of them. what you wanted was master.vm.provider...
and slave.vm.provider.
Vagrant.configure(2) do |config|
config.vm.define "master" do |master|
master.vm.box = "ubuntu/trusty64"
master.vm.hostname = "master"
master.vm.network "private_network", ip: "192.168.56.11"
master.vm.provider "virtualbox" do |vbox1|
vbox1.customize ["modifyvm", :id, "--memory", 4096]
vbox1.customize ["modifyvm", :id, "--cpus", 4]
end
end
config.vm.define "slave" do |slave|
slave.vm.box = "ubuntu/trusty64"
slave.vm.hostname = "slave"
slave.vm.network "private_network", ip: "192.168.56.12"
slave.vm.provider "virtualbox" do |vbox2|
vbox2.customize ["modifyvm", :id, "--memory", 2048]
vbox2.customize ["modifyvm", :id, "--cpus", 2]
end
end
end
had to strip out the ansible parts to run it.
$ vagrant ssh master -- free
total used free shared buffers cached
Mem: 4048000 301300 3746700 604 12772 143640
-/+ buffers/cache: 144888 3903112
Swap: 0 0 0
$ vagrant ssh slave -- free
total used free shared buffers cached
Mem: 2049896 283848 1766048 672 12740 143700
-/+ buffers/cache: 127408 1922488
Swap: 0 0 0
On Friday, March 11, 2016 at 6:15:00 AM UTC-8, [email protected]
wrote:
>
> Vagrant version
>
> Installed Version: 1.8.1
> Latest Version: 1.8.1
> Host operating system
>
> Ubuntu 15.10
> Guest operating system
>
> Ubuntu 14.04
> Vagrantfile
>
> Vagrant.configure(2) do |config|
> config.vm.synced_folder "files/ansible/", "/external/"
>
> config.vm.define "master" do |master|
> master.vm.box = "ubuntu/trusty64"
> master.vm.hostname = "master"
> master.vm.network "private_network", ip: "192.168.56.11"
> config.vm.provider "virtualbox" do |vbox1|
> vbox1.customize ["modifyvm", :id, "--memory", 4096]
> vbox1.customize ["modifyvm", :id, "--cpus", 4]
> vbox1.customize ["setextradata", :id,
> "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
> config.vm.provision "ansible_local" do |ansible|
> ansible.verbose = true
> ansible.playbook = "/external/master-playbook.yml"
> end
> end
> end
>
> config.vm.define "slave" do |slave|
> slave.vm.box = "ubuntu/trusty64"
> slave.vm.hostname = "slave"
> slave.vm.network "private_network", ip: "192.168.56.12"
> config.vm.provider "virtualbox" do |vbox2|
> vbox2.customize ["modifyvm", :id, "--memory", 2048]
> vbox2.customize ["modifyvm", :id, "--cpus", 2]
> vbox2.customize ["setextradata", :id,
> "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
> config.vm.provision "ansible_local" do |ansible|
> ansible.verbose = true
> ansible.playbook = "/external/slave-playbook.yml"
> end
> end
> end
> end```### Expected behaviorMy intention was to create 2 different vbox
> machine with different memory and cpu settings. ### Actual behaviorThe vbox
> machines are created but both have the same memory settings (2048 MB), what
> am I doing wrong here? ### ReferencesHaven't found any yet
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vagrant-up/e69b5ac3-cd41-4900-87d9-670cceac975d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.