-
Notifications
You must be signed in to change notification settings - Fork 15
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
Failing to test WinRM availability when creating vm #35
Comments
[edited line: 349 and 465] I found that the patched version did not fix the issue.
Hope that helps. |
Is this resolved? If so please close it 🤘 . |
I'm afraid I still had the issue with 2.0.4. |
@gaelcolas My PR that was merged should contain the fix but hasn't been released yet. If you look at #38 and make changes on your instance this will hopefully fix. Next release should contain my code and solve your issue. |
As soon as #41 is completed I'm going to release the gem. |
Tested 2.0.5 this morning and it works like charm! Closing. |
Versions:
Platform Details
Scenario:
Trying to create/converge windows VM from custom template via Test-Kitchen.
Steps to Reproduce:
With a very raw template (vanilla Win2012R2 + updates + wmf5 + vmtools) we did not encounter this problem, but adding a few configuration (proxy for SYSTEM account + certificate) and deriving a template from this the problem started to appear.
I haven't found the root cause, but I suspect it takes slightly longer for the vmtools to kick in.
Expected Result:
New machine with template started, nodes/ folder containing the created VM details, and ability to destroy created vm.
Actual Result:
The process errors just before it should Wait for available IPs, without (re)attempting to connect.
The error log shows the winrm is raising that exception, and some debugging pointed me to this line:
vm_ip ||= ip_to_bootstrap(boostrap_options,vm)
As I could see that
vm_ip
wasnil
and being passed totransport_for
and then tocreate_winrm_transport
, I changed the problematic line like so:vm_ip = vm.guest.ipAddress || ip_to_bootstrap(bootstrap_options, vm)
That did the trick (we only rely on DHCP provided addresses), although I'm not sure that's a fix, as I'm not familiar with driver, let alone ruby.
Here's our kitchen.yml (sanitized):
Does that makes sense?
Happy to do more testing for a better fix.
The text was updated successfully, but these errors were encountered: