We have a powercli script that intermittently fails to join the domain and thus subsequent steps fail. It is using the new-vm commandlet to clone a VM using a customization spec. The VMs NIC is not connected causing the failure. I can see in the Guestcust.log that it is trying to connect the nic 5 times and giving up:
Trying to connect network interfaces, attempt 5
Rpci: Sending request='deployPkg.update.state 4 103 C:\WINDOWS\TEMP\vmware-imc\guestcust.log@4000'
Rpci: Sent request='deployPkg.update.state 4 103 C:\WINDOWS\TEMP\vmware-imc\guestcust.log@4000', reply='Unknown command', len=15, status=0
Got VMX response 'Unknown command'
Unable to set customization status in vmx.
Can't connect network interfaces after 5 attempts, giving up
This last time, I found that DRS had moved the VM to another host in the cluster 37 seconds after powering it on. I suspect this to be the cause of the problem. This would explain the intermittent nature of the problem, however, I do not have proof that this happened during the other failures. If so, it is a VMware bug. While I could disable the master VM from DRS and re-enable it via script after the cloning is complete, having to do such a thing is totally bogus.
Any ideas of anything else that might be the cause of the nic to not enable? Or confirmation that a DRS vmotion would cause this failure?