I am using Foreman 1.24.2 and I am trying to deploy a Windows VM on VMware with image based provisioning and user data template.
The template works fine and the VM is deployed by cloning it as expected.
The problem I am facing is that the network adapter of vm is not connected so when the VM boots up, there is no network connection. However when I am cloning the template manually into VM and tell it to startup after clone, the network adapter is connected.
So how does foreman clone the VM differently from how I clone it? I tried to figure out via source code but I cannot find the code snippet thats responsible for VM cloning.
So basically I found the source code for clong a VM:
But as far as I can see, it always sets the parameter “startConnected” to true. However in the VM’s .vmx-File it is explicitely set to “false”.
I started to believe this issue is maybe vSphere related so I opened a case with VMware and they at least said me there is a known bug right now: https://kb.vmware.com/s/article/77134
I am not 100% sure yet if this bug also causes the problem but I will update my vCenter as soon as there is a fixed release and try again.
Does anyone else have a similar environment and is experiencing the same issues?
Just upgraded to newest vCenter 6.7 Release and the issue still exists.
Is there any opportunity to see the calls Foreman does to vCenter so I can see which values are given?
Last time I checked there was following part in vCenter vpxd.log:
This issue occurs when the image that is cloned is sysprepped and has IPv6 enabled. When using a non-sysprepped template and disabling IPv6 the NIC does get activated. Seems to be an issue with VMware Guest Customization that is done when cloning and using user_data template