Vagrant tries to use IPv6 address and fails to connect via WinRM

365 views
Skip to first unread message

ashok vaddevalli

unread,
Aug 5, 2017, 1:03:39 AM8/5/17
to Vagrant

Vagrant version
Vagrant 1.9.7


Host operating system
Windows 7


Guest operating system
Windows7


Vagrantfile

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

config.vm.box = 'dummy'
config.vm.box_url = 'dummy.box'

config.vm.communicator = "winrm"
config.winrm.username = "administrator"
config.winrm.password = "xxx"
config.winrm.timeout = 1800

config.vm.provider :vsphere do |vsphere|
vsphere.host = 'xxx'
vsphere.compute_resource_name = 'XXX'
vsphere.data_center_name = 'DemoIAM'
vsphere.template_name = 'Templates/win7nsllatest'
vsphere.name = 'test'
vsphere.user = 'admini...@vsphere.local'
vsphere.password = 'xxx'
vsphere.insecure = true
end

end


Expected behavior:

VM should have started and provisioning process executed. The connection should be established through IPv4 once the VM gets its IP address from DHCP.


Actual behavior:

VM 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.



E:\Vagrant-vpshere\Vagrant>vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
==> default: Calling vSphere CloneVM with the following settings:
==> default: -- Template VM: Demo/vm/Templates/win7-vagrant
==> default: -- Target VM: Demo/vm/Templates/test
==> default: New virtual machine successfully cloned
==> default: Waiting for the machine to report its IP address...
default: Timeout: 240 seconds
default: IP: X.X.X.X
==> default: Waiting for machine to boot. This may take a few minutes...
default: WinRM address: X.X.X.X:5985
default: WinRM username: administrator
default: WinRM execution_time_limit: PT2H
default: WinRM transport: negotiate
bad URI(is not URI?): http://2002:a463:5ab4::a463:5ab4:5985/wsman

Alvaro Miranda Aguilera

unread,
Aug 7, 2017, 3:19:41 AM8/7/17
to vagra...@googlegroups.com
Hello

There is an issue already open for this:

You can follow that one.

Alvaro

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/77f679b0-6970-4228-8c37-21baf88757b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

ashok vaddevalli

unread,
Aug 7, 2017, 4:17:06 AM8/7/17
to Vagrant
Hi Alvaro,

That issue is related to Vagrant hyperv. I am also getting same issue on Vagrant vsphere.


Thanks,
Ashok
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.



--
Alvaro

ashok vaddevalli

unread,
Aug 7, 2017, 4:25:09 AM8/7/17
to Vagrant
For temporary solution, I have disabled ipv6 on guest VM, now I am getting different error below.

E:\Vagrant-vpshere\Vagrant>vagrant up --provider=vsphere
Bringing machine 'default' up with 'vsphere' provider...
==> default: Calling vSphere CloneVM with the following settings:

==> default: -- Template VM: DemoIAM/vm/Templates/win7latest2
==> default: -- Target VM: DemoIAM/vm/Templates/test


==> default: New virtual machine successfully cloned
==> default: Waiting for the machine to report its IP address...
default: Timeout: 240 seconds

default: IP: xxx


==> default: Waiting for machine to boot. This may take a few minutes...

default: WinRM address: xxx:5985


default: WinRM username: administrator
default: WinRM execution_time_limit: PT2H
default: WinRM transport: negotiate

==> default: Machine booted and ready!


It is hanged on ==> default: Machine booted and ready!.


Debug log:

==> default: Machine booted and ready!
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::Provision:0x00000003d82388>
 INFO provision: Checking provisioner sentinel file...
 INFO warden: Calling IN action: #<Vagrant::Action::Builtin::SyncedFolders:0x000000037db880>
 INFO synced_folders: SyncedFolders loading from cache: false
 INFO subprocess: Starting process: ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\/powershell.EXE", "-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", "(new-object System.Security.Principal.WindowsPrincipal([System.Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: True


Thanks,
Ashok

ashok vaddevalli

unread,
Aug 7, 2017, 4:37:41 AM8/7/17
to Vagrant
I think that issue is fixed on some code changes on Vagrant hyperv provider.


On Monday, 7 August 2017 13:47:06 UTC+5:30, ashok vaddevalli wrote:
Reply all
Reply to author
Forward
0 new messages