# Getting error while creating VM using VMWare templates

**URL:** <https://forum.ansible.com/t/getting-error-while-creating-vm-using-vmware-templates/22612>\
**Category:** Ansible Developer\
**Tags:** vmware\
**Created:** [September 22, 2016, 3:38am UTC](https://forum.ansible.com/t/getting-error-while-creating-vm-using-vmware-templates/22612 "2016-09-22T03:38:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yogesh\_joshi](https://avatars.discourse-cdn.com/v4/letter/y/bcef8e/32.png) [@yogesh\_joshi](https://forum.ansible.com/u/yogesh_joshi)\
**Post date:** [September 22, 2016, 3:38am UTC](https://forum.ansible.com/t/getting-error-while-creating-vm-using-vmware-templates/22612/1 "2016-09-22T03:38:07Z")

</div>

Hello,

I am new to ansible. I want to create VMs from VM template, I am not sure what should be the template format?  
is it the one we directly mark VM as convert to template and then use that as template\_src in playbook? or the OVF template?  
I have used the converted template in playbook, since we use our domain accounts to login to VC using that for connecting to  
VC. I am getting below error when I executing playbook:

fatal: [localhost]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “Could not clone selected machine: [Task Error]: The operation is not supported on the object.”}

Let me know where I can share my playbook? or I am missing anything here?

Thanks,  
Yogesh

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [October 1, 2016, 3:51pm UTC](https://forum.ansible.com/t/getting-error-while-creating-vm-using-vmware-templates/22612/2 "2016-10-01T15:51:29Z")

</div>

Hi Yogesh, you might want to go ahead and open an issue on Github (just make sure you open it on ansible-modules-core or ansible-modules-extras, depending on which module is having problems). Sharing your playbook there would be best.

Thanks!

---

<div class="post-metadata">

**Author:** ![ANKUR\_SHARMA](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@ANKUR\_SHARMA](https://forum.ansible.com/u/ANKUR_SHARMA)\
**Post date:** [November 23, 2016, 12:05pm UTC](https://forum.ansible.com/t/getting-error-while-creating-vm-using-vmware-templates/22612/3 "2016-11-23T12:05:29Z")

</div>

Hello Yogesh,

I am also getting the same error. Did you get the resolution of yours ?  
Below is my playbook snippet

```auto
tasks:
  - name: Deploy an instance
    vsphere_guest:
        vcenter_hostname: 10.171.52.38
        username: testuser
        password: test
        guest: newvm001
        from_template: yes
        template_src: Ubuntu 14.04
        power_on_after_clone: No
        resource_pool: "/Resources"
        validate_certs: no

```

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jc1](https://avatars.discourse-cdn.com/v4/letter/j/6f9a4e/32.png) [@jc1](https://forum.ansible.com/u/jc1)\
**Post date:** [November 28, 2016, 11:47pm UTC](https://forum.ansible.com/t/getting-error-while-creating-vm-using-vmware-templates/22612/4 "2016-11-28T23:47:51Z")

</div>

In case it helps with anyone else who researched/googled this - I was able to reproduce the message when running directly from my laptop but in my case, the VM deployed successfully. It worked fine for me via a fresh vagrant ubuntu 14.04. Both are ansible 2.2.0.0 and pysphere 1.7 installed via pip. Here’s the playbook:
