2015-07-23 10 views
5

Sto iniziando la scatola vagrant con Windows 7 dall'host che è anche Windows 7 con il comando "vagrant up".Correggi il valore "config.ssh.shell" per la casella di finestre vagabonde?

Contenuto del Vagrantfile:

Vagrant.configure(2) do |config| 
    config.vm.box = "win7_base_test" 
    config.vm.network "forwarded_port", guest: 88, host: 3088 
    config.ssh.username = "vagrant" 
    config.ssh.password = "vagrant" 
    config.ssh.port = "3088" 
    config.ssh.host = "127.0.0.1" 
    config.ssh.shell = "cmd" 
end 

Come risultato ottengo una lista con un errore alla fine:

vagrant up 

Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Clearing any previously set forwarded ports... 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
==> default: Forwarding ports... 
    default: 88 => 3088 (adapter 1) 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:3088 
    default: SSH username: vagrant 
    default: SSH auth method: password 
    default: Warning: Connection timeout. Retrying... 
The configured shell (config.ssh.shell) is invalid and unable 
to properly execute commands. The most common cause for this is 
using a shell that is unavailable on the system. Please verify 
you're using the full path to the shell and that the shell is 
executable by the SSH user. 

Avviso: io sono in grado di connettersi alla scatola vagabondo eseguendo " vagrant ssh "nel frattempo e impartisce comandi di shell lì.

Quindi ho una domanda: devo usare il valore corretto ("cmd") per il parametro "config.ssh.shell"? Quali valori sono possibili lì?

Grazie!

+0

Per favore sposta la tua domanda su [su]. È [off-topic] (http://stackoverflow.com/help/on-topic) qui. –

risposta

0

Secondo il Vagrant docs, config.ssh.shell colpisce solo ciò che viene utilizzato guscio all'interno Vagrant, non quello che viene utilizzato come il guscio quando si esegue vagrant ssh. Di default usa bash e, a meno che tu non abbia una necessità specifica di cambiarlo, lascialo come immagino.

1

Un'opzione è utilizzare WinRM anziché SSH: impostare config.vm.communicator su "winrm".