# vmware\_guest - Nested datacenter issue

**URL:** <https://forum.ansible.com/t/vmware-guest-nested-datacenter-issue/25293>\
**Category:** Ansible Project\
**Created:** [August 18, 2017, 9:02pm UTC](https://forum.ansible.com/t/vmware-guest-nested-datacenter-issue/25293 "2017-08-18T21:02:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BG\_Sony](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@BG\_Sony](https://forum.ansible.com/u/BG_Sony)\
**Post date:** [August 18, 2017, 9:02pm UTC](https://forum.ansible.com/t/vmware-guest-nested-datacenter-issue/25293/1 "2017-08-18T21:02:41Z")

</div>

Hello. I am unable to deploy from template when the datacenter is inside a folder. I am getting the error “msg”: “No folder matched the path: /Chicago Data Center/datacenter1/app”

i.e. /Folder/datacenter/folder  
/Chicago Data Center/datacenter1/app

The path to the app folder via govc looks like this: /Chicago Data Center/datacenter1/vm/app

The under VMs and Templates look like this.

- vCenter
- Chicago Data Center/
- datacenter

- app

I have tried both **ansible 2.3 and 2.4.**

tasks:

- name: create the VM  
vmware\_guest:  
hostname: “{{ vsphere\_hostname }}”  
username: “{{ username | quote }}”  
password: “{{ esxi\_pass }}”  
validate\_certs: no  
esxi\_hostname: “{{ esxi\_hostname }}”  
datacenter: “{{ esxi\_datacenter }}”  
name: “{{ item.key }}”  
state: poweredon  
guest\_id: “{{ item.value.guest\_id }}”  
template: “{{ item.value.template }}”  
disk:
- size\_gb: 20  
type: thin  
datastore: “{{ esxi\_datastore }}”  
hardware:  
memory\_mb: “{{ item.value.memory\_mb }}”  
num\_cpus: “{{ item.value.num\_cpus }}”  
scsi: lsilogic  
networks:
- name: “{{ item.value.networks\_name }}”  
ip: “{{ item.value.ip }}”  
netmask: “{{ item.value.netmask }}”  
gateway: “{{ item.value.gateway }}”

With out the datacenter being nested I can deploy VMs with and without specifying the folder. Any help would be appreciated.
