Skip to content

Instantly share code, notes, and snippets.

@alenabdula
Created November 22, 2015 20:36
Show Gist options
  • Save alenabdula/ba9e08d7016d964d5c48 to your computer and use it in GitHub Desktop.
Save alenabdula/ba9e08d7016d964d5c48 to your computer and use it in GitHub Desktop.
hostname = "localhost.dev"
boxname = "VBlocalhost"
server_ip = "192.168.22.10"
server_cpus = "1"
server_memory = "512" # in MB
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = hostname
config.vm.network :private_network, ip: server_ip
config.vm.network :forwarded_port, guest: 80, host: 8000
config.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777", "fmode=666"]
# Custom settings for VirtualBox
config.vm.provider :virtualbox do |vb|
vb.name = boxname
vb.customize ["modifyvm", :id, "--cpus", server_cpus]
vb.customize ["modifyvm", :id, "--memory", server_memory]
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 10000]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment