Module :
vmware_guest
Error :
"msg": "Failed to create a virtual machine : Cannot complete customization."
Ansible Version :
ansible 2.9.10
Playbook :
---
- hosts: localhost
gather_facts: false
connection: local
vars_files:
- ./vars/xxx.yml
tasks:
- name: create vm using template
vmware_guest:
hostname: "{{ vcenter_server }}"
username: "{{ vcenter_user }}"
password: "{{ vcenter_pass }}"
datacenter: "{{ vcenter_datacenter }}"
cluster: "{{ vcenter_cluster }}"
template: "{{ vcenter_template }}"
validate_certs: no
name: "{{ item }}"
folder: /xxx
state: poweredon
wait_for_ip_address: true
disk:
- size_gb: 80
type: thin
datastore: xxx
hardware:
memory_mb: 8192
num_cpus: 4
num_cpu_cores_per_socket: 4
scsi: paravirtual
networks:
- name: xxx
start_connected: true
customization:
domain: xxx
dns_servers: xx
dns_suffix: xxx
joindomain: xxx
autologon: true
domainadmin: "xx"
domainadminpassword: "xx"
hostname: "{{ item }}"
with_items: "{{ servers }}"
Issue :
VM is created but is power-off & is not joined to domain ..basically failed custimization
-vvvv does not show much
Manually if done ie from vCenter UI, works as expected