# vmware\_guest module error: Failed to find a matching datastore

**URL:** <https://forum.ansible.com/t/vmware-guest-module-error-failed-to-find-a-matching-datastore/23613>\
**Category:** Ansible Project\
**Created:** [February 1, 2017, 9:08pm UTC](https://forum.ansible.com/t/vmware-guest-module-error-failed-to-find-a-matching-datastore/23613 "2017-02-01T21:08:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DSS](https://avatars.discourse-cdn.com/v4/letter/d/ac8455/32.png) [@DSS](https://forum.ansible.com/u/DSS)\
**Post date:** [February 1, 2017, 9:08pm UTC](https://forum.ansible.com/t/vmware-guest-module-error-failed-to-find-a-matching-datastore/23613/1 "2017-02-01T21:08:52Z")

</div>

Hello,

I am testing the vmware\_guest module to snapshot a VM but it returns an error message with any invocation of module. According to the documentation ([https://docs.ansible.com/ansible/vmware\_guest\_module.html](https://docs.ansible.com/ansible/vmware_guest_module.html)), i’m using ansible development version (ansible 2.3.0 (devel 86db15b105)) and the required parameters of module for vcenter connection.

The error message is “msg”: “Failed to find a matching datastore”

Removing the snapshot part and testing with ansible 2.2, the error is diferent: KeyError: ‘template’

The task involved:

- vmware\_guest:  
validate\_certs: False  
hostname: “{{ vcenter.ip }}”  
username: “{{ vcenter.username }}”  
password: “{{ vcenter.password }}”  
datacenter: “{{ vcenter.datacenter }}”  
name: “{{ vm2snap | upper }}”  
state: poweredoff  
#snapshot\_op:

# op\_type: create

# name: snap\_osp

# description: {{ vm2snap }} snapshot.
