Skip to content

Instantly share code, notes, and snippets.

@aytch
Created March 8, 2013 03:46
Show Gist options
  • Select an option

  • Save aytch/5114075 to your computer and use it in GitHub Desktop.

Select an option

Save aytch/5114075 to your computer and use it in GitHub Desktop.
Vagrantfile for a basic multiple VM setup.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "base"
config.vm.box = "http://files.vagrantup.com/lucid32.box"
config.vm.define :server do |server_config|
server_config.vm.box = "base"
server_config.vm.network :hostonly, "10.1.1.2"
server_config.vm.provision :shell, :inline => "hostname server"
end
config.vm.define :client do |client_config|
client_config.vm.box = "base"
client_config.vm.network :hostonly, "10.1.1.5"
client_config.vm.provision :shell, :inline => "hostname client"
end
puts "To view running machines, type: vagrant status
To shut down running machines, type: vagrant halt
To destroy running machines, type: vagrant destroy
To connect to the server, type: vagrant ssh server
To connect to the client, type: vagrant ssh client
Always remember: Confusion comes before understanding. Happy hacking!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment