# Internal error in vmware\_guest (required and default are mutually exclusive for datacenter)

**URL:** <https://forum.ansible.com/t/internal-error-in-vmware-guest-required-and-default-are-mutually-exclusive-for-datacenter/23716>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [February 13, 2017, 2:21am UTC](https://forum.ansible.com/t/internal-error-in-vmware-guest-required-and-default-are-mutually-exclusive-for-datacenter/23716 "2017-02-13T02:21:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Takeshi\_Kuramochi](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@Takeshi\_Kuramochi](https://forum.ansible.com/u/Takeshi_Kuramochi)\
**Post date:** [February 13, 2017, 2:21am UTC](https://forum.ansible.com/t/internal-error-in-vmware-guest-required-and-default-are-mutually-exclusive-for-datacenter/23716/1 "2017-02-13T02:21:33Z")

</div>

Hi all,

I use ansible v2.3.

when I tried to create from vm template by using vmware\_guest module,  
I saw an internal error below;

PLAYBOOK: vm.yml

---

<div class="post-metadata">

**Author:** ![daniel.park](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@daniel.park](https://forum.ansible.com/u/daniel.park)\
**Post date:** [February 13, 2017, 1:31pm UTC](https://forum.ansible.com/t/internal-error-in-vmware-guest-required-and-default-are-mutually-exclusive-for-datacenter/23716/2 "2017-02-13T13:31:01Z")

</div>

[https://github.com/ansible/ansible/commit/239c6aee35f3abcd52abf2c6497b75356002dd14](https://github.com/ansible/ansible/commit/239c6aee35f3abcd52abf2c6497b75356002dd14)

> These changes appear to have broken the ability to deploy via this module. I am getting the following error after this commit:
> 
> fatal: [vm01]: FAILED! =\> {“changed”: false, “failed”: true, “msg”: “Module alias error: internal error: required and default are mutually exclusive for datacenter”}
> 
> Backing out this change has restored functionality.

> Hi all,
> 
> I use ansible v2.3.
> 
> when I tried to create from vm template by using vmware\_guest module,  
> I saw an internal error below;
> 
> PLAYBOOK: vm.yml
> 
> * * *
> 
> 1 plays in vm.yml
> 
> PLAY [localhost]
> 
> * * *
> 
> META: ran handlers
> 
> TASK [create the VM]
> 
> * * *
> 
> task path: /home/vagrant/vmware\_deploy/vm.yml:9  
> Using module file  
> /usr/local/ansible/lib/ansible/modules/cloud/vmware/vmware\_guest.py  
> ESTABLISH LOCAL CONNECTION FOR USER: vagrant  
> EXEC /bin/sh -c ‘echo ~ && sleep 0’  
> EXEC /bin/sh -c ‘( umask 77 && mkdir -p “`echo /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301`” && echo ansible-tmp-1486952035.63-258723752885301=“`echo /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301`” ) && sleep 0’  
> PUT /tmp/tmpFVfBUg TO  
> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/vmware\_guest.py  
> EXEC /bin/sh -c ‘chmod u+x  
> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/  
> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/vmware\_guest.py  
> && sleep 0’  
> EXEC /bin/sh -c 'sudo -H -S -n -u root /bin/sh -c  
> ‘"’"'echo BECOME-SUCCESS-ixxjesnouwewkoeaywbpuqolwknoptby;  
> /usr/bin/python  
> /home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/vmware\_guest.py;  
> rm -rf “/home/vagrant/.ansible/tmp/ansible-tmp-1486952035.63-258723752885301/”
> 
> > /dev/null 2\>&1’“'”’ && sleep 0’  
> > fatal: [localhost]: FAILED! =\> {  
> > “changed”: false,  
> > “failed”: true,  
> > “msg”: “Module alias error: internal error: required and default  
> > are mutually exclusive for datacenter”  
> > }  
> > to retry, use: --limit @/home/vagrant/vmware\_deploy/vm.retry
> 
> PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
> localhost : ok=0 changed=0 unreachable=0 failed=1
> 
> How should I solve this please?
> 
> My playbook;
> 
> - hosts: localhost  
> connection: local  
> become: true  
> become\_user: root  
> gather\_facts: no
> 
> tasks:
> 
> # Create a VM from a template
> 
> - name: create the VM  
> vmware\_guest:  
> hostname: 192.168.0.11  
> username: root  
> password: vmware  
> validate\_certs: no  
> esxi\_hostname: 192.168.0.12  
> datacenter: “TK”  
> folder: MyMachines  
> name: testvm\_cent7\_001  
> state: poweredon  
> guest\_id: centos64guest  
> disk:
> - size\_gb: 10  
> type: thin  
> datastore: SSD-250  
> hardware:  
> memory\_mb: 1024  
> num\_cpus: 2  
> scsi: paravirtual  
> networks:
> - name: VM Network  
> ip: 192.168.0.25  
> netmask: 255.255.255.0  
> mac: ‘aa:bb:dd:aa:00:14’  
> template: “temp\_centos7”  
> wait\_for\_ip\_address: yes
> 
> Best Regards,
> 
> Tk

This e-mail is for the sole attention of the identified addressee(s). Access to this email by anyone else is unauthorised. The contents of this e-mail and any attachments are confidential and for informational purposes only and may be subject to legal privilege. If you are not the intended recipient or have received this e-mail in error, you must not copy, distribute, publish, rely on or otherwise use it without the sender’s consent.

Please delete this e-mail and any attachments immediately (without retaining any copies), notifying the sender by return e-mail. The sender makes no warranty or representation as to the accuracy and completeness of any information contained in this e-mail or attachments and does not accept liability for any errors or omissions.

This e-mail has originated from a member of the Hertshten Group Limited group of companies.

---

<div class="post-metadata">

**Author:** ![Takeshi\_Kuramochi](https://avatars.discourse-cdn.com/v4/letter/t/e8c25b/32.png) [@Takeshi\_Kuramochi](https://forum.ansible.com/u/Takeshi_Kuramochi)\
**Post date:** [February 13, 2017, 2:50pm UTC](https://forum.ansible.com/t/internal-error-in-vmware-guest-required-and-default-are-mutually-exclusive-for-datacenter/23716/3 "2017-02-13T14:50:20Z")

</div>

Hello daniel,  
Thank you.

I checked that comment.

Tk,
