Skip to content

Instantly share code, notes, and snippets.

@maxmanders
Last active December 8, 2016 14:12
Show Gist options
  • Save maxmanders/5728278 to your computer and use it in GitHub Desktop.
Save maxmanders/5728278 to your computer and use it in GitHub Desktop.
Vagrant 1.1 with host-only and bridged networking
Vagrant.configure("2") do |config|
ip_address = "192.168.56.1"
config.vm.box = "ubuntu-12.04.2-server-amd64"
config.vm.hostname = "chef-server.local"
config.ssh.timeout = 30
config.vm.provider :virtualbox do |vbox|
vbox.customize [ "modifyvm", :id, "--memory", 1024 ]
vbox.customize [ "modifyvm", :id, "--nictype1", "virtio" ]
vbox.customize [ "modifyvm", :id, "--nictype2", "virtio" ]
# Open VirtualBox GUI terminal during provisioning.
#vbox.gui = true
end
config.vm.network :public_network, bridge: "en0: Wi-Fi (AirPort)"
config.vm.network :private_network, ip: ip_address
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment