Windows 8.1, neueste Vagrant- und VirtualBox-Versionen. Ausführen von Befehlen in der Git-CLI unter Windows.
Der Start verlief ubuntu/trusty64
problemlos und ich musste mich nicht bei atlas.hashicorp.com anmelden.
Aber als ich es versucht habe, ubuntu/xenial64
ist eine Fehlermeldung aufgetreten.
vagrant init ubuntu/xenial64; vagrant up --provider virtualbox
Außerdem hat Trusty 64 keine Warnungen bezüglich der Anmeldung mit verursacht vagrant login
, da aber Xenial 64 eine solche Warnung verursacht hat, habe ich sofort ein Konto bei atlas.hashicorp.com erstellt.
Normalerweise erhalte ich vagrant login
beim Anmelden die Meldung „Sie sind jetzt angemeldet.“
Ich habe das Vagrant-Zeug aus dem Ordner gelöscht und die init
und up
Befehle erneut ausgeführt, erhalte aber erneut den gleichen Fehler.
$ vagrant init ubuntu/xenial64; vagrant up --provider virtualbox
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'ubuntu/xenial64' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/ubuntu/xenial64"]
Error:
Aber der Abschnitt „Fehler:“ ist leer.
Vagrantfile
Ich habe anderswo einen Vorschlag gefunden, die URL der Box wie folgt hinzuzufügen :
config.vm.box_url = "http://example.com/some_box_url.box"
https://stackoverflow.com/a/31538713/631764
Ich teste dies jetzt mit dem in den Kommentaren vorgeschlagenen Link. Hier ist die vollständige Version Vagrantfile
ohne die meisten Kommentare:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "ubuntu/xenial64"
config.vm.box_url = "https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160610.0.0/providers/virtualbox.box"
# VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = true
# Customize the amount of memory on the VM:
# vb.memory = "1024"
end
end
Aber selbst mit der URL erhalte ich eine Fehlermeldung:
$ vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'ubuntu/xenial64' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Box file was not detected as metadata. Adding it directly...
==> default: Adding box 'ubuntu/xenial64' (v0) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/xenial64/versions/20160610.0.0/providers/virtualbox.box
default:
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Es wurde keine Fehlermeldung angezeigt.
Antwort1
Ich hatte das gleiche Problem mit OSX und musste das eingebettete Curl löschen:
sudo rm /opt/vagrant/embedded/bin/curl
Es wird dann der systemeigene Curl-Standard anstelle des eingebetteten, fehlerhaften Curl verwendet.
Antwort2
Ich habe anscheinend die Antwort gefunden.
Die neuesten Versionen von Vagrant (anscheinend 1.8+) enthalten eine Version von, curl
diefunktioniert nicht unter Windows 7, 8, 8.1 oder 10wie es ist!
Das Problem lässt sich jedoch ganz einfach beheben. Installieren Sie einfach das Microsoft Visual C++ 2010 SP1 Redistributable Package:
https://www.microsoft.com/en-us/download/details.aspx?id=8328
Auf dieser Seite wird Windows 8.1 nicht als kompatibles Betriebssystem aufgeführt, aber bei mir hat es funktioniert. Es war kein Systemneustart erforderlich und meine virtuelle Maschine ist bereits einsatzbereit.
Alternativ scheint auch ein Downgrade auf Vagrant Version 1.7.4 das Problem zu lösen: https://releases.hashicorp.com/vagrant/
Ich habe beide Lösungen hier gefunden: https://github.com/mitchellh/vagrant/issues/6852
Doppelte Probleme: https://github.com/mitchellh/vagrant/issues/6754 https://github.com/mitchellh/vagrant/issues/6861