Skip to content

Instantly share code, notes, and snippets.

@fxlv
Last active August 29, 2015 14:13
Show Gist options
  • Save fxlv/6a692cfe711c8746c3cb to your computer and use it in GitHub Desktop.
Save fxlv/6a692cfe711c8746c3cb to your computer and use it in GitHub Desktop.
vagrantfile multi machine example
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, inline: "apt-get update; apt-get -y upgrade"
config.vm.box = "fxlv/debian_wheezy64"
config.vm.provider "virtualbox" do |v|
v.memory = 128
v.cpus = 1
end
config.vm.define "router" do |router|
router.vm.hostname = "router"
router.vm.network "private_network", ip: "192.168.5.1"
end
config.vm.define "client" do |client|
client.vm.hostname = "client"
client.vm.network "private_network", ip: "192.168.5.10"
client.vm.provider "virtualbox" do |v|
v.memory = 256
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment