# How do I change a vmware VM network after deployment.

**URL:** <https://forum.ansible.com/t/how-do-i-change-a-vmware-vm-network-after-deployment/22656>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [September 27, 2016, 9:09pm UTC](https://forum.ansible.com/t/how-do-i-change-a-vmware-vm-network-after-deployment/22656 "2016-09-27T21:09:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Schlottman](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mike\_Schlottman](https://forum.ansible.com/u/Mike_Schlottman)\
**Post date:** [September 27, 2016, 9:09pm UTC](https://forum.ansible.com/t/how-do-i-change-a-vmware-vm-network-after-deployment/22656/1 "2016-09-27T21:09:12Z")

</div>

I cloned a vmware VM from a template. Now I need to change the network to a different network port group. I tried using vsphere\_guest to change the network, but reconfigure only seems to work for CPU, Memory and CDROM. Is there some other way I should do this? Being able to set these sorts of parameters after cloning a VM is critical to me.

tasks:

- vsphere\_guest:  
vcenter\_hostname: “{{ vcenter\_hostname }}”  
username: “{{ vcenter\_user }}”  
password: “{{ vcenter\_pass }}”  
guest: “MYVM”  
state: reconfigured  
vm\_extra\_config:  
notes: This is a test VM  
vm\_nic:  
nic0:  
network: QANET

network\_type: dvs  
esxi:  
datacenter: MYDATACENTER
