Closed jurgenweber closed 10 years ago
wait, just read on the front page "ruby20 needed", so no ruby21 support?
Hi @jurgenweber,
The recommend way to run Vagrant is via the official Vagrant installers which are available from https://www.vagrantup.com/downloads.html. The official download package includes the correct Ruby version and other required dependencies for Vagrant to work correctly.
At this time, Vagrant supports Ruby 2.0.
ruby21 is not it:
$ ruby --version ruby 2.0.0p594 (2014-10-27 revision 48167) [x86_64-darwin14]
Bringing machine 'wheezy-tools01' up with 'virtualbox' provider...
==> wheezy-tools01: Clearing any previously set forwarded ports...
==> wheezy-tools01: Clearing any previously set network interfaces...
==> wheezy-tools01: Preparing network interfaces based on configuration...
wheezy-tools01: Adapter 1: nat
wheezy-tools01: Adapter 2: hostonly
==> wheezy-tools01: Forwarding ports...
wheezy-tools01: 22 => 2222 (adapter 1)
==> wheezy-tools01: Running 'pre-boot' VM customizations...
/opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/subprocess.rb:28:in `encode!': can't modify frozen String (RuntimeError)
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/subprocess.rb:28:in `block in initialize'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/subprocess.rb:28:in `each'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/subprocess.rb:28:in `initialize'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/subprocess.rb:22:in `new'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/subprocess.rb:22:in `execute'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/driver/base.rb:372:in `block in raw'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/driver/base.rb:371:in `raw'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/driver/base.rb:310:in `block in execute'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/retryable.rb:17:in `retryable'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/driver/base.rb:305:in `execute'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/driver/version_4_3.rb:135:in `execute_command'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/customize.rb:29:in `block in call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/customize.rb:22:in `each'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/customize.rb:22:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/sane_defaults.rb:38:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/set_hostname.rb:16:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/forward_ports.rb:31:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/network.rb:121:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/clear_network_interfaces.rb:26:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/prepare_nfs_settings.rb:18:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/synced_folders.rb:84:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:160:in `handle'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:42:in `block in call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/environment.rb:516:in `lock'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:41:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/env_set.rb:19:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/provision.rb:80:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/set_name.rb:19:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builder.rb:116:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builder.rb:116:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builder.rb:116:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/box_check_outdated.rb:36:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builder.rb:116:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builder.rb:116:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builtin/call.rb:53:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/warden.rb:34:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/builder.rb:116:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `block in run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/util/busy.rb:19:in `busy'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/action/runner.rb:66:in `run'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/machine.rb:217:in `action_raw'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/machine.rb:183:in `block in action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/environment.rb:516:in `lock'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/machine.rb:170:in `call'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/machine.rb:170:in `action'
from /opt/local/lib/ruby2.0/gems/2.0.0/gems/vagrant-1.7.0.dev/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
@jurgenweber what does your Vagrantfile look like?
it's exciting:
#
# My simple setup
#
# When vagrant 1.5 is relased I can install vagrant plugins and then I can manage vbguests additions with:
# https://github.com/dotless-de/vagrant-vbguest
# so I get less errors. :)
oses = [ 'centos', 'wheezy', 'ubuntu1204lts', 'ubuntu1404lts', 'freebsd' ]
pwd = Dir.getwd
#OS dependant/individual data. Machine definitions below this.
oses.each do |os|
case os
when "centos"
box = "centos65"
url = "https://github.com/2creatives/vagrant-centos/releases/download/v6.5.1/centos65-x86_64-20131205.box"
basepath = "/etc"
subnet = "192.168.34"
puppetdb = true
vm_config = [
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' }
]
mount_folders = [
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/yum', :ext_rel_path => "#{pwd}/yumrpm", :vm_owner => 'root' }
]
tools_vm_config = [
{ '--memory' => '1024' },
{ '--cpus' => '4' },
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' },
]
tools_mount_folders =[
{ :vm_path => "#{basepath}/puppet/data", :ext_rel_path => 'puppet/data', :vm_owner => 'root' },
{ :vm_path => "#{basepath}/puppet/manifests", :ext_rel_path => 'puppet/manifests', :vm_owner => 'root' },
{ :vm_path => "#{basepath}/puppet/components", :ext_rel_path => 'puppet/components', :vm_owner => 'root' },
{ :vm_path => "#{basepath}/puppet/profiles", :ext_rel_path => 'puppet/profiles', :vm_owner => 'root' },
{ :vm_path => "#{basepath}/puppet/roles", :ext_rel_path => 'puppet/roles', :vm_owner => 'root' },
#{ :vm_path => "#{basepath}/puppet/private", :ext_rel_path => '~/checkouts/private', :vm_owner => 'root' },
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/yum', :ext_rel_path => "#{pwd}/yumrpm", :vm_owner => 'root' }
]
when "wheezy"
box = "debian_wheezy"
url = "https://dl.dropboxusercontent.com/u/86066173/debian-wheezy.box"
basepath = "/etc"
subnet = "192.168.35"
puppetdb = true
vm_config = [
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' }
]
mount_folders = [
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/apt/archives', :ext_rel_path => "#{pwd}/aptdebs", :vm_owner => 'root' }
]
tools_vm_config = [
{ '--memory' => '1024' },
{ '--cpus' => '4' },
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' },
]
tools_mount_folders = [
{ :vm_path => "#{basepath}/puppet/data", :ext_rel_path => 'puppet/data', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/manifests", :ext_rel_path => 'puppet/manifests', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/components", :ext_rel_path => 'puppet/components', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/profiles", :ext_rel_path => 'puppet/profiles', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/roles", :ext_rel_path => 'puppet/roles', :vm_owner => 'puppet' },
#{ :vm_path => "#{basepath}/puppet/private", :ext_rel_path => '~/checkouts/private', :vm_owner => 'puppet' },
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/apt/archives', :ext_rel_path => "#{pwd}/aptdebs", :vm_owner => 'root' }
]
when "ubuntu1204lts"
box = "ubuntu_precise64"
url = "http://vagrant.rocket.local/ubuntu_precise64.box"
basepath = "/etc"
subnet = "192.168.36"
puppetdb = true
vm_config = [
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' }
]
mount_folders = [
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/apt/archives', :ext_rel_path => "#{pwd}/aptdebs", :vm_owner => 'root' }
]
tools_vm_config = [
{ '--memory' => '1024' },
{ '--cpus' => '4' },
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' }
]
tools_mount_folders = [
{ :vm_path => "#{basepath}/puppet/data", :ext_rel_path => 'puppet/data', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/manifests", :ext_rel_path => 'puppet/manifests', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/components", :ext_rel_path => 'puppet/components', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/profiles", :ext_rel_path => 'puppet/profiles', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/roles", :ext_rel_path => 'puppet/roles', :vm_owner => 'puppet' },
#{ :vm_path => "#{basepath}/puppet/private", :ext_rel_path => '~/checkouts/private', :vm_owner => 'puppet' },
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/apt/archives', :ext_rel_path => "#{pwd}/aptdebs", :vm_owner => 'root' }
]
when "ubuntu1404lts"
box = "ubuntu_trusty64"
url = "https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box"
basepath = "/etc"
subnet = "192.168.37"
puppetdb = true
vm_config = [
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' }
]
mount_folders = [
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/apt/archives', :ext_rel_path => "#{pwd}/aptdebs", :vm_owner => 'root' }
]
tools_vm_config = [
{ '--memory' => '1024' },
{ '--cpus' => '4' },
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' }
]
tools_mount_folders = [
{ :vm_path => "#{basepath}/puppet/data", :ext_rel_path => 'puppet/data', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/manifests", :ext_rel_path => 'puppet/manifests', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/components", :ext_rel_path => 'puppet/components', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/profiles", :ext_rel_path => 'puppet/profiles', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/roles", :ext_rel_path => 'puppet/roles', :vm_owner => 'puppet' },
#{ :vm_path => "#{basepath}/puppet/private", :ext_rel_path => '~/checkouts/private', :vm_owner => 'puppet' },
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/apt/archives', :ext_rel_path => "#{pwd}/aptdebs", :vm_owner => 'root' }
]
when "freebsd"
box = "freebsd_10.0-RLS-amd64"
url = "/Users/jurgenweber/VirtualBox VMs/freebsd 10/freebsd_10.0-RLS-amd64.box"
basepath = "/usr/local/etc"
subnet = "192.168.38"
puppetdb = true
vm_config = [
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' },
{ '--hwvirtex' => 'on' },
{ '--nictype1' => 'virtio' },
{ '--nictype2' => 'virtio' }
]
mount_folders = [
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/pkg', :ext_rel_path => "#{pwd}/pkgng", :vm_owner => 'root' },
{ :vm_path => '/usr/ports', :ext_rel_path => "#{pwd}/ports", :vm_owner => 'root' },
{ :vm_path => '/vagrant', :ext_rel_path => '.', :vm_owner => 'root' }
]
tools_vm_config = [
{ '--memory' => '1024' },
{ '--cpus' => '4' },
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' },
{ '--hwvirtex' => 'on' },
{ '--nictype1' => 'virtio' },
{ '--nictype2' => 'virtio' }
]
tools_mount_folders = [
{ :vm_path => "#{basepath}/puppet/data", :ext_rel_path => 'puppet/data', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/manifests", :ext_rel_path => 'puppet/manifests', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/components", :ext_rel_path => 'puppet/components', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/profiles", :ext_rel_path => 'puppet/profiles', :vm_owner => 'puppet' },
{ :vm_path => "#{basepath}/puppet/roles", :ext_rel_path => 'puppet/roles', :vm_owner => 'puppet' },
# { :vm_path => "#{basepath}/puppet/private", :ext_rel_path => '~/checkouts/private', :vm_owner => 'puppet' },
{ :vm_path => '/root', :ext_rel_path => "#{pwd}/root", :vm_owner => 'root' },
{ :vm_path => '/var/cache/pkg', :ext_rel_path => "#{pwd}/pkgng", :vm_owner => 'root' },
{ :vm_path => '/usr/ports', :ext_rel_path => "#{pwd}/ports", :vm_owner => 'root' },
{ :vm_path => '/vagrant', :ext_rel_path => '.', :vm_owner => 'root' }
]
end
machines = [
{
:name => :"#{os}-tools01",
:ip => "#{subnet}.10",
:puppetmaster => true,
:puppetdb => puppetdb,
:vbox_config => tools_vm_config,
:synced_folders => tools_mount_folders,
},
{
:name => :"#{os}-mail01",
:ip => "#{subnet}.41",
:puppetmaster => true,
:vbox_config => tools_vm_config,
:synced_folders => tools_mount_folders,
},
{
:name => :"#{os}-front01",
:ip => "#{subnet}.21",
:puppetmaster => false,
:vbox_config => vm_config,
:synced_folders => mount_folders,
},
{
:name => :"#{os}-front02",
:ip => "#{subnet}.22",
:puppetmaster => false,
:vbox_config => vm_config,
:synced_folders => mount_folders,
},
{
:name => :"#{os}-front03",
:ip => "#{subnet}.23",
:puppetmaster => false,
:vbox_config => vm_config,
:synced_folders => mount_folders,
},
{
:name => :"#{os}-db01",
:ip => "#{subnet}.31",
:puppetmaster => false,
:vbox_config => vm_config,
:synced_folders => mount_folders,
},
{
:name => :"#{os}-db02",
:ip => "#{subnet}.32",
:puppetmaster => false,
:vbox_config => vm_config,
:synced_folders => mount_folders,
},
{
:name => :"#{os}-db03",
:ip => "#{subnet}.33",
:puppetmaster => false,
:vbox_config => vm_config,
:synced_folders => mount_folders,
},
]
## For VM debug if necessary, apparently not supported in vagrant conf v2
#Vagrant.configure("1") do |config|
# config.vm.boot_mode = :gui
#end
Vagrant::configure("2") do |config|
machines.each do |machine|
config.vm.define machine[:name] do |host|
host.vm.box = box
host.vm.box_url = url
# if u need to change this, check the puppet recepies too
host.vm.host_name = "#{machine[:name]}.space-marine.org"
# necessary to support all the puppemaster related infrastrucure
host.vm.network :private_network, ip: machine[:ip]
host.ssh.forward_agent = true
# this provisioning script is necessary only for Debian/Ubuntu based nodes
host.vm.provision :shell, :path => "init_#{os}.sh", :args => [ "#{machine[:puppetmaster]}", "#{puppetdb}" ]
# this set of puppet recepies is only to model the initial puppet infrastructure
host.vm.provision :puppet do |puppet|
puppet.manifests_path = 'puppetmaster/manifests'
puppet.manifest_file = 'default.pp'
puppet.module_path = 'puppetmaster/modules'
if os == 'freebsd'
puppet.synced_folder_type = 'nfs'
end
puppet.facter = {
'puppetmaster_ip' => "#{machine[:ip]}",
'puppetmaster' => "#{machine[:name]}.example.org",
'ispuppetmaster' => machine[:puppetmaster],
'puppetdb' => puppetdb,
}
end
# VirtualBox customizations
unless machine[:vbox_config].nil?
config.vm.provider :virtualbox do |vb|
machine[:vbox_config].each do |hash|
hash.each do |key, value|
vb.customize ['modifyvm', :id, key, value]
end
end
end
end
host.vm.provision :shell, :path => 'agent.sh', :args => [ "#{machine[:puppetmaster]}", "#{puppetdb}" ]
# Synced folders
unless machine[:synced_folders].nil?
machine[:synced_folders].each do |folder|
if os == 'freebsd'
config.vm.synced_folder folder[:ext_rel_path], folder[:vm_path], type: "nfs", nfs_version: 3, create: true
else
config.vm.synced_folder folder[:ext_rel_path], folder[:vm_path], owner: folder[:vm_owner], create: true
end
end
end
end
end
end
end
@jurgenweber there are (literally) 100 moving parts in there. Are you able to reproduce this with a simpler Vagrantfile?
haha, not surprised... I did some isolating and I found the 'section', I hash this out and it works:
# VirtualBox customizations
#unless machine[:vbox_config].nil?
# config.vm.provider :virtualbox do |vb|
# machine[:vbox_config].each do |hash|
# hash.each do |key, value|
# vb.customize ['modifyvm', :id, key, value]
# end
# end
# end
#end
so for the machine I am running, it's something in here:
tools_vm_config = [
{ '--memory' => '1024' },
{ '--cpus' => '4' },
{ '--natdnshostresolver1' => 'on' },
{ '--audio' => 'none' },
]
I went and tried each of these options individually and they all failed... hash them all out and it works.
@jurgenweber is there a particular combination that makes them fail?
noop, any one.
@jurgenweber what if you remove the iteration and just use individual calls to vm.customize
?
yeah, so:
# VirtualBox customizations
unless machine[:vbox_config].nil?
config.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '1024']
vb.customize ['modifyvm', :id, '--cpus', '4']
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'on']
vb.customize ['modifyvm', :id, '--audio', 'none']
#machine[:vbox_config].each do |hash|
# hash.each do |key, value|
# vb.customize ['modifyvm', :id, key, value]
# end
#end
end
end
worked, so whats wrong with my iteration? :0
so after all of this I worked out:
config.vm.provider :virtualbox do |vb|
machine[:vbox_config].each do |hash|
hash.each do |key, value|
- vb.customize ['modifyvm', :id, key, value]
+ vb.customize ['modifyvm', :id, "#{key}", "#{value}"]
end
end
end
solved it. :)
thanks!
OSX 10.10 macports with ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-darwin14] vagrant (1.7.0.dev)