Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows RDP Port Forward Issue #1017

Closed
wstaples opened this issue Apr 22, 2016 · 1 comment
Closed

Windows RDP Port Forward Issue #1017

wstaples opened this issue Apr 22, 2016 · 1 comment

Comments

@wstaples
Copy link

Description

When the default RDP port of 3306 is in use and vagrant automatically forwards to a different port the kitchen login command stops working.

I opened this ticket with vagrant but I'm lead to believe this might be a test-kitchen issue:
hashicorp/vagrant#7174

Kitchen Version

I started in the 1.4.x
I then upgraded to 1.5.x and 1.6.0 in an attempt to fix the issue.

ChefDK Version

Chef Development Kit Version: 0.11.2
chef-client version: 12.8.1
berks version: 4.3.2
kitchen version: 1.6.0

Platform Version

Windows 7 64-bit

Replication Case

Run:
berks cookbook bugtest

Then update kitchen.yml file to look like:

---
driver:
  name: vagrant
  network:
    - ["private_network", {ip: "192.168.225.217"}]
    - - forwarded_port
      - guest: 3389
        host: 33389
        auto_correct: true
  synced_folders:
    - [".", "/vagrant"]

provisioner:
  name: chef_solo

platforms:
  - name: win2012
    driver_config:
      box: maddhatter/windows-2012r2
      box_url: maddhatter/windows-2012r2
      communicator: winrm
    transport:
      name: winrm
      winrm_transport: plaintext
    os_type: windows
    shell_type: powershell

suites:
  - name: default
    run_list:
    attributes:

Run:
kitchen create

You will then see this in the output:
==> default: Fixed port collision for 3389 => 33389. Now on port 2220.

Then try:
kitchen login

You will see that it always attempts to connect to port 3389.

Kitchen Output

if you look at the file .kitchen/default-win2012.yml that is created you will see it lists rdp_port as 3389.

---
hostname: 127.0.0.1
port: '2221'
username: vagrant
password: vagrant
rdp_port: '3389'
last_action: create

Kitchen Diagnose

https://gist.github.com/wstaples/7cb31cbf2b7d79ac436b52e6f1ea36c8

@smurawski
Copy link
Contributor

smurawski commented Apr 22, 2016

As you noted in the Vagrant issue, vagrant winrm-config, while returning the properly forwarded winrm port, doesn't return the updated rdp port as it doesn't know about it. This is really a bug/enhancement for kitchen-vagrant and I filed test-kitchen/kitchen-vagrant#224 for it.

@test-kitchen test-kitchen locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants