Having issues with port forwarding using windows. vagrant seems to map 3389 (RDP) regardless of configuration.

1,334 views
Skip to first unread message

Owain Perry

unread,
Feb 3, 2014, 7:19:05 PM2/3/14
to vagra...@googlegroups.com
Hi, 

I am having issues with port forward collisions. It seems to map 3389 first regardless of what I specify in the configuration. Although it does do the mapping last , but the first port causes a collision with local running RDP service. I am also trying to get a multi machine environment setup. 

Host: windows 8 
Guest: windows 2012 (not r2) 
Vagrant: 1.4.3
vagrant-windows: 1.5.1

<config>

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

  config.vm.define "web" do |web|
    web.vm.network :forwarded_port, guest: 3389, host: 3377 , id: "rdp", auto_correct: true
    web.vm.box = "win2012"
    web.winrm.username = "vagrant"
    web.winrm.password = "vagrant"  
    web.vm.guest = :windows  
    web.windows.halt_timeout = 15
    web.berkshelf.enabled = true
    web.vm.provider :virtualbox do |vb|
      vb.gui = true
      vb.customize ["modifyvm", :id, "--memory", "2048"]
    end
    web.vm.provision :chef_solo do |chef|
      chef.log_level         = :info
      chef.add_recipe ("demo.rest.service::default")
    end
  end
end

</config>

<output>

[web] Clearing any previously set network interfaces...
[web] Preparing network interfaces based on configuration...
[web] Forwarding ports...
[web] -- 22 => 2222 (adapter 1)
[web] -- 3389 => 3389 (adapter 1)
[web] -- 5985 => 5985 (adapter 1)
[web] -- 3389 => 3377 (adapter 1)
[web] Running 'pre-boot' VM customizations...
[web] Booting VM...

</output

Any help appreciated. 

O.

Mitchell Hashimoto

unread,
Feb 4, 2014, 3:51:26 AM2/4/14
to vagra...@googlegroups.com
Owain,

You might want to reach out and ping the vagrant-windows folks directly, as well. The best way to do this is probably via the issues on the repo.

Best,
mitchell


--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Shawn Neal

unread,
Feb 4, 2014, 11:02:27 AM2/4/14
to vagra...@googlegroups.com
Vagrant-windows doesn't do any port forwarding. Sounds like you have another Vagrantfile with the forwarded ports its inheriting from.

Steven Dick

unread,
Feb 10, 2014, 9:56:04 AM2/10/14
to vagra...@googlegroups.com
I had this problem as well. Shawn's suggestion that another Vagrantfile is inherited was the source my problem. The .vagrant.d directory contained the box definition and this contained a Vagrantfile with port 3389 begin forwarded from guest to host. Changing that Vagrantfile solved the problem.
Reply all
Reply to author
Forward
0 new messages