{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/8759","repository_url":"https://api.github.com/repos/mitchellh/vagrant","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/8759/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/8759/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/8759/events","html_url":"https://github.com/mitchellh/vagrant/issues/8759","id":241266635,"number":8759,"title":"Vagrant tries to use IPv6 address and fails to connect via WinRM","user":{"login":"sandersaares","id":9914262,"avatar_url":"https://avatars1.githubusercontent.com/u/9914262?v=4","gravatar_id":"","url":"https://api.github.com/users/sandersaares","html_url":"https://github.com/sandersaares","followers_url":"https://api.github.com/users/sandersaares/followers","following_url":"https://api.github.com/users/sandersaares/following{/other_user}","gists_url":"https://api.github.com/users/sandersaares/gists{/gist_id}","starred_url":"https://api.github.com/users/sandersaares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sandersaares/subscriptions","organizations_url":"https://api.github.com/users/sandersaares/orgs","repos_url":"https://api.github.com/users/sandersaares/repos","events_url":"https://api.github.com/users/sandersaares/events{/privacy}","received_events_url":"https://api.github.com/users/sandersaares/received_events","type":"User","site_admin":false},"labels":[{"id":443894505,"url":"https://api.github.com/repos/mitchellh/vagrant/labels/communicator/winrm","name":"communicator/winrm","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-07-07T13:38:44Z","updated_at":"2017-07-27T19:11:46Z","closed_at":null,"body":"### Vagrant version\r\nVagrant 1.9.6\r\n\r\n### Host operating system\r\nWindows Server 2016\r\n\r\n### Guest operating system\r\nWindows Server 2016\r\n\r\n### Vagrantfile\r\n\r\nDoes not appear dependent on anything specific in my Vagrantfile. Here is a sanitized version:\r\n\r\n```ruby\r\n# -*- mode: ruby -*-\r\n# vi: set ft=ruby :\r\n\r\nvm_image_url = \"c:/tmp/Windows2016-HyperV.box\"\r\nvm_name = \"my-windows-host\"\r\nvswitch_name = \"xxx\"\r\n\r\nVagrant.configure(\"2\") do |config|\r\n  config.vm.provision \"Copy setup files to guest\",\r\n    type: \"file\", source: \"../Content\", destination: \"C:/Users/xxx/Vagrant\"\r\n\r\n  config.vm.box = vm_image_url\r\n\r\n  config.vm.guest = :windows\r\n\r\n  config.vm.provider \"hyperv\" do |hyperv|\r\n      hyperv.vmname = vm_name\r\n\r\n      # First boot can take a while, as it does the post-sysprep initialization. Just chill for a bit.\r\n      hyperv.ip_address_timeout = 300\r\n  end\r\n\r\n  config.vm.communicator = \"winrm\"\r\n  # The transport we use provides encryption but not server authentication. No MITM protection, in other words.\r\n  config.winrm.transport = :ssl\r\n  config.winrm.ssl_peer_verification = false\r\n  config.winrm.basic_auth_only = true\r\n\r\n  config.vm.network \"public_network\", bridge: vswitch_name\r\n\r\n  # Synced folders are not necessary and in fact, can be quite problematic.\r\n  # The images may or may not support them but disable them just to be safe.\r\n  config.vm.synced_folder \".\", \"/vagrant\", disabled: true\r\n\r\n  # Default credentials used in the ASDP component host base images. Should be changed by the provision steps above.\r\n  config.winrm.username = \"xxx\"\r\n  config.winrm.password = \"xxx\"\r\n\r\nend\r\n```\r\n\r\n### Debug output\r\nhttps://gist.github.com/sandersaares/a7872745c6f4707b585d5cd12828574d\r\n\r\n### Expected behavior\r\nVM should have started and provisioning process executed. The connection should be established through IPv4 once the VM gets its IP address from DHCP.\r\n\r\n### Actual behavior\r\nVM started but Vagrant for some reason grabbed its IPv6 autoconfigured address instead of the IPv4 address (assigned via DHCP) and was thereafter unable to connect to it for whatever reason via WinRM.\r\n\r\n```\r\n==> default: Waiting for the machine to report its IP address...\r\n    default: Timeout: 300 seconds\r\n    default: IP: fe80::3494:c53c:280a:146c\r\n==> default: Waiting for machine to boot. This may take a few minutes...\r\n    default: WinRM address: fe80::3494:c53c:280a:146c:5986\r\n    default: WinRM username: xxx\r\n    default: WinRM execution_time_limit: PT2H\r\n    default: WinRM transport: ssl\r\nC:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): https://fe80::3494:c53c:280a:146c:5986/wsman (URI::InvalidURIError)\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/uri/rfc3986_parser.rb:73:in `parse'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/uri/common.rb:227:in `parse'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/http/transport.rb:29:in `initialize'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/http/transport.rb:237:in `initialize'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/http/transport_factory.rb:48:in `new'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/http/transport_factory.rb:48:in `init_ssl_transport'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/http/transport_factory.rb:29:in `create_transport'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection.rb:82:in `transport'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection.rb:76:in `shell_factory'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/winrm-2.2.3/lib/winrm/connection.rb:41:in `shell'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.6/plugins/communicators/winrm/shell.rb:66:in `cmd'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.6/plugins/communicators/winrm/communicator.rb:107:in `block in ready?'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `block in catch'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `catch'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `catch'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:106:in `timeout'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.6/plugins/communicators/winrm/communicator.rb:106:in `ready?'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.6/plugins/communicators/winrm/communicator.rb:57:in `block in wait_for_ready'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `block in catch'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `catch'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:33:in `catch'\r\n        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.3.0/timeout.rb:106:in `timeout'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.6/plugins/communicators/winrm/communicator.rb:31:in `wait_for_ready'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.6/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'\r\n        from C:/HashiCorp/Vagrant/embedded/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'\r\n```\r\n\r\n### Steps to reproduce\r\n1. `vagrant up`"},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/318458833","html_url":"https://github.com/mitchellh/vagrant/issues/8759#issuecomment-318458833","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/8759","id":318458833,"user":{"login":"ashokvaddevalli","id":3022813,"avatar_url":"https://avatars3.githubusercontent.com/u/3022813?v=4","gravatar_id":"","url":"https://api.github.com/users/ashokvaddevalli","html_url":"https://github.com/ashokvaddevalli","followers_url":"https://api.github.com/users/ashokvaddevalli/followers","following_url":"https://api.github.com/users/ashokvaddevalli/following{/other_user}","gists_url":"https://api.github.com/users/ashokvaddevalli/gists{/gist_id}","starred_url":"https://api.github.com/users/ashokvaddevalli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashokvaddevalli/subscriptions","organizations_url":"https://api.github.com/users/ashokvaddevalli/orgs","repos_url":"https://api.github.com/users/ashokvaddevalli/repos","events_url":"https://api.github.com/users/ashokvaddevalli/events{/privacy}","received_events_url":"https://api.github.com/users/ashokvaddevalli/received_events","type":"User","site_admin":false},"created_at":"2017-07-27T19:11:46Z","updated_at":"2017-07-27T19:11:46Z","body":"I have downgrade Vagrant version to 1.6\r\nNow I am not getting any issue, but it is not able to communicate VM using Winrm\r\n\r\nE:\\Vagrant-vpshere\\Vagrant>vagrant up --provider=vsphere\r\nBringing machine 'default' up with 'vsphere' provider...\r\n==> default: Calling vSphere CloneVM with the following settings:\r\n==> default:  -- Template VM: DemoIAM/vm/Templates/win7nsllatest\r\n==> default:  -- Target VM: DemoIAM/vm/Templates/NSLtest\r\n==> default: New virtual machine successfully cloned\r\n==> default: Waiting for the machine to report its IP address...\r\n    default: Timeout: 240 seconds\r\n    default: IP: X.X.X.X\r\n==> default: Waiting for machine to boot. This may take a few minutes...\r\n==> default: Machine booted and ready!\r\n\r\n\r\n"}}
{"actor":{"display_login":"ashokvaddevalli"}}