When deploying a Windows virtual machine from a template using guest customization, the deployment completes successfully; however, the virtual machine fails to join the Active Directory domain
Network settings for the virtual machine template within the Windows OS are configured for a static IP address
To resolve this issue you have to configure the Network Settings within the Windows OS to obtain IP settings through DHCP
1. Right click on the VM template and select Convert to Virtual Machine.
2. Power on the VM.
3. Log in to the Windows virtual machine as a user belonging to the local Administrators group.
4. Open the control panel.
5. Select Network and Sharing Center > Change Adapter Settings.
6. Open each network connection and select Properties.
7. Set the Internet Protocol Version 4/6 to Obtain an IP address Automatically and Obtain DNS server address automatically.
8. Power off VM and convert it back to a template.
After this process is completed you should be able to deploy a Windows virtual machine from template with guest customization and join it automatically to the AD domain.
VMs deployed from templates do not join the domain automatically