Skip to content

Instantly share code, notes, and snippets.

@ntrepid8
Last active August 7, 2016 17:03
Show Gist options
  • Save ntrepid8/b53272a963d49bcd5fcc to your computer and use it in GitHub Desktop.
Save ntrepid8/b53272a963d49bcd5fcc to your computer and use it in GitHub Desktop.
A nice base Vagrantfile for debian/jessie64 on Virtualbox.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.memory = 2048
vb.cpus = 2
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
# basic configuration
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y \
git \
git-core \
vim \
build-essential \
python-dev \
libssl-dev \
libncurses5-dev \
ntp \
haveged \
unzip
SHELL
end
@ntrepid8
Copy link
Author

I never remember the NAT DNS settings so I've created this gist! Without forwarding the NAT DNS resolver, the network in the VM is super slow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment