# unable to create VM on esxi 7.0

**URL:** <https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [April 5, 2021, 12:00pm UTC](https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916 "2021-04-05T12:00:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bec12317](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@bec12317](https://forum.ansible.com/u/bec12317)\
**Post date:** [April 5, 2021, 12:00pm UTC](https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916/1 "2021-04-05T12:00:11Z")

</div>

I am creating a virtual machine using ansible. I received this error and do not know how to solve it. I am new student to both VMware and asnible. This is the error i received:

fatal: [localhost → localhost]: FAILED! =\> {“changed”: false, “msg”: “Unknown error while connecting to vCenter or ESXi API at vsecurity:443 : [Errno -3] Temporary failure in name resolution”}

Pleae your help is appreciated. I do not use a vcenter

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [April 5, 2021, 5:16pm UTC](https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916/2 "2021-04-05T17:16:02Z")

</div>

You’re connecting to a host called ‘vsecurity’, but that doesn’t resolve to something.  
At least not on the host you’re trying to run the playbook from.

---

<div class="post-metadata">

**Author:** ![bec12317](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@bec12317](https://forum.ansible.com/u/bec12317)\
**Post date:** [April 5, 2021, 5:53pm UTC](https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916/3 "2021-04-05T17:53:56Z")

</div>

Okay…thank you. I think now i am having a different error of certifiate.

fatal: [localhost → localhost]: FAILED! =\> {“changed”: false, “msg”: “Unable to connect to vCenter or ESXi API at [vsecurity.com](http://vsecurity.com) on TCP/443: [SSL: CERTIFICATE\_VERIFY\_FAILED] certificate verify failed: certificate has expired (\_ssl.c:1123)”}

I tried to secure copy the rui.crt from vmware esxi via ssh to the ansible control node but it fails all the time.

You’re connecting to a host called ‘vsecurity’, but that doesn’t resolve to something.  
At least not on the host you’re trying to run the playbook from.

---

<div class="post-metadata">

**Author:** ![jean-yves](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@jean-yves](https://forum.ansible.com/u/jean-yves)\
**Post date:** [April 5, 2021, 6:12pm UTC](https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916/4 "2021-04-05T18:12:21Z")

</div>

Hi,

Please explain which module you are using when asking questions !

So have a guess that you are using this one

[https://docs.ansible.com/ansible/2.8/modules/vmware\_guest\_module.html#vmware-guest-module](https://docs.ansible.com/ansible/2.8/modules/vmware_guest_module.html#vmware-guest-module)

So two options :

- ask to update the certificate with a trusted and not expired one

- use “validate\_certs” option

Regards,

JYL

---

<div class="post-metadata">

**Author:** ![bec12317](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@bec12317](https://forum.ansible.com/u/bec12317)\
**Post date:** [April 5, 2021, 7:43pm UTC](https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916/5 "2021-04-05T19:43:39Z")

</div>

Sure i will thanks. It is true, i am using the vmware\_guest module where i ommited the validate certificate.  
But now the problem has been with the dns.  
when I test the management network, the hostname resolves to the dns, yet i ahve errors.

fatal: [localhost → localhost]: FAILED! =\> {“changed”: false, “msg”: “Unknown error while connecting to vCenter or ESXi API at vsecurity.localdomain:443 : [Errno -2] Name or service not known”}

Below is my commands…the control node is installed on the esxi

I am sorry to have been asking many questions.

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [April 5, 2021, 9:06pm UTC](https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916/6 "2021-04-05T21:06:00Z")

</div>

Well this still is a resolution error, so that needs to be fixed.  
Either way it’s not an ansible problem.

---

<div class="post-metadata">

**Author:** ![bec12317](https://avatars.discourse-cdn.com/v4/letter/b/a88e57/32.png) [@bec12317](https://forum.ansible.com/u/bec12317)\
**Post date:** [April 6, 2021, 8:29am UTC](https://forum.ansible.com/t/unable-to-create-vm-on-esxi-7-0/34916/7 "2021-04-06T08:29:14Z")

</div>

Thank you very much Jean for all the help so far…

Regards

Well this still is a resolution error, so that needs to be fixed.  
Either way it’s not an ansible problem.
