# AWX VMware inventory fails

**URL:** <https://forum.ansible.com/t/awx-vmware-inventory-fails/28027>\
**Category:** AWX Project\
**Tags:** vmware, awx\
**Created:** [July 11, 2018, 1:15pm UTC](https://forum.ansible.com/t/awx-vmware-inventory-fails/28027 "2018-07-11T13:15:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyioulos](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dyioulos/32/8363_2.png) [@dyioulos](https://forum.ansible.com/u/dyioulos)\
**Post date:** [July 11, 2018, 1:15pm UTC](https://forum.ansible.com/t/awx-vmware-inventory-fails/28027/1 "2018-07-11T13:15:19Z")

</div>

Good day, all.

By degrees, I’ve gotten AWX stood up and running. I’ve also added some test hosts to inventory, added playbooks, and created and successfully run a couple of projects. Here’s some info on my setup:

- CentOS 7 standalone host
- AWX installed from RPM (awx-1.0.6.23-1.el7.x86\_64)
- Any requisite dependencies installed

We have both a VMware 6.0 environment and a Spacewalk 2.8 (Satellite equivalent) server. Despite following various how-to’s, I’ve not been able to make either inventory type work. Setting aside Satellite, here is the output I get when I try to sync AWX to VMware:

1.790 INFO Updating inventory 5: Vcenter10  
1.801 INFO Reading Ansible inventory source: /opt/awx/embedded/lib/python2.7/site-packages/awx/plugins/inventory/vmware\_inventory.py  
Traceback (most recent call last):  
File “/opt/awx/bin/awx-manage”, line 11, in   
sys.exit(manage())  
File “/opt/awx/embedded/lib/python2.7/site-packages/awx/ **init**.py”, line 109, in manage  
execute\_from\_command\_line(sys.argv)  
File “/opt/awx/embedded/lib64/python2.7/site-packages/django/core/management/ **init**.py”, line 364, in execute\_from\_command\_line  
utility.execute()  
File “/opt/awx/embedded/lib64/python2.7/site-packages/django/core/management/ **init**.py”, line 356, in execute  
self.fetch\_command(subcommand).run\_from\_argv(self.argv)  
File “/opt/awx/embedded/lib64/python2.7/site-packages/django/core/management/base.py”, line 283, in run\_from\_argv  
self.execute(\*args, \*\*cmd\_options)  
File “/opt/awx/embedded/lib64/python2.7/site-packages/django/core/management/base.py”, line 330, in execute  
output = self.handle(\*args, \*\*options)  
File “/opt/awx/embedded/lib/python2.7/site-packages/awx/main/management/commands/inventory\_import.py”, line 990, in handle  
self.is\_custom)  
File “/opt/awx/embedded/lib/python2.7/site-packages/awx/main/management/commands/inventory\_import.py”, line 241, in load\_inventory\_source  
is\_custom=is\_custom).load()  
File “/opt/awx/embedded/lib/python2.7/site-packages/awx/main/management/commands/inventory\_import.py”, line 176, in load  
data = self.command\_to\_json(base\_args + [‘–list’])  
File “/opt/awx/embedded/lib/python2.7/site-packages/awx/main/management/commands/inventory\_import.py”, line 159, in command\_to\_json  
self.method, proc.returncode, stdout, stderr))  
RuntimeError: ansible-inventory failed (rc=1) with stdout:  
stderr:  
[WARNING]: \* Failed to parse /opt/awx/embedded/lib/python2.7/site-  
packages/awx/plugins/inventory/vmware\_inventory.py with script plugin:  
Inventory script (/opt/awx/embedded/lib/python2.7/site-  
packages/awx/plugins/inventory/vmware\_inventory.py) had an execution error:  
Unable to connect to ESXi server due to [Errno -2] Name or service not known  
[WARNING]: Unable to parse /opt/awx/embedded/lib/python2.7/site-  
packages/awx/plugins/inventory/vmware\_inventory.py as an inventory source  
ERROR! No inventory was parsed, please check your configuration and options.

To the best of my knowledge, my “configuration and options” are correct. Well, apparently not. I’m not sure what other information I can provide, but I’m happy to do so. Your help in solving this issue would be greatly appreciated.

Thanks.

Dimitri

---

<div class="post-metadata">

**Author:** ![Oscar\_Romero](https://avatars.discourse-cdn.com/v4/letter/o/bb73d2/32.png) [@Oscar\_Romero](https://forum.ansible.com/u/Oscar_Romero)\
**Post date:** [October 5, 2018, 9:58pm UTC](https://forum.ansible.com/t/awx-vmware-inventory-fails/28027/2 "2018-10-05T21:58:35Z")

</div>

hi, Im facing this same issue, were you able to solve it by any chance?

---

<div class="post-metadata">

**Author:** ![Petter\_Fors](https://avatars.discourse-cdn.com/v4/letter/p/eb8c5e/32.png) [@Petter\_Fors](https://forum.ansible.com/u/Petter_Fors)\
**Post date:** [October 18, 2018, 11:56am UTC](https://forum.ansible.com/t/awx-vmware-inventory-fails/28027/3 "2018-10-18T11:56:14Z")

</div>

Hello, Im facing the same problem. when I am traying to add Inventrory Sources from VCenter sever. version 6.5

---

<div class="post-metadata">

**Author:** ![John\_Foley](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@John\_Foley](https://forum.ansible.com/u/John_Foley)\
**Post date:** [October 18, 2018, 2:13pm UTC](https://forum.ansible.com/t/awx-vmware-inventory-fails/28027/4 "2018-10-18T14:13:45Z")

</div>

I can reproduce this if I enter in a totally erroneous vCenter hostname in the credential used for the inventory. Are you 100% sure that your AWX server can resolve that hostname?
