Skip to content

Summary of Vagrantfile version differences

from http://docs.vagrantup.com/v2/vagrantfile/version.html :

"Configuration versions are the mechanism by which Vagrant 1.1+ is able to remain backwards compatible with Vagrant 1.0.x Vagrantfiles, while introducing dramatically new features and configuration options." "Currently, there are only two supported versions: "1" and "2". Version 1 represents the configuration from Vagrant 1.0.x. "2" represents the configuration for 1.1+ leading up to 2.0.x."

h2. v1

Vagrant::Config.run do |config|
  config.vm.define :couch1 do |config|
    config.vm.box = "leap-wheezy"
    config.vm.box_url = "http://download.leap.se/leap-debian.box"
    config.vm.network :hostonly, "10.5.5.44", :netmask => "255.255.255.0"
    config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
    config.vm.customize ["modifyvm", :id, "--name", "couch1"]
  end

h2. v2

Vagrant.configure("2") do |config|
  config.vm.define :couch1 do |config|
    config.vm.box = "leap-wheezy"
    config.vm.box_url = "http://download.leap.se/leap-debian.box"
    config.vm.network :private_network, ip: "10.5.5.44"
    config.vm.provider "virtualbox" do |v|
      v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
      v.name = "rewire_dev_vpn1"
    end
  end

(from redmine: created on 2013-05-14, closed on 2013-07-26, relates #2496 (closed), relates #2395 (closed))