Open wouterhummelink opened 4 months ago
I came across the same problem. I found for me it happened on new deployments of Windows OVFs. My workaround was to add a wait_for_connection task at the beginning of my playbook.
I've actually seen wait_for_connection error out the same way. I've worked around this by forcing the command to powershell.exe
Verzonden vanaf Outlook voor Androidhttps://aka.ms/AAb9ysg
From: Jason Thomas @.> Sent: Saturday, August 24, 2024 11:51:28 PM To: ansible-collections/community.vmware @.> Cc: Wouter Hummelink @.>; Author @.> Subject: Re: [ansible-collections/community.vmware] VMWare Tools connection plugin frequently bombs against Windows targets: StartProgramInGuest Error: File /bin/sh was not found (Issue #2099)
I came across the same problem. I found for me it happened on new deployments of Windows OVFs. My workaround was to add a wait_for_connectionhttps://docs.ansible.com/ansible/latest/collections/ansible/builtin/wait_for_connection_module.html task at the beginning of my playbook.
— Reply to this email directly, view it on GitHubhttps://github.com/ansible-collections/community.vmware/issues/2099#issuecomment-2308550525, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJ3WO2YPAW65LMWTSLOHODZTD56BAVCNFSM6AAAAABJZKJOQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBYGU2TANJSGU. You are receiving this because you authored the thread.Message ID: @.***>
@wouterhummelink Could you reproduce the issue on the latest version of the collection?
I've actually changed jobs in the mean time.
Verzonden vanaf Outlook voor Androidhttps://aka.ms/AAb9ysg
From: Alexander Nikitin @.> Sent: Sunday, August 25, 2024 2:42:54 PM To: ansible-collections/community.vmware @.> Cc: Wouter Hummelink @.>; Mention @.> Subject: Re: [ansible-collections/community.vmware] VMWare Tools connection plugin frequently bombs against Windows targets: StartProgramInGuest Error: File /bin/sh was not found (Issue #2099)
@wouterhummelinkhttps://github.com/wouterhummelink Could you reproduce the issue on the latest version of the collection?
— Reply to this email directly, view it on GitHubhttps://github.com/ansible-collections/community.vmware/issues/2099#issuecomment-2308818895, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJ3WO2H75HHNG6UXDVQ6T3ZTHGM5AVCNFSM6AAAAABJZKJOQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBYHAYTQOBZGU. You are receiving this because you were mentioned.Message ID: @.***>
Facing the same issue, randomly bombs as you stated. Can you please suggest which job did you change to so I can look for alternatives meanwhile as well? This job is one of our core functionalities so we need something reliable
I meant I no longer work at the place I filed this issue for. Look for the executable setting on the VMware tools connection plugin
Op ma 26 aug 2024 13:55 schreef Junaid Darajat @.***>:
Facing the same issue, randomly bombs as you stated. Can you please suggest which job did you change to so I can look for alternatives meanwhile as well? This job is one of our core functionalities so we need something reliable
— Reply to this email directly, view it on GitHub https://github.com/ansible-collections/community.vmware/issues/2099#issuecomment-2310025177, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJ3WO7K7PPI2U4BL4PWPYDZTMJRPAVCNFSM6AAAAABJZKJOQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJQGAZDKMJXG4 . You are receiving this because you were mentioned.Message ID: @.***>
@wouterhummelink Could you reproduce the issue on the latest version of the collection?
We are hitting the same issue on collection version 4.5.0 with the ansible community package 10.3.0.
We were not able to reproduce the issue reliably so far
We were able to somewhat reliably reproduce the issue by just running enough tasks with this playbook:
- hosts: testhost
tasks:
- name: Run 100 connection test commands
ansible.windows.win_ping:
loop: "{{ range(0, 100) | list }}"
Using that we found that setting the following variable seems to be a valid workaround for the issue:
ansible_vmware_tools_executable: C:\\\\Windows\\\\System32\\\\WindowsPowerShell\\\\v1.0\\\\powershell.exe
The four backslashes are required to work around another issue where we got the error "Unexpected failure during module execution: bad escape \\p at position 43"
That's exactly what I did, however using just powershell.exe.
Verzonden vanaf Outlook voor Androidhttps://aka.ms/AAb9ysg
From: Martin @.> Sent: Thursday, October 17, 2024 9:52:31 AM To: ansible-collections/community.vmware @.> Cc: Wouter Hummelink @.>; Mention @.> Subject: Re: [ansible-collections/community.vmware] VMWare Tools connection plugin frequently bombs against Windows targets: StartProgramInGuest Error: File /bin/sh was not found (Issue #2099)
We were able to somewhat reliably reproduce the issue by just running enough tasks with this playbook:
Using that we found that setting the following variable seems to be a valid workaround for the issue:
ansible_vmware_tools_executable: C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe
The four backslashes are required to work around another issue where we got the error "Unexpected failure during module execution: bad escape \p at position 43"
— Reply to this email directly, view it on GitHubhttps://github.com/ansible-collections/community.vmware/issues/2099#issuecomment-2418818593, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABJ3WO7FHSV4JE352XNNPN3Z35UD7AVCNFSM6AAAAABJZKJOQSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYHAYTQNJZGM. You are receiving this because you were mentioned.Message ID: @.***>
using only powershell.exe we got StartProgramInGuest Error: File powershell.exe was not found
in the same random frequency as the /bin/sh message
SUMMARY
ISSUE TYPE
COMPONENT NAME
community.vmware.vmware_tools connection plugin
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Windows 2016/2019/2022
STEPS TO REPRODUCE
We run this playbook many times per day, most succeed, but a significant percentage will bomb on a random task, or even on the wait_for_connection.
EXPECTED RESULTS
Jobs don't attempt to /bin/sh against windows targets
ACTUAL RESULTS