# VMware Inventory - hostname contains VM name + UUID

**URL:** <https://forum.ansible.com/t/vmware-inventory-hostname-contains-vm-name-uuid/30565>\
**Category:** AWX Project\
**Tags:** vmware, awx\
**Created:** [June 13, 2019, 3:29pm UTC](https://forum.ansible.com/t/vmware-inventory-hostname-contains-vm-name-uuid/30565 "2019-06-13T15:29:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam2](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@Sam2](https://forum.ansible.com/u/Sam2)\
**Post date:** [June 13, 2019, 3:29pm UTC](https://forum.ansible.com/t/vmware-inventory-hostname-contains-vm-name-uuid/30565/1 "2019-06-13T15:29:32Z")

</div>

Hi everyone,

I am using AWX vCenter plugin to get list of hosts in vCenter, and I am facing two issues:  
1- it takes like 7 hours to complete the Sync  
2- The hostname is: VM NAME + UUID and it is not flying for me because it is almost impossible to predict what UUID can be so I have always to define the hosts with \* in the playbook: vm\_hostname\*

In addition I can’t use Keberos directly to connect to the VM because the name of the host in inventory doesn’t match FQDN.

Can I change the naming convention for hosts in vCenter inventory so it contains only the VM name only ?

If anyone can give me a hint about the speed also, so it will be great 🙂

Thanks  
Samer

---

<div class="post-metadata">

**Author:** ![Garrett\_Kelly](https://avatars.discourse-cdn.com/v4/letter/g/cab0a1/32.png) [@Garrett\_Kelly](https://forum.ansible.com/u/Garrett_Kelly)\
**Post date:** [June 17, 2019, 2:59pm UTC](https://forum.ansible.com/t/vmware-inventory-hostname-contains-vm-name-uuid/30565/2 "2019-06-17T14:59:52Z")

</div>

Hey Samer,

Not sure about why your jobs are taking so long to sync so I can’t help there. As far as your second question goes though, u will want to update your VMware source sync job to have a source variable with something like

alias\_pattern: “{{ config.name }}”

Also, because I only care about the Linux environment, and the servers that are powered on in VMware, I added some host filters

host\_filters: “{{ guest.guestfamily == ‘linuxGuest’ and runtime.powerstate == ‘poweredOn’}}”

> **(attachments)**
>
> ![vmware source.png](https://us1.discourse-cdn.com/ansible/original/2X/a/aaa176a8c9dd9500330f46b98a4c753f031b8c9d.png)
