# ansible vmware\_guest failed to find a matching datastore

**URL:** <https://forum.ansible.com/t/ansible-vmware-guest-failed-to-find-a-matching-datastore/25628>\
**Category:** Ansible Project\
**Created:** [September 28, 2017, 7:06pm UTC](https://forum.ansible.com/t/ansible-vmware-guest-failed-to-find-a-matching-datastore/25628 "2017-09-28T19:06:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor1](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@Victor1](https://forum.ansible.com/u/Victor1)\
**Post date:** [September 28, 2017, 7:06pm UTC](https://forum.ansible.com/t/ansible-vmware-guest-failed-to-find-a-matching-datastore/25628/1 "2017-09-28T19:06:00Z")

</div>

Hi ,

I have upgraded to ansible 2.4 and using vmware\_guest module to create a VM. I am getting “Failed to find a matching datastore”.  
same code works fine in ansiblke 2.3.

is this a known issue or am i missing something?

Thanks,  
Vijay

msg": “Failed to find a matching datastore”

Here is my ansible snippet:

**- name: Create a virtual machine from the datastore VM ( Using vGPU VM)**  
**local\_action:**  
**module: vmware\_guest**  
**hostname: ‘{{ hostname }}’**  
**username: ‘{{ username }}’**  
**password: ‘{{ password }}’**  
**name: ‘{{ guest\_name}}’**  
**esxi\_hostname: ‘{{ esxi\_hostname1 }}’**  
**# template: ‘’**  
**is\_template: no**  
**datacenter: ‘{{ datacenter\_name }}’**  
**state: poweredon**  
**validate\_certs: False**  
**register: taskresult**  
**ignore\_errors: True**

when i run with -vvvv option i see following parameters are passed:

**fatal: [xxxxxxxx → localhost]: FAILED! =\> {**  
**“changed”: false,**  
**“failed”: true,**  
**“invocation”: {**  
**“module\_args”: {**  
**“annotation”: null,**  
**“cluster”: null,**  
**“customization”: {},**  
**“customvalues”: [],**  
**“datacenter”: “Datacenter”,**  
**“disk”: [],**  
**“esxi\_hostname”: “10…x.x.x”,**  
**“folder”: “/vm”,**  
**“force”: false,**  
**“guest\_id”: null,**  
**“hardware”: {},**  
**“hostname”: “10.x.x.x”,**  
**“is\_template”: false,**  
**“name”: “myvgpu\_clone2”,**  
**“name\_match”: “first”,**  
**“networks”: [],**  
**“password”: “VALUE\_SPECIFIED\_IN\_NO\_LOG\_PARAMETER”,**  
**“resource\_pool”: null,**  
**“state”: “poweredon”,**  
**“template\_src”: null,**  
**“username”: “administrator@vsphere.local”,**  
**“uuid”: null,**  
**“validate\_certs”: false,**  
**“wait\_for\_ip\_address”: false**  
**}**  
**},**  
**“msg”: “Failed to find a matching datastore”**  
**}**  
**…ignoring**

I would appreciate your help if someone could please help me in resolving this issue.

---

<div class="post-metadata">

**Author:** ![David\_Baumann](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@David\_Baumann](https://forum.ansible.com/u/David_Baumann)\
**Post date:** [February 7, 2018, 11:39am UTC](https://forum.ansible.com/t/ansible-vmware-guest-failed-to-find-a-matching-datastore/25628/2 "2018-02-07T11:39:22Z")

</div>

Got the same Problem on 2.4.3, you found a solution ?
