vsphere_guest module doesn't receve datastore value

Hello.

I want to deploy a VMWare Linux VM from a template and then customize IP and hostname.

With vmware_guest module the deploy where finished, but I couldn’t set IP/hostname. So I changed to vsphere_guest module to give a try.
However, with vsphere module the deploy process doesn’t even finish. The message received is:

“Could not clone selected machine: [Task Error]: Insufficient disk space on datastore ‘’.”

Apparently datastore has no value, but it was set, accordingly with documentation in <http://docs.ansible.com/ansible/latest/vsphere_guest_module.html#examples>

Details:

$ ansible-playbook --version
ansible-playbook 2.5.0
config file = /etc/ansible/ansible.cfg
configured module search path = [u’HOME/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/lib/python2.7/dist-packages/ansible
executable location = /usr/bin/ansible-playbook
python version = 2.7.14+ (default, Dec 5 2017, 15:17:02) [GCC 7.2.1 20171205]

$ cat vmware.yml

Hello,

When deploying from a template, this parameter will no be used.
Your VM will be deployed in the same datastore as the template.
This deployment is just a clone that will take by default all the parameters CPU / RAM / Disks of the template.

For my part, since I like complicated things, after the deployement, Ansible is launching a powercli script that will place the VM in a datastore based on categories and available space.
(The whole VM, not just the disk, in order not to have the vmx and log files in a datastore and the disk in another datastore)

I use vmware_guest to clone vms and it works fine. However I recall having problems with using VMXNET3 and wound up switching to e1000e. I think this is because VMXNET3 depends on vmware tools and so isn’t available during the early boot up process (I could be wrong about why, but I definitely could not get ip assigned when using VMXNET3) - things may be different for you - I most clone windows vms, but worth experimenting with available network adaptors.

Hope this helps,

Jon