hyperv-iso: Waiting for WinRM to become available...

608 views
Skip to first unread message

Mathias Krueger

unread,
Jul 6, 2018, 7:43:37 AM7/6/18
to Packer
Hello,

i am new starting with packer. I have a Windows 2012 R2 host with Hyper-V for playing. I tried hyperv-windows-2016-serverstandard-amd64.json

I adapted the variables to my enviroment, changed the ports in the powershell files to 5986 and added:

"winrm_use_ssl": true,
"winrm_insecure": true,

The logfile shows this error:

[ERROR] WinRM connection err: unknown error Post https://xxx.xxx.xxx:5986/wsman: dial tcp xxx.xxx.xxx:5986: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Google could not help me. Has somebody here pehaps an idea? Many thanks in advance...

Regards
Mathias

Alvaro Miranda Aguilera

unread,
Jul 7, 2018, 5:05:18 PM7/7/18
to packe...@googlegroups.com
hello

is always good try a repo you copy as is without changes.

if you do that the repo works?


From there, how familiar are you with the changes you are doing?

did you change on the windows side whats required to use winrm with ssl? also firewall?



--
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/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/e1d1ab95-adc9-4d40-a432-b2243efb3f92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

Mathias Krueger

unread,
Jul 9, 2018, 6:30:29 AM7/9/18
to Packer
Hello Alvaro,

thanks for your answer. My test host is configured and working, that i have to use :

Enter-PSSession -ComputerName "xxxxxxx" -Credential $c -UseSSL -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck)

to open e remote PS session to hyper-v VM's or to the host. That's why http ist not working and i need to use ssl and https.
If i wait several hours, the error in the log file changed to :
packer.exe: 2018/07/06 19:51:47 [DEBUG] Error getting WinRM host: No mac address.


Regards
Mathias

Am Samstag, 7. Juli 2018 23:05:18 UTC+2 schrieb Alvaro Miranda Aguilera:
hello

is always good try a repo you copy as is without changes.

if you do that the repo works?


From there, how familiar are you with the changes you are doing?

did you change on the windows side whats required to use winrm with ssl? also firewall?


On Fri, Jul 6, 2018 at 1:43 PM, Mathias Krueger <makr...@gmail.com> wrote:
Hello,

i am new starting with packer. I have a Windows 2012 R2 host with Hyper-V for playing. I tried hyperv-windows-2016-serverstandard-amd64.json

I adapted the variables to my enviroment, changed the ports in the powershell files to 5986 and added:

"winrm_use_ssl": true,
"winrm_insecure": true,

The logfile shows this error:

[ERROR] WinRM connection err: unknown error Post https://xxx.xxx.xxx:5986/wsman: dial tcp xxx.xxx.xxx:5986: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Google could not help me. Has somebody here pehaps an idea? Many thanks in advance...

Regards
Mathias

--
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/packer/issues
IRC: #packer-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to packer-tool...@googlegroups.com.



--
Alvaro

Message has been deleted

Mathias Krueger

unread,
Jul 16, 2018, 3:48:54 AM7/16/18
to Packer


Am Montag, 16. Juli 2018 09:43:52 UTC+2 schrieb Mathias Krueger:
Hello again,

ok, after some investigation i have to change my question:

My host is Windows Server 2012R2 wihout DHCP. I tried to build a Server 2016 VM and give the VM a static IP adress, as described in serveral examples in the Internet using a autounattend.xml.

 <component name="Microsoft-Windows-TCPIP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
           
<Interfaces>
               
<Interface wcm:action="add">
                   
<Ipv4Settings>
                       
<DhcpEnabled>false</DhcpEnabled>
                   
</Ipv4Settings>
                   
<UnicastIpAddresses>
                       
<IpAddress wcm:action="add" wcm:keyValue="1">10.168.42.209/24</IpAddress>
                   
</UnicastIpAddresses>
                   
<Identifier>00-1D-D8-B7-1C-34</Identifier>
                   
<Routes>
                       
<Route wcm:action="add">
                           
<Identifier>1</Identifier>
                           
<Prefix>0.0.0.0/0</Prefix>
                           
<NextHopAddress>10.168.42.1</NextHopAddress>
                       
</Route>
                   
</Routes>
               
</Interface>
           
</Interfaces>
       
</component>
       
<component name="Microsoft-Windows-DNS-Client" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
           
<Interfaces>
               
<Interface>
                   
<Identifier>00-1D-D8-B7-1C-34</Identifier>
                   
<EnableAdapterDomainNameRegistration>true</EnableAdapterDomainNameRegistration>
                   
<DisableDynamicUpdate>false</DisableDynamicUpdate>
                   
<DNSServerSearchOrder>
                       
<IpAddress wcm:action="add" wcm:keyValue="1">10.168.42.101</IpAddress>
                   
</DNSServerSearchOrder>
               
</Interface>
           
</Interfaces>
       
</component>

Any idea how to solve that problem is very welcome :-)
   Many thanks in Advance.
   BR
   Mathias
Reply all
Reply to author
Forward
0 new messages