Skip to content

Commit

Permalink
Use different IP addresses for the out-of-the-box "virtualbox" variants
Browse files Browse the repository at this point in the history
It will make it possible to run all the corresponding boxes in parallel
without getting any conflicts.

- 2016-box: 192.168.59.50
- 2019-box: 192.168.59.51
- 2022-box: 192.168.59.52
  • Loading branch information
amotl committed Jun 10, 2022
1 parent 6707b54 commit 11e14e9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Vagrant.configure("2") do |config|
config.vm.define "2016-box", autostart: false do |cfg|
cfg.vm.box = "StefanScherer/windows_2016_docker"
cfg.vm.provision "shell", path: "scripts/create-machine.ps1", args: "-machineHome #{home} -machineName 2016-box"
cfg.vm.provider "virtualbox" do |v, override|
override.vm.network :private_network, ip: "192.168.59.50", gateway: "192.168.56.1"
end
end

config.vm.define "1709", autostart: false do |cfg|
Expand Down Expand Up @@ -48,6 +51,9 @@ Vagrant.configure("2") do |config|
config.vm.define "2019-box", autostart: false do |cfg|
cfg.vm.box = "StefanScherer/windows_2019_docker"
cfg.vm.provision "shell", path: "scripts/create-machine.ps1", args: "-machineHome #{home} -machineName 2019-box"
cfg.vm.provider "virtualbox" do |v, override|
override.vm.network :private_network, ip: "192.168.59.51", gateway: "192.168.56.1"
end
end

config.vm.define "2022", autostart: false do |cfg|
Expand All @@ -58,6 +64,9 @@ Vagrant.configure("2") do |config|
config.vm.define "2022-box", autostart: false do |cfg|
cfg.vm.box = "StefanScherer/windows_2022_docker"
cfg.vm.provision "shell", path: "scripts/create-machine.ps1", args: "-machineHome #{home} -machineName 2022-box"
cfg.vm.provider "virtualbox" do |v, override|
override.vm.network :private_network, ip: "192.168.59.52", gateway: "192.168.56.1"
end
end

config.vm.define "insider", autostart: false do |cfg|
Expand Down Expand Up @@ -96,7 +105,6 @@ Vagrant.configure("2") do |config|
v.customize ["modifyvm", :id, "--nested-hw-virt", "on"]
# Use the recommended paravirtualization interface for windows (hyperv) - requires VirtualBox 6
v.customize ["modifyvm", :id, "--paravirtprovider", "hyperv"]
override.vm.network :private_network, ip: "192.168.59.90", gateway: "192.168.56.1"
end

config.vm.provider "hyperv" do |v|
Expand Down

0 comments on commit 11e14e9

Please sign in to comment.