Joining a VMware vCenter Lab Manager 3.0 template to a domain
Details
You can set VMware vCenter Lab Manager 3.0 to allow a virtual machine created in Lab Manager to automatically join a domain, based on the template configuration.
Solution
Following are the three possible methods of setting Lab Manager to support the domain join.
Option 1: For Windows versions except Windows 2000. This method does not work for Windows 2000.
Copy netdom.exe to the virtual machine template. The netdom.exeis part of the resource kit from Microsoft that provides a command line to join a machine to a domain.
Spawn netdom.exewith appropriate parameters from SetupComplete.cmd file. When you create a configuration virtual machine from this template, at end of the sysprep process, the commands specified inside SetupComplete.cmd are automatically run.
Option 2:
Set the customization script on the virtual machine template that needs to join the domain when the command line passed to it is postcustomization.
The customization script is a batch file that can be set on the virtual machine template that gets called with precustomizationand postcustomizationcommand lines before and after the default customization process.
For more information on adding a customization script to a template, refer to the Customizing Guest Customization section in the User's Guide for Lab Manager 3.0.
Option 3: This method works only on Windows Vista and Windows 2008.
Inside the virtual machine template, create the following folder structure: %windir%\Setup\Scripts.
Create SetupComplete.cmdfile under the Scripts directory.
Copy the netdom.exeto the template and specify the appropriate netdom.execommand line in %windir%\Setup\Scripts\SetupComplete.cmd.