#  Playbook using vmware\_vm\_info module fails when run from AWX

**URL:** <https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932>\
**Category:** Get Help\
**Tags:** vmware, awx\
**Created:** [December 2, 2025, 5:20pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932 "2025-12-02T17:20:50Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aichatou\_Iyabo\_OKEKO](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/aichatou_iyabo_okeko/32/9889_2.png) [@Aichatou\_Iyabo\_OKEKO](https://forum.ansible.com/u/Aichatou_Iyabo_OKEKO)\
**Post date:** [December 2, 2025, 5:20pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/1 "2025-12-02T17:20:50Z")

</div>

I am encountering a problem with AWX when I try to use the community.vmware.vmware\_vm\_info module to retrieve the list of VMs from a vCenter.

- My code

```auto
---
- name: Récupérer la liste des VM sur vCenter
  hosts: localhost
  gather_facts: no
  collections:
    - community.vmware

  vars:
    vcenter_validate_certs: false   
  tasks:
    - name: Gather all registered virtual machines
      vmware_vm_info:
        validate_certs: "{{ vcenter_validate_certs }}"
      delegate_to: localhost
      register: vm_info

    - debug:
        var: vm_info.virtual_machines

```

- Result of the execution failure

```auto
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: }
fatal: [localhost]: FAILED! => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python3"}, "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/runner/.ansible/tmp/ansible-tmp-1764691283.1468372-22-151162757697601/AnsiballZ_vmware_vm_info.py\", line 107, in <module>\n _ansiballz_main()\n File \"/runner/.ansible/tmp/ansible-tmp-1764691283.1468372-22-151162757697601/AnsiballZ_vmware_vm_info.py\", line 99, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/runner/.ansible/tmp/ansible-tmp-1764691283.1468372-22-151162757697601/AnsiballZ_vmware_vm_info.py\", line 47, in invoke_module\n runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vmware_vm_info', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vmware_vm_info', _modlib_path=modlib_path),\n Fi…
``
```

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [December 2, 2025, 5:28pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/2 "2025-12-02T17:28:56Z")

</div>

The result doesn’t look complete. I don’t see what exactly failed there. Could you give us the full stack trace?

BTW what version of `community.vmware` are you using?

---

<div class="post-metadata">

**Author:** ![Aichatou\_Iyabo\_OKEKO](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/aichatou_iyabo_okeko/32/9889_2.png) [@Aichatou\_Iyabo\_OKEKO](https://forum.ansible.com/u/Aichatou_Iyabo_OKEKO)\
**Post date:** [December 2, 2025, 6:43pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/3 "2025-12-02T18:43:42Z")

</div>

PLAY [Récupérer la liste des VM sur vCenter] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
TASK [Gather all registered virtual machines] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /runner/project/playbooks/lister\_vm2.yml:11  
[WARNING]: Collection vmware.vmware does not support Ansible version 2.15.12  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TimeoutError: [Errno 110] Connection timed out  
fatal: [localhost]: FAILED! =\> {“changed”: false, “module\_stderr”: "Traceback (most recent call last):\n File "/runner/.ansible/tmp/ansible-tmp-1764699847.962096-22-64845711897849/AnsiballZ\_vmware\_vm\_info.py", line 107, in \n \_ansiballz\_main()\n File "/runner/.ansible/tmp/ansible-tmp-1764699847.962096-22-64845711897849/AnsiballZ\_vmware\_vm\_info.py", line 99, in \_ansiballz\_main\n invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)\n File "/runner/.ansible/tmp/ansible-tmp-1764699847.962096-22-64845711897849/AnsiballZ\_vmware\_vm\_info.py", line 47, in invoke\_module\n runpy.run\_module(mod\_name=‘ansible\_collections.community.vmware.plugins.modules.vmware\_vm\_info’, init\_globals=dict(\_module\_fqn=‘ansible\_collections.community.vmware.plugins.modules.vmware\_vm\_info’, \_modlib\_path=modlib\_path),\n File "/usr/lib64/python3.9/runpy.p…  
PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

---

<div class="post-metadata">

**Author:** ![mikemorency](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mikemorency/32/2672_2.png) [@mikemorency](https://forum.ansible.com/u/mikemorency)\
**Post date:** [December 2, 2025, 7:32pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/4 "2025-12-02T19:32:32Z")

</div>

```auto
The error was: TimeoutError: [Errno 110] Connection timed out

```

Is your credential setup correctly and assigned to the job template? Does your AWX runner have access to your vcenter?

---

<div class="post-metadata">

**Author:** ![dbrennand](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dbrennand/32/7830_2.png) [@dbrennand](https://forum.ansible.com/u/dbrennand)\
**Post date:** [December 2, 2025, 8:06pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/5 "2025-12-02T20:06:58Z")

</div>

Hi @Aichatou_Iyabo_OKEKO

Welcome to the forum 🙂

As @mikemorency mentioned, it looks like you might have a connectivity issue between AWX and the vCenter.

If you build your own execution environment, and it has tooling such as telnet or openssh-client you could try using these with the command module in a playbook to check the connectivity. Alternatively, if you have access to the Kubernetes cluster which AWX is deployed on, try deploying a busybox pod and test the connectivity to vCenter that way.

A question I have is are you setting the `hostname` for the module via the `VMWARE_HOST` environment variable?

---

<div class="post-metadata">

**Author:** ![Aichatou\_Iyabo\_OKEKO](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/aichatou_iyabo_okeko/32/9889_2.png) [@Aichatou\_Iyabo\_OKEKO](https://forum.ansible.com/u/Aichatou_Iyabo_OKEKO)\
**Post date:** [December 3, 2025, 2:14pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/6 "2025-12-03T14:14:27Z")

</div>

Yes , AWX have acces to vcenter

---

<div class="post-metadata">

**Author:** ![Aichatou\_Iyabo\_OKEKO](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/aichatou_iyabo_okeko/32/9889_2.png) [@Aichatou\_Iyabo\_OKEKO](https://forum.ansible.com/u/Aichatou_Iyabo_OKEKO)\
**Post date:** [December 3, 2025, 2:19pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/7 "2025-12-03T14:19:43Z")

</div>

Actually, I can create a virtual machine from AWX to vCenter. But I can’t retrieve the list of virtual machines in vCenter, and I haven’t built a runtime environment.

---

<div class="post-metadata">

**Author:** ![mikemorency](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mikemorency/32/2672_2.png) [@mikemorency](https://forum.ansible.com/u/mikemorency)\
**Post date:** [December 3, 2025, 2:45pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/8 "2025-12-03T14:45:37Z")

</div>

If you can provide `-vvvv` output, that would be helpful.

Do you have other tasks in this same playbook that are connecting to vCenter?

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [December 3, 2025, 6:51pm UTC](https://forum.ansible.com/t/playbook-using-vmware-vm-info-module-fails-when-run-from-awx/44932/9 "2025-12-03T18:51:04Z")

</div>

> [@mikemorency](#):
>
> ```auto
> The error was: TimeoutError: [Errno 110] Connection timed out
> 
> ```
> 
> Is your credential setup correctly and assigned to the job template?

Wrong credentials shouldn’t result in a timeout IMHO. Looks more like a connectivity / network problem to me.

I think the module uses both the (original) SOAP API and the (newer) REST API. I’m not 100% sure if they really use the same ports. If creating a VM works but `vmware_vm_info` doesn’t, maybe we have a problem there?

Both APIs _should_ use the same port, but it might depend on pyvmomi or vcf-sdk or whatever version is installed. And maybe even on the `community.version` used. @Aichatou_Iyabo_OKEKO What is it? The latest / current one is 6.1.0.

I’m with @mikemorency there, it might help us if you run this with increased verbosity (`-vvvv`).

BTW I don’t think this is the problem but:

> [WARNING]: Collection vmware.vmware does not support Ansible version 2.15.12

You’re not using a supported ansible-core version. But I don’t think this is the problem here.
