Errore di autenticazione durante Vagrant Up, mentre vagrant ssh e ssh vagrant @ localhost -p2222 funzionano
Vorrei eseguire uno script di shell usando Vagrant all'avvio. Vagrant non è in grado di autenticarsi, mentre la VM è stata avviata utilizzando vagrant up
:
c:\temp\helloworld>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'helloworld'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: helloworld_default_1398419922203_60603
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Error: Connection timeout. Retrying...
default: Error: Authentication failure. Retrying...
default: Error: Authentication failure. Retrying...
default: Error: Authentication failure. Retrying...
default: Error: Authentication failure. Retrying...
...
Dopo l'esecuzione CTRL + C
è possibile eseguire l'autenticazione nella VM usando vagrant ssh
essh vagrant@localhost -p2222
File vagabondo
Uso il Vagrantfile predefinito e ho cambiato solo il nome host:
# -*- 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|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "helloworld"
...
Versione vagabonda
c:\temp\helloworld>vagrant --version
Vagrant 1.5.1
Domanda
Come autenticarsi su VM usando vagrant up
?