Vagrant 2.2.2 port forwarding with auto_correct

18 views
Skip to first unread message

mwinfie

unread,
Dec 13, 2018, 1:28:28 PM12/13/18
to Vagrant
Port 5985 on my local computer is already being used by WinRM running on my local machine. When I do a `vagrant up` with the Vagrantfile at the end of this post, I get the below error. The issue seems to be that my machine is already using port 5985 which I would expect the `auto_correct:true` flag on the port forwarding to resolve automatically. At first I thought the auto_correct flag was broken entirely, but I brought up two different VMs using the same Vagrantfile in two different directories and Vagrant resolved those conflicts.

This leads me to ask the question. Is `auto_correct:true` able to resolve port conflicts between host and guest? Or is it only meant to resolve port collisions between guests?

==> win7devenv: Waiting for machine to boot. This may take a few minutes...
    win7devenv: WinRM address: 127.0.0.1:5985
    win7devenv: WinRM username: vagrant
    win7devenv: WinRM execution_time_limit: PT2H
    win7devenv: WinRM transport: negotiate
    win7devenv: Warning: Authentication failure. Retrying...
    win7devenv: Warning: Authentication failure. Retrying...
    win7devenv: Warning: Authentication failure. Retrying...
    win7devenv: Warning: Authentication failure. Retrying...
    win7devenv: Warning: Authentication failure. Retrying...
    win7devenv: Warning: Authentication failure. Retrying...
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.


Vagrantfile
# Defines our Vagrant environment
#
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure('2') do |config|
  config.vm.box = 'opentable/win-7-professional-amd64-nocm'
  config.vm.communicator = 'winrm'
  config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "winrm", auto_correct: true
  config.vm.define 'win7devenv' do |node|
    node.vm.hostname = 'windevenv'
    node.vm.network :private_network, ip: '10.0.15.5'
    node.vm.provider 'virtualbox' do |vb|
      vb.memory = '2048'
    end
  end
end


Alvaro Miranda Aguilera

unread,
Dec 14, 2018, 1:12:49 PM12/14/18
to vagra...@googlegroups.com
hello

in the logs is not the part of the port fwd

it seems the winrm communicator expect the port 5985 for this.

can you open an issue in github? include the full log of vagrantup please


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/46df4035-11dc-441a-a89f-6a72bca7b91a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Alvaro

Reply all
Reply to author
Forward
0 new messages