2014-05-06 8 views
10

Der Versuch, die Einrichtung rethinkdb https://github.com/RyanAmos/rethinkdb-vagrantVagrant up - Die folgenden Einstellungen nicht existieren sollten: vm (rethinkdb-Vagabund)

C:\rethinkdb-vagrant>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: 

VirtualBox Provider: 
* The following settings shouldn't exist: vm 

VagrantFile mit

# -*- mode: ruby -*- 
# vi: set ft=ruby : 

# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! 
VAGRANTFILE_API_VERSION = "2" 

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
    # Ubuntu 12.04, 64 bit 
    config.vm.box  = 'precise64' 
    config.vm.box_url = 'http://files.vagrantup.com/precise64.box' 

    # Providers 
    config.vm.provider :virtualbox do |p| 
    p.vm.customize ['modifyvm', :id, '--memory', '512', '--ioapic', 'on'] 
    end 

    # SSH 
    config.ssh.username = "vagrant" 

    # Port Forwarding 
    config.vm.network :forwarded_port, guest: 8080, host: 8080 
    config.vm.network :forwarded_port, guest: 28015, host: 28015 
    config.vm.network :forwarded_port, guest: 29015, host: 29015 

    # Attempt to 'guess' the default network 
    config.vm.network :public_network, :bridge => 'en0: Wi-Fi (AirPort)' 

    # Provisioning 
    config.vm.provision :shell do |sh| 
    sh.inline = <<-EOF 
     export DEBIAN_FRONTEND=noninteractive; 
     apt-get update --assume-yes; 
     apt-get install --assume-yes python-software-properties; 
     add-apt-repository --yes ppa:rethinkdb/ppa 2>&1; 
     apt-get update --assume-yes; 
     apt-get install --assume-yes rethinkdb; 

     sed -e 's/somebody/root/g' -e 's/somegroup/root/g' -e 's/# bind=127.0.0.1/bind=all/g' /etc/rethinkdb/default.conf.sample > /etc/rethinkdb/instances.d/default.conf 

     rethinkdb create -d /var/lib/rethinkdb/instances.d/default 2>&1; 

     service rethinkdb start; 
    EOF 
    end 
end 

Antwort

12

Das Problem in diesem Abschnitt ist:

# Providers 
config.vm.provider :virtualbox do |p| 
    p.vm.customize ['modifyvm', :id, '--memory', '512', '--ioapic', 'on'] 
end 

wo als äußere Schleife nur p.customize sein sollte Shows, vm ist Elternteil zum Versorger und customize hängt direkt vom Versorger.

Also der richtige Block wäre:

# Providers 
config.vm.provider :virtualbox do |p| 
    p.customize ['modifyvm', :id, '--memory', '512', '--ioapic', 'on'] 
end 
+0

Danke für die Antwort. Es hat mich dazu gebracht, Vagrant auf 1.6.2 zu aktualisieren, was den Fix hatte, den du oben gepostet hast, aber es hat es immer noch nicht repariert. :-( –

+0

Ja, ich habe heute Morgen mit der Konfigurationsdatei herumgespielt und das sieht danach aus. Fühlen Sie sich frei, Ihre Antwort zu aktualisieren, und ich werde sie korrekt markieren. –

-2

Wenn Sie laufen:

vagrant global-status 

Sie alle möglichen Maschinen sehen, die auf Ihrem Computer ausgeführt werden können.

Dann diese Maschinen nehmen und vagrant suspend [machine id]

Weiter mehr gehen Sie Virtual Box und Power Off diesen Maschinen manuell aus dieser GUI öffnen kann, die die Ports freizugeben sollte.