Skip to content

Instantly share code, notes, and snippets.

@AlanJui
Last active April 18, 2019 04:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlanJui/1a6d3945bf4225b0586f4db5dd46d96c to your computer and use it in GitHub Desktop.
Save AlanJui/1a6d3945bf4225b0586f4db5dd46d96c to your computer and use it in GitHub Desktop.
Vagrant.configure("2") do |config|
config.vm.box = "peru/ubuntu-18.04-desktop-amd64"
config.vm.box_version = "20190401.01"
# config.vm.network "public_network"
# config.vm.network "public_network", ip: "192.168.66.41"
config.vm.network "public_network", bridge: "enp5s0", ip: "192.168.66.42"
# config.vm.network "public_network", auto_config: false
# # manual ip
# config.vm.provision "shell",
# run: "always",
# inline: "ifconfig eth1 192.168.66.40 netmask 255.255.255.0 up"
# # default router
# config.vm.provision "shell",
# run: "always",
# inline: "route add default gw 192.168.66.1"
config.vm.network "forwarded_port", guest: 3389, host: 3390
config.vm.network "forwarded_port", guest: 80, host: 8088
# VNC Remote Desktop sharnig
config.vm.network "forwarded_port", guest: 5900, host: 5910
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
vb.memory = "3072"
vb.cpus = 2
vb.name = "vm_ubuntu_1804"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
# apt-get install -y apache2
apt-get install -y net-tools
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment