patrickdlee / vagrant-examples

A collection of sample Vagrant configurations using Puppet. Starting out simple and getting more complex.
896 stars 319 forks source link

`config.vm.customize` is deprecated in favor of `config.vm.provider` #3

Open shurane opened 10 years ago

shurane commented 10 years ago

Well, that's the output I get from example3, but I'm guessing they all have it.

Here's output:

There were warnings and/or errors while loading your Vagrantfile
for the machine 'default'.

Your Vagrantfile was written for an earlier version of Vagrant,
and while Vagrant does the best it can to remain backwards
compatible, there are some cases where things have changed
significantly enough to warrant a message. These messages are
shown below.

Warnings:
* `config.vm.customize` calls are VirtualBox-specific. If you're
using any other provider, you'll have to use config.vm.provider in a
v2 configuration block.
stvnwrgs commented 10 years ago

replace

  node_config.vm.customize [
        'modifyvm', :id,
        '--name', node[:hostname],
        '--memory', memory.to_s
      ]

with

node_config.vm"virtualbox" do |v|
        v.customize[
            'modifyvm', :id,
            '--name', node[:hostname],
            '--memory', memory.to_s
          ]
      end