-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
WinRM proxy issues with VMWare Workstation. #6775
Comments
Hey @theemptyone, I see that curl doesn't respect IP ranges yet. But I don't see any call to curl on packers' side, nor on the winrm library we use. Can you tell me exactly how you use packer in this case so I can try to reproduce/fix your problem ? |
Sorry, i had to circle around back to this. I don't believe curl will ever respect IP Ranges as it's developed now. here is my base file
The issue is that it never comes back as saying winrm is available if the IP Address isn't specifically called out in NoProxy. Since VMWare Workstation uses a DHCP pool, i have to limit the pool to 10 addresses or so, and put one explicitly into noproxy, in order to get this to work. Everything i've seen from the linux side, uses curl libraries to reach out to the host to poll for winrm. Since it doesn't respect noproxy, it goes off to the proxy, which will fail as the vm is local. |
This issue has been automatically migrated to hashicorp/packer-plugin-vmware#8 because it looks like an issue with that plugin. If you believe this is not an issue with the plugin, please reply to hashicorp/packer-plugin-vmware#8. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
My Environment is:
VMWare Workstation setups a virtual nic on your system with a reserved ip space, in my case 172.16.50.1. Then when it creates a VM it uses dhcp within VMWare that sits on the subnet it created on the virtual switch with that as the default gateway.
The problem is that the WinRM connector (I assume) uses curl to check if WinRM is available. Curl does not respect ip ranges in no_proxy; which means that you cannot put that entire subnet into no_proxy by default. Since there is no way to 'set' the ip for the VM through packer (due to how VMWare works i believe), there is no way to logically pre-empt that with a variable wrapper.
An Option is needed to allow curl (again, i assume) to ignore proxy for everything before it runs it's validator, or to add the ip that packer connects to, to it's no_proxy env variable in it's local session.
I've been able to work around this for my test cases (Vmware generally reuses the ip for a rebuild, and i've narrowed the dhcp pool to 8 ips and added each of them to no_proxy), but this does not scale.
The text was updated successfully, but these errors were encountered: