In my case i did it manually on the vm settings because the problem occur sometimes only on one master image! Seems that the DVS lost the information of related virtual machine nic, in my case I’ve notice that this happen after doing some snapshot activity (go to or delete). I don’t know if is possible to script this kind of operation.
Let me know if the workaround solved your problem!