15

My host is running Windows 7 Pro (64 bit). The Guest OS in this case is Windows Server 2008 R2. The 'vagrant up' command is running into an issue where I keep getting:

****default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: password
default: Warning: Connection timeout. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Remote connection disconnect. Retrying...****

till it eventually times out and says:

Timed out while waiting for the machine to boot. This means that Vagrant was unable to communicate with the guest machine within the configured ("config.vm.boot_timeout" value) time period. If you look above, you should be able to see the error(s) that Vagrant had when attempting to connect to the machine. These errors are usually good hints as to what may be wrong. If you're using a custom box, make sure that networking is properly working and you're able to connect to the machine. It is a common problem that networking isn't setup properly in these boxes. Verify that authentication configurations are also setup properly, as well. If the box appears to be booting properly, you may want to increase the timeout ("config.vm.boot_timeout") value.

The VM actually comes up fine, is accessible and usable.

  • Why is it trying to even SSH to the Windows machine?

My Vagrantfile contents are:


Vagrant.configure("2") do |config|

  # Max time to wait for the guest to shutdown
  config.windows.halt_timeout = 60

  # Admin user name and password
  config.winrm.username = "Administrator"
  config.winrm.password = "Password"

  # Configure base box parameters
  config.vm.box = "BaseBox"
  config.vm.box_url = "./Base.box"
  config.vm.guest = :windows
  config.vm.provider "virtualbox" do |v|
    v.gui = true
  end

  # Port forward WinRM and RDP (changed values to NOT conflict with host)
  config.vm.network :forwarded_port, guest: 3389, host: 3391
  config.vm.network :forwarded_port, guest: 5985, host: 5987, id: "winrm", auto_correct: true

end

4

2 回答 2

17

你需要使用

   config.vm.communicator = "winrm"

在你的流浪文件中。看看这个功能预览

于 2014-05-09T22:09:54.820 回答
0

我在 Windows 7 中遇到过这个问题。最后我们发现这个问题是由于我们使用的与 Vagrant 版本的 Linux 操作系统不兼容。因此,我们采用最新版本(即 v1.6.3)的 Vagrant 并更新我们的操作系统以指向 agent.vm.box_url = " http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-i386 -v20131103.box "

Vagrant 版本 4.3.8 不适用于以下操作系统。agent.vm.box_url = " http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box "。

我希望这有助于解决问题。

于 2014-06-30T19:45:57.177 回答