Vik*_*lyi 5 ssh vagrant vagrantfile
我正在使用Windows 7从主机启动流浪盒,这也是带有"vagrant up"命令的Windows 7.
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
结果我得到以下列表,最后出现错误:
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.
注意:我可以通过在此期间执行"vagrant ssh"连接到vagrant box并在那里发出shell命令.
因此我有一个问题:我对"config.ssh.shell"参数使用正确的值("cmd")吗?那里有什么价值?
谢谢!
根据Vagrant 文档,仅影响 Vagrant中config.ssh.shell使用的 shell ,而不影响执行时用作 shell 的内容。默认情况下,它使用 bash,除非您有特定需要更改此设置,否则请保留我认为的那样。vagrant ssh
| 归档时间: | 
 | 
| 查看次数: | 3931 次 | 
| 最近记录: |