Hi Jon, The provider-specific parts should be wrapped in a block (cf. http://docs.vagrantup.com/v2/providers/configuration.html )
Like this: # -*- mode: ruby -*- # vi: set ft=ruby : # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! VAGRANTFILE_API_VERSION = "2" lfs_disk = './lfs.vdi' Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "debian" config.vm.box_url = "https://www.dropbox.com/s/gxouugzbnjlny1k/debian-7.0-amd64-minimal.box" config.vm.provision "shell", path: "provision.sh" config.vm.provider "virtualbox" do |vb| unless File.exist?(lfs_disk) vb.customize ['createhd', '--filename', lfs_disk, '--size', 20 * 1024] end vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', lfs_disk] end config.vm.synced_folder "~/", "/vagrant" end Hope this helps, Ronan Amicel On Thu, Apr 17, 2014 at 6:37 AM, Jon Schipp <[email protected]> wrote: > Hello all, I'm trying to get Vagrant to add a second hard disk [1] to my > VirtualBox VM > but I keep getting the following error. Any help is appreciated. > > $ vagrant up > Bringing machine 'default' up with 'virtualbox' provider... > There are errors in the configuration of this machine. Please fix > the following errors and try again: > vm: > * The following settings shouldn't exist: customize > > $ vagrant --version > Vagrant 1.5.0 > > $ VBoxManage -v > 4.3.8r92456 > > $ sw_vers > ProductName: Mac OS X > ProductVersion: 10.9.2 > BuildVersion: 13C64 > > $ cat Vagrantfile > > # -*- mode: ruby -*- > # vi: set ft=ruby : > # Vagrantfile API/syntax version. Don't touch unless you know what you're > doing! > > VAGRANTFILE_API_VERSION = "2" > > lfs_disk = './lfs.vdi' > > Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| > config.vm.box = "debian" > config.vm.box_url = > "https://www.dropbox.com/s/gxouugzbnjlny1k/debian-7.0-amd64-minimal.box" > config.vm.provision "shell", path: "provision.sh" > > unless File.exist?(lfs_disk) > config.vm.customize ['createhd', '--filename', lfs_disk, '--size', > 20 * 1024] > end > > config.vm.customize ['storageattach', :id, '--storagectl', 'SATA > Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', > lfs_disk] > config.vm.synced_folder "~/", "/vagrant" > end > > [1] https://gist.github.com/leifg/4713995 > > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
