-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVagrantfile.Annotated
More file actions
28 lines (22 loc) · 1016 Bytes
/
Copy pathVagrantfile.Annotated
File metadata and controls
28 lines (22 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
*Minimum syntax to configure a VM instance
Vagrant.configure(2) do config |
config.vm.box = "USERNAME/OSIMAGE"
end
(2) = version
* Syntax to configure a basic VM and assign to private network with static IP
Vagrant.configure(2) do config |
config.vm.box = "USERNAME/OSIMAGE"
config.vm.hostname = "linuxsvr1"
config.vm.network "private_network", ip: "10.0.0.10"
end
* Syntax to configure basic VM with defined IP, local virtualization using VirtualBox provider, with graphical capabilites and graphical memory definitionVagrant.configure(2) do config |
config.vm.box = "USERNAME/OSIMAGE"
config.vm.hostname = "linuxsvr1"
config.vm.network "private_network", ip: "10.0.0.10"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.memory = "1024"
end
Add a provisioning line run a setup script to configure initialization of all machines defined in vagrantfile once running
config.vm.provision "shell", path: "setup.sh" **
**This only executed on the first "vagrant up" command