The Windows virtual machine deployed from a template fails to join the domain
book
Article ID: 308806
calendar_today
Updated On:
Products
VMware vCenter Server
Issue/Introduction
Symptoms:
When deploying a Windows virtual machine from a template using Sysprep, you experience these symptoms:
The virtual machine fails to join the domain
After Sysprep completes and the virtual machine reboots, you are able to join the virtual machine to the domain without issues
In the %systemroot%\TEMP\vmware-imc\guestcust.log file within the virtual machine, you see the error:
Joining domain domain.com using account administrator and password '*****' The network location cannot be reached. For information about network troubleshooting, see Windows Help. Retrying join operation with user = [email protected] The network location cannot be reached. For information about network troubleshooting, see Windows Help.
Environment
VMware vCenter Server 5.0.x VMware vCenter Server 4.0.x VMware vCenter Server 4.1.x
Cause
This issue occurs in some network environments when the virtual machine network adapters take a longer time than expected to acquire a DHCP lease. In this case, the network is not accessible when Sysprep tries to join the virtual machine to the domain.
Resolution
To resolve this issue, modify the default script used by Sysprep to join the virtual machine to the domain and add a delay before it attempts to add the virtual machine to the domain.
To add this delay:
Log in directly to your vCenter Server as an administrator.
Browse to C:\Program Files\VMware\Infrastructure\Virtual Center Server\imgcustor search for imgcust in Start> Search.
Right-click the finalizationsetup.bat file and click Properties.
Deselect the Read Only attribute and click OK.
Open finalizationsetup.bat using a text editor.
At the top of this file, add these entries:
ping 127.0.0.1 -n 10
nonsysprepdomainjoin.bat
Save and close the file.
Try deploying virtual machine from the template.
If the issue persists, try increasing the number of pings in the finalizationsetup.batfile to increase the delay.