Information Technology Reference
In-Depth Information
Listing 11-1.
The contents of the default Vagrantfile file without comments
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise32"
config.vm.box_url = "
http://files.vagrantup.com/
end
Caution
The original file created by the
$ vagrant init
command contains a
file
with all the comments stripped.
The entry:
config.vm.box_url = "
http://files.vagrantup.com/
sets the basic box for the virtual system to be
http://files.vagrantup.com/
precise32.box
.
The precise32.box file contains Ubuntu 12.04 LTS 32-bit. After
running:
$ vagrant up
you will have Ubuntu 12.04 virtual machine running on your machine.
Hint
A large collection of vagrant boxes is available at
ht-
tp://www.vagrantbox.es
.
There you will find CentOS, Debian, Gentoo,
OpenBSD, among others. By changing the basic box you will change the operating sys-
tem your virtual machine runs.
Because the virtual system doesn't provide a user interface we will use secure shell
(SSH) to gain access to the virtual machine.