hashicorp / vagrant

Vagrant is a tool for building and distributing development environments.
https://www.vagrantup.com
Other
26.16k stars 4.43k forks source link

WinRM Timeout/Port Collisions #10535

Open nterl0k opened 5 years ago

nterl0k commented 5 years ago

Vagrant version

Vagrant 2.2.2 vagrant-reload (0.0.1, global) vagrant-vmware-desktop (2.0.2, global)

Host operating system

Windows Server 2016. VMWare Workstation 12.5.9

Guest operating system

Windows 10 / Windows 2016.

Vagrantfile

https://github.com/clong/DetectionLab/blob/master/Vagrant/Vagrantfile

Debug output

Provide a link to a GitHub Gist containing the complete debug output: https://www.vagrantup.com/docs/other/debugging.html. The debug output should be very long. Do NOT paste the debug output in the issue, just paste the link to the Gist. 2 files in the gist,

1 from the command: vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant_DetectLab 2 from the commadn: vagrant reload dc --provision --debug 2>&1 | Tee-Object -FilePath ".\vagrant_DetectLab2

https://gist.github.com/nterl0k/1fdc0ace2572c9bb7feb2c912cf14d42

Expected behavior

WinRM port forwards and provisioning should have occurred.

Actual behavior

WinRM port forwards occur initially, but then timeout and WinRM collisions (55985, 55986) occur on subsequent provisioning attempts.

Steps to reproduce

Checked the following items:

  1. Used "./vagrant up" -failed as above in debug
  2. Used "./vagrant reload dc --provision" - failed as above
  3. Attempted complete fresh install of vagrant and vmware plugin (twice)

Attempted Fix:es (using "./vagrant reload dc --provision" after each)

References

https://github.com/clong/DetectionLab/issues/169 ...

jsecurity101 commented 5 years ago

Any update/news on this? I am getting the same error. Using: VMware Workstation 15 Vagrant 2.2.4 Vagrant-VMware-Utility 1.0.7

nterl0k commented 5 years ago

No sir, I've also tested with VMware 15 and updated vagrant installation / plugins as well and have received the same error

jsecurity101 commented 5 years ago

Thanks for the update! Back to Virtualbox I guess :( @nterl0k

rootwars commented 5 years ago

FWIW, I was able to build VMware VMs using Workstation 15 under Linux. I was then able to export to OVF and import into ESXi.

clong commented 5 years ago

I don't understand the root cause of this bug, but removing the port forwarding for RDP from the Packer template seems to resolve the problem completely. I suspect Windows machines barf when trying to forward a port that is already being used and all additional port forwards either abort or fail.