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 On Wednesday, July 3, 2019 at 12:11:38 PM UTC+2, Raoul wrote: > > 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 > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/50c0890e-399e-475b-9c12-e49d2df992e7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
