# vsphere\_guest module doesn't receve datastore value

**URL:** <https://forum.ansible.com/t/vsphere-guest-module-doesnt-receve-datastore-value/26505>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [January 17, 2018, 7:04pm UTC](https://forum.ansible.com/t/vsphere-guest-module-doesnt-receve-datastore-value/26505 "2018-01-17T19:04:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arkanon](https://avatars.discourse-cdn.com/v4/letter/a/c89c15/32.png) [@Arkanon](https://forum.ansible.com/u/Arkanon)\
**Post date:** [January 17, 2018, 7:04pm UTC](https://forum.ansible.com/t/vsphere-guest-module-doesnt-receve-datastore-value/26505/1 "2018-01-17T19:04:53Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![Sebastien\_Desbois](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@Sebastien\_Desbois](https://forum.ansible.com/u/Sebastien_Desbois)\
**Post date:** [January 22, 2018, 1:59pm UTC](https://forum.ansible.com/t/vsphere-guest-module-doesnt-receve-datastore-value/26505/2 "2018-01-22T13:59:47Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [January 23, 2018, 8:16am UTC](https://forum.ansible.com/t/vsphere-guest-module-doesnt-receve-datastore-value/26505/3 "2018-01-23T08:16:56Z")

</div>

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
