# vmware issue

**URL:** <https://forum.ansible.com/t/vmware-issue/35633>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [August 17, 2021, 8:09pm UTC](https://forum.ansible.com/t/vmware-issue/35633 "2021-08-17T20:09:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rene\_Paquin](https://avatars.discourse-cdn.com/v4/letter/r/e9a140/32.png) [@Rene\_Paquin](https://forum.ansible.com/u/Rene_Paquin)\
**Post date:** [August 17, 2021, 8:09pm UTC](https://forum.ansible.com/t/vmware-issue/35633/1 "2021-08-17T20:09:45Z")

</div>

I am having an issue deploying servers from templates using ansible with the vmware\_guest module. Below is the playbook. I get the following error regardless of what I configure for datastores, esxi host etc. I am currently running the latest version

},

“msg”: “Network interface ‘Network adapter 1’ uses network ‘DVSwitch: c5 de 2d 50 8f fe 22 dd-fd dc 6a 6b 5f 9c 97 73’, which is not accessible.”

}

I can deploy a server from template via the vcenter console so this appears to be an ansible issue? Any ideas?

Thanks

- hosts: localhost

gather\_facts: no

vars\_files:

- group\_vars/vars

- group\_vars/vars\_sec

tasks:

- name: Clone the template

vmware\_guest:

hostname: “{{ vcenter\_server }}”

username: “{{ vcenter\_user }}”

password: “{{ vcenter\_pass }}”

validate\_certs: False

name: “{{ name }}”

template: “{{ template }}”

datacenter: “{{ datacenter\_name }}”

folder: “{{ folder }}”

esxi\_hostname: “{{ esxi\_hostname }}”

state: poweredon

wait\_for\_ip\_address: yes

delegate\_to: localhost

---

<div class="post-metadata">

**Author:** ![Roberto\_J\_R\_Paz](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@Roberto\_J\_R\_Paz](https://forum.ansible.com/u/Roberto_J_R_Paz)\
**Post date:** [August 18, 2021, 2:12am UTC](https://forum.ansible.com/t/vmware-issue/35633/2 "2021-08-18T02:12:49Z")

</div>

The template has a defined network interface? If that’s the case, try to remote the network interface to the template.

**vmware\_guest** module is able to add network interfaces if required. Just provide the rigth VLAN according to naming convention used in vmware cluster.
