# vmware\_guest and MAC problem on template clone

**URL:** <https://forum.ansible.com/t/vmware-guest-and-mac-problem-on-template-clone/31689>\
**Category:** AWX Project\
**Tags:** vmware\
**Created:** [November 20, 2019, 11:04am UTC](https://forum.ansible.com/t/vmware-guest-and-mac-problem-on-template-clone/31689 "2019-11-20T11:04:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Nanboe](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@Daniel\_Nanboe](https://forum.ansible.com/u/Daniel_Nanboe)\
**Post date:** [November 20, 2019, 11:04am UTC](https://forum.ansible.com/t/vmware-guest-and-mac-problem-on-template-clone/31689/1 "2019-11-20T11:04:54Z")

</div>

Hi,  
I am cloning a template in vmware to create a new VM. The script works but when I create an other VM the new one gets created with the same MAC address for the network card. Is there a way form vmware\_guest to force a new mac address or a random one without writing it by hand in the playbook?

Thanks,  
daniel

---

<div class="post-metadata">

**Author:** ![mpunix](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@mpunix](https://forum.ansible.com/u/mpunix)\
**Post date:** [November 20, 2019, 11:59am UTC](https://forum.ansible.com/t/vmware-guest-and-mac-problem-on-template-clone/31689/2 "2019-11-20T11:59:05Z")

</div>

Hi,

I removed the network card in the template and when i deploy a new VM, add the networks parameters (name, type, ip,network,gateway) in the vmware\_guest module. In this case, it adds a new interface with unique mac address. You may try this method.

Hope it helps.

---

<div class="post-metadata">

**Author:** ![Daniel\_Nanboe](https://avatars.discourse-cdn.com/v4/letter/d/9d8465/32.png) [@Daniel\_Nanboe](https://forum.ansible.com/u/Daniel_Nanboe)\
**Post date:** [November 20, 2019, 7:23pm UTC](https://forum.ansible.com/t/vmware-guest-and-mac-problem-on-template-clone/31689/3 "2019-11-20T19:23:11Z")

</div>

Thanks for the suggestion! I will try it.

I have for the moment also another solution I generate a random mac address.

```auto
networks:
   - name: '{{ network_name }}'
     type: dhcp
     mac: "{{ '00:50:56' | random_mac }}"

```
