# vmdk already exists error

**URL:** <https://forum.ansible.com/t/vmdk-already-exists-error/30705>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [July 3, 2019, 10:11am UTC](https://forum.ansible.com/t/vmdk-already-exists-error/30705 "2019-07-03T10:11:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raoul](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@Raoul](https://forum.ansible.com/u/Raoul)\
**Post date:** [July 3, 2019, 10:11am UTC](https://forum.ansible.com/t/vmdk-already-exists-error/30705/1 "2019-07-03T10:11:38Z")

</div>

Hi,

I am currently trying to deploy new VM’s from an existing template, but I do receive an error on every try:

> Failed to create a virtual machine : Cannot complete the operation because the file or folder [LAB-GRPDC1-cluster1-vmware-vol02] **/**.vmdk already exists

My current task which I am using looks like the following:

`

- name: Create VPS

vmware\_guest:

hostname: “{{ lookup(‘env’, ‘VMWARE\_HOST’) }}”

username: “{{ lookup(‘env’, ‘VMWARE\_USER’) }}”

password: “{{ lookup(‘env’, ‘VMWARE\_PASSWORD’) }}”

validate\_certs: False

name: “{{ guest\_hostname }}”

template: TMPL-CENTOS7

guest\_id: rhel7\_64Guest

datacenter: site-1

folder: /Test

state: poweredon

cluster: cluster-1

disk:

- size\_gb: “{{ guest\_disk\_size }}”

type: thin

autoselect\_datastore: True

networks:

- name: dv1-3300-management

ip: “{{ guest\_ip\_address }}”

netmask: “{{ guest\_netmask }}”

gateway: “{{ guest\_gateway }}”

hardware:

memory\_mb: “{{ guest\_memory \* 1024 }}”

num\_cpus: “{{ guest\_vcpu }}”

hotadd\_cpu: True

hotremove\_cpu: True

hotadd\_memory: True

customization:

hostname: “{{ guest\_hostname }}”

wait\_for\_customization: True

wait\_for\_ip\_address: True

delegate\_to: localhost

register: deploy\_result

`

I meanwhile did play with the autoselect\_datastore option, which did not change anything. Before I used to fill into datastore option my cluster which created the same error.

Does somebody hava an idea what’s going wrong?

Thanks,  
Raoul

---

<div class="post-metadata">

**Author:** ![Raoul](https://avatars.discourse-cdn.com/v4/letter/r/2acd7d/32.png) [@Raoul](https://forum.ansible.com/u/Raoul)\
**Post date:** [July 3, 2019, 2:53pm UTC](https://forum.ansible.com/t/vmdk-already-exists-error/30705/2 "2019-07-03T14:53:32Z")

</div>

I have found an open issue on Github describing the problem. When setting the same disk size as the template has, everything works fine.

See issue: [https://github.com/ansible/ansible/issues/55551](https://github.com/ansible/ansible/issues/55551)
