Closed othrayte closed 3 months ago
Note: In reducing the packer buildfile down it looks like the issue might not be with this plugin. Testing more now.
Update: the real issue was not this error and was a configuration issue see next comment.
So it turns out the issue was just that the winrm_username
was wrong and the lines with the error message where the IP should be were not actually preventing it working.
After the attempts with the error message IP address, there were subsequent attempts to connect which didn't have that issues packer/plugins seem to get past that. In attempting to reproduce the issue today I have not seen the error message in the IP again but I did find that it works if I use the correct username (which for my current setup is Administrator).
Whilst the issue is that WinRM can't connect I felt this was probably the more correct place to report as it looks like an issue with getting the IP for the HyperV VM.
Overview of the Issue
WinRM fails to connect. Debug output shows the error message "The following Msvm_KvpExchangeDataItem.Name keys are deprecated: NetworkAddressIPv4, NetworkAddressIPv6, RDPAddressIPv4, and RDPAddressIPv6. Please configure guest IP addresses using Msvm_GuestNetworkAdapterConfiguration." replaces the IP address after second reboot. (the after the first reboot it actually gets what looks like the correct IP, but the firewall rules aren't setup yet.
Plugin and Packer version
From
packer version
Packer version: 1.11.2 [go1.21.12 windows amd64] Plugin version: 1.1.3
Simplified Packer Buildfile
https://gist.github.com/othrayte/39c621f4a0dabb0be160339e618a8ab0
I'll try to simplify this down tomorrow, bit late atm
Operating system and Environment details
Windows 11 Enterprise 23H2
Log Fragments and crash.log files