community.vmware
community.vmware copied to clipboard
VMWare Tools connection plugin frequently bombs against Windows targets: StartProgramInGuest Error: File /bin/sh was not found
SUMMARY
ISSUE TYPE
- Bug Report
COMPONENT NAME
community.vmware.vmware_tools connection plugin
ANSIBLE VERSION
AAP 2.4 / Ansible 2.15 execution environment
COLLECTION VERSION
community.vmware:3.11.2
CONFIGURATION
ansible_connection: community.vmware.vmware_tools
ansible_user: Administrator
ansible_password: "sensitive"
ansible_shell_type: powershell
ansible_vmware_guest_path: /{{ deploy_windows_datacenter }}/vm/{{ deploy_windows_vm_folder }}/{{ deploy_windows_vm_name }}
ansible_vmware_validate_certs: false
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.
- name: Wait for connection
ansible.builtin.wait_for_connection:
connect_timeout: 5
timeout: 600
delay: 0
sleep: 10
- name: Setup
ansible.builtin.setup:
register: setup
retries: 3
until: setup is succeeded
EXPECTED RESULTS
Jobs don't attempt to /bin/sh against windows targets
ACTUAL RESULTS
TASK [deploy_windows : Wait for connection] ************************************
task path: /runner/project/roles/deploy_windows/tasks/post_config.yml:8
wait_for_connection: attempting ping module test
wait_for_connection: attempting ping module test
wait_for_connection: attempting ping module test
Using module file /runner/requirements_collections/ansible_collections/ansible/windows/plugins/modules/win_ping.ps1
fatal: [cdmde117cf36ae3]: FAILED! => {
"msg": "StartProgramInGuest Error: File /bin/sh was not found"
}