You can edit the existing Vagrantfile, and add another box.
As an example:
# Every Vagrant virtual environment requires a box to build off of.
# config.vm.box = "base"
config.vm.define :centos6 do |node1|
node1.vm.hostname = 'centos.internal'
node1.vm.box = 'centos-65-x64-virtualbox-nocm.box'
node1.vm.box_url = 'http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box'
node1.vm.network :private_network, ip: "10.200.0.10"
end
config.vm.define :precise do |node2|
node2.vm.hostname = "precise"
node2.vm.box = 'ubuntu-server-12042-x64-vbox4210-nocm.box'
node2.vm.box_url = 'http://puppet-vagrant-boxes.puppetlabs.com/ubuntu-server-12042-x64-vbox4210-nocm.box'
node2.vm.network :private_network, ip: "10.200.0.11"
end
This is a section taken from a Vagrantfile created using vagrant init
The automatically created box "base" has been commented out, and two new boxes have been added. In order to bring these boxes up, you can use vagrant up [boxname]
, for example vagrant up centos6
if you omit the argument, and just run vagrant up
, all boxes list will be brought up, in the order they are defined in the Vagrantfile.
You can check the current status of the boxes in the Vagrantile by using vagrant status
:
$ vagrant status
Current machine states:
centos6 not created (vmware_fusion)
precise not created (vmware_fusion)
This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.