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

Fix network configuration #96

Closed
wants to merge 1 commit into from

Conversation

reidmv
Copy link

@reidmv reidmv commented Sep 15, 2013

Previously, attempting to configure a second interface (with a static ip address) would result in the following output with VAGRANT_LOG=debug:

DEBUG configure_networks: vm_interface_map: {1=>{:name=>"Local Area Connection", :mac_address=>"080027AB52FB", :interface_index=>"12", :index=>"7"}, 2=>{:name=>"Local Area Connection 2", :mac_address=>"08
002753A4C3", :interface_index=>"13", :index=>"8"}}
 INFO winrmshell: Configuring NIC  using static ip 10.20.1.60
DEBUG winrmshell: powershell executing:
netsh interface ip set address "" static 10.20.1.60 255.255.255.0
DEBUG winrmshell: Exit status: 1

The issue appears to have been caused by variable name mis-match introduced in some recent changes. With the modifications in this commit, the same debug output now shows (as expected):

DEBUG configure_networks: vm_interface_map: {1=>{:name=>"Local Area Connection", :mac_address=>"080027AB52FB", :interface_index=>"12", :index=>"7"}, 2=>{:name=>"Local Area Connection 2", :mac_address=>"08
002753A4C3", :interface_index=>"13", :index=>"8"}}
 INFO winrmshell: Configuring NIC Local Area Connection 2 using static ip 10.20.1.60
DEBUG winrmshell: powershell executing:
netsh interface ip set address "Local Area Connection 2" static 10.20.1.60 255.255.255.0
DEBUG winrmshell: Exit status: 0

Previously, attempting to configure a second interface (with a static ip
address) would result in the following output with VAGRANT_LOG=debug:

    DEBUG configure_networks: vm_interface_map: {1=>{:name=>"Local Area Connection", :mac_address=>"080027AB52FB", :interface_index=>"12", :index=>"7"}, 2=>{:name=>"Local Area Connection 2", :mac_address=>"08
    002753A4C3", :interface_index=>"13", :index=>"8"}}
     INFO winrmshell: Configuring NIC  using static ip 10.20.1.60
    DEBUG winrmshell: powershell executing:
    netsh interface ip set address "" static 10.20.1.60 255.255.255.0
    DEBUG winrmshell: Exit status: 1

The issue appears to have been caused by variable name mis-match
introduced in a recent commit. With the modifications in this commit,
the same debug output now shows (as expected):

    DEBUG configure_networks: vm_interface_map: {1=>{:name=>"Local Area Connection", :mac_address=>"080027AB52FB", :interface_index=>"12", :index=>"7"}, 2=>{:name=>"Local Area Connection 2", :mac_address=>"08
    002753A4C3", :interface_index=>"13", :index=>"8"}}
     INFO winrmshell: Configuring NIC Local Area Connection 2 using static ip 10.20.1.60
    DEBUG winrmshell: powershell executing:
    netsh interface ip set address "Local Area Connection 2" static 10.20.1.60 255.255.255.0
    DEBUG winrmshell: Exit status: 0
@sneal
Copy link
Member

sneal commented Sep 15, 2013

You're right, the capability does appear to be passing the wrong arg. Good timing, I was just about to write some unit tests for this class.

@sneal sneal closed this Sep 16, 2013
@reidmv
Copy link
Author

reidmv commented Sep 16, 2013

Issue resolved in #97

(comment for posterity)

@reidmv reidmv deleted the fix_configure_networks branch September 16, 2013 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants