# WinRM timeout for VMWare Tools Install

**URL:** <https://forum.ansible.com/t/winrm-timeout-for-vmware-tools-install/22168>\
**Category:** Ansible Project\
**Tags:** windows, vmware\
**Created:** [July 29, 2016, 11:10pm UTC](https://forum.ansible.com/t/winrm-timeout-for-vmware-tools-install/22168 "2016-07-29T23:10:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Betts](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Matt\_Betts](https://forum.ansible.com/u/Matt_Betts)\
**Post date:** [July 29, 2016, 11:10pm UTC](https://forum.ansible.com/t/winrm-timeout-for-vmware-tools-install/22168/1 "2016-07-29T23:10:03Z")

</div>

I’ve got a basic task to install VMWare tools on a Windows VM and when it installs it looks to cause a temporary network disconnection whilst it updates the NIC drivers. During this time WinRM looks to be timing out and throwing an error. VMWare tools is successfully installing though. Is anyone else using Ansible to install VMWare tools on Windows?

Traceback (most recent call last):  
File “/usr/lib/python2.7/site-packages/ansible-2.2.0-py2.7.egg/ansible/plugins/connection/winrm.py”, line 270, in exec\_command  
result = self.\_winrm\_exec(cmd\_parts[0], cmd\_parts[1:], from\_exec=True)  
File “/usr/lib/python2.7/site-packages/ansible-2.2.0-py2.7.egg/ansible/plugins/connection/winrm.py”, line 215, in \_winrm\_exec  
response = Response(self.protocol.get\_command\_output(self.shell\_id, command\_id))  
File “/usr/lib/python2.7/site-packages/winrm/protocol.py”, line 333, in get\_command\_output  
self.\_raw\_get\_command\_output(shell\_id, command\_id)  
File “/usr/lib/python2.7/site-packages/winrm/protocol.py”, line 352, in \_raw\_get\_command\_output  
res = self.send\_message(xmltodict.unparse(req))  
File “/usr/lib/python2.7/site-packages/winrm/protocol.py”, line 207, in send\_message  
return self.transport.send\_message(message)  
File “/usr/lib/python2.7/site-packages/winrm/transport.py”, line 173, in send\_message  
response = self.session.send(prepared\_request, timeout=self.read\_timeout\_sec)  
File “/usr/lib/python2.7/site-packages/requests/sessions.py”, line 585, in send  
r = adapter.send(request, \*\*kwargs)  
File “/usr/lib/python2.7/site-packages/requests/adapters.py”, line 479, in send  
raise ReadTimeout(e, request=request)  
ReadTimeout: HTTPSConnectionPool(host=‘LABSTC2WINVT675.labs.corp’, port=5986): Read timed out. (read timeout=30)  
fatal: [LABSTC2WINVT675.labs.corp]: UNREACHABLE! =\> {“changed”: false, “msg”: “failed to exec cmd PowerShell -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -EncodedCommand UwBlAHQALQBTAHQAcgBpAGMAdABNAG8AZABlACAALQBWAGUAcgBzAGkAbwBuACAATABhAHQAZQBzAHQACgBUAHIAeQAKAHsACgAmACAAJwBDADoAXABVAHMAZQByAHMAXABhAF8AdQBzAGUAcgBcAEEAcABwAEQAYQB0AGEAXABMAG8AYwBhAGwAXABUAGUAbQBwAFwAYQBuAHMAaQBiAGwAZQAtAHQAbQBwAC0AMQA0ADYAOQA4ADMAMwA1ADQANAAuADAAMQAtADIANgA0ADEANAA4ADEAOQAwADQAOAAzADIAOABcAHcAaQBuAF8AcABhAGMAawBhAGcAZQAuAHAAcwAxACcACgB9AAoAQwBhAHQAYwBoAAoAewAKACQAXwBvAGIAagAgAD0AIABAAHsAIABmAGEAaQBsAGUAZAAgAD0AIAAkAHQAcgB1AGUAIAB9AAoASQBmACAAKAAkAF8ALgBFAHgAYwBlAHAAdABpAG8AbgAuAEcAZQB0AFQAeQBwAGUAKQAKAHsACgAkAF8AbwBiAGoALgBBAGQAZAAoACcAbQBzAGcAJwAsACAAJABfAC4ARQB4AGMAZQBwAHQAaQBvAG4ALgBNAGUAcwBzAGEAZwBlACkACgB9AAoARQBsAHMAZQAKAHsACgAkAF8AbwBiAGoALgBBAGQAZAAoACcAbQBzAGcAJwAsACAAJABfAC4AVABvAFMAdAByAGkAbgBnACgAKQApAAoAfQAKAEkAZgAgACgAJABfAC4ASQBuAHYAbwBjAGEAdABpAG8AbgBJAG4AZgBvAC4AUABvAHMAaQB0AGkAbwBuAE0AZQBzAHMAYQB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cgBBAGMAdABpAG8AbgAgAFMAaQBsAGUAbgB0AGwAeQBDAG8AbgB0AGkAbgB1AGUAIAB9AA==”, “unreachable”: true}

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [August 1, 2016, 12:03pm UTC](https://forum.ansible.com/t/winrm-timeout-for-vmware-tools-install/22168/2 "2016-08-01T12:03:24Z")

</div>

Not doing this but interested to do so.

Not quite the same but see this - [https://kb.vmware.com/selfservice/microsites/search.do?language=en\_US&cmd=displayKC&externalId=1018377](https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1018377)

I think if you can persuade it not to restart networking immediately, then you can use the win\_reboot: action to restart after the vmware tools installation has run through.

Lets us know how you get on, I’m sure there are others who would be interested in this.

Jon

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [August 1, 2016, 8:06pm UTC](https://forum.ansible.com/t/winrm-timeout-for-vmware-tools-install/22168/3 "2016-08-01T20:06:47Z")

</div>

Ansible 2.2 is scheduled to ship with async support for Windows (I’m putting the finishing touches on it now), which would be the right solution to this if you’re unable to otherwise defer the NIC bounce.

-Matt

---

<div class="post-metadata">

**Author:** ![Matt\_Betts](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@Matt\_Betts](https://forum.ansible.com/u/Matt_Betts)\
**Post date:** [August 8, 2016, 2:56pm UTC](https://forum.ansible.com/t/winrm-timeout-for-vmware-tools-install/22168/4 "2016-08-08T14:56:17Z")

</div>

Unfortunately the only switches I could find with VMWare tools was to exclude modules entirely, not to postpone a delayed install until reboot. I’m just going to keep VMware tools on my templates along with the Windows Update until the async feature becomes available for Windows.

Regards,

Matt

---

<div class="post-metadata">

**Author:** ![daemenseth](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/daemenseth/32/677_2.png) [@daemenseth](https://forum.ansible.com/u/daemenseth)\
**Post date:** [February 18, 2019, 7:09pm UTC](https://forum.ansible.com/t/winrm-timeout-for-vmware-tools-install/22168/5 "2019-02-18T19:09:22Z")

</div>

Did someone find a solutions for the time-out?

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [February 18, 2019, 7:58pm UTC](https://forum.ansible.com/t/winrm-timeout-for-vmware-tools-install/22168/6 "2019-02-18T19:58:13Z")

</div>

The psrp connection plugin in Ansible 2.8 adds a reconnection\_retries and reconnection\_backoff option that allows you to retry a connection x amount of times on a ReadTimeout [https://docs.ansible.com/ansible/devel/plugins/connection/psrp.html](https://docs.ansible.com/ansible/devel/plugins/connection/psrp.html). You could try that out and see how it goes.

The docs jhawkesworth linked to showed you that it is possible possible to delay the reboot, you should be doing that then running win\_reboot after installing the tools so Ansible handles the reboot for you.

Thanks

Jordan
