# Clone a vm from Template

**URL:** <https://forum.ansible.com/t/clone-a-vm-from-template/20883>\
**Category:** Ansible Project\
**Created:** [March 16, 2016, 9:09am UTC](https://forum.ansible.com/t/clone-a-vm-from-template/20883 "2016-03-16T09:09:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Budur\_Nagaraju](https://avatars.discourse-cdn.com/v4/letter/b/71e660/32.png) [@Budur\_Nagaraju](https://forum.ansible.com/u/Budur_Nagaraju)\
**Post date:** [March 16, 2016, 9:09am UTC](https://forum.ansible.com/t/clone-a-vm-from-template/20883/1 "2016-03-16T09:09:28Z")

</div>

HI

I have a Ansible play book below is the one ,when I execute the script its not allowing as cluster name is not mentioned in the playbook,  
is it mandatory that cluster is required ? to ignore what can I do ?

- hosts: 127.0.0.1  
gather\_facts: false  
connection: local  
user: remote  
sudo: true  
tasks:
- vsphere\_guest:  
vcenter\_hostname: testvc  
username: admin  
password: pass  
guest: newvm1  
from\_template: yes  
template\_src: Template-xp  
resource\_pool: “/Testing-vms”  
vm\_disk:  
disk1:  
size\_gb: “{{ 10 }}”  
type: thin  
datastore: Storage1 (11)  
vm\_nic:  
nic1:  
type: vmxnet3  
network: VM Network  
network\_type: standard  
vm\_hardware:  
memory\_mb: 2048  
num\_cpus: 2  
osid: centos64Guest  
scsi: paravirtual  
esxi:  
datacenter: test  
hostname: test
