Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Need Help with Customization Script / Domain Join for Windows XP/2k3

$
0
0

I've seen this question posted a few times and but never answered with a working example so I though I'd add some information to the topic and ask for help completing the setup.  Please be patient, it's a long post but I'm trying to consolidate lots of information to try and bring together a working solution.  I do have a working solution for Vista/2008/Win7/2008 R2 which I'll following up in another post.

 

I have a customization script used for Win XP/2k3 that runs netdom.exe when "postcustomization" is reached:

 

if "%1%" == "postcustomization" (
c:\temp\netdom.exe JOIN /d:domainname.com %COMPUTERNAME% /OU:OU=Level3,OU=Level2,OU=Level1,DC=domainname,DC=com /Ud:domain\username /Pd:password
)

 

When netdom is run it reports the following error which is captured in the c:\windows\temp\customize-guest.txt log file:

The network location cannot be reached. For information about network troubleshooting, see Windows Help.

 

I've tried adding a delay with a ping loop for up to 5 minutes to allow any network services to start.  I've verified that the domain controller is ping'able at the time netdom is run.  I've captured the IPconfig /all output and verified that the VM has a valid DHCP IP, DNS, etc.  The firewall is disabled.  Do additional services need to be started prior to running this command?  What's the missing piece?

 

Here are some of sources that I have come across with information, please let me know if I'm missing anything unique:

 

Our own VMware Support call

We used customized sysprep files in Lab Manager v3 to do the domain join and it worked great.  A VMware Tech Support Analyst confirmed that this option is no longer supported in Lab Manager v4 and that the customization script should be used.  He said that the sysprep files should remain clean.  I haven't seen any additional information on editing the sysprep files so while we have run into issues with our 4.0 deployment I'm not sure if some editing of the syspref files is possible.  The rep also suggested referencing some of the forum posts listed below.  I asked if they have any internal documentation or working examples and the answer was no.

 

Forum Post - LM 3.0 Configuration Script

http://communities.vmware.com/thread/167069

 

Has example code for the customization script.  The code sets the basic framework but is not a complete example that includes domain joining.

 

Example code from pdsbak:

 

@echo off
if "%1%" == "precustomization" (
echo Do precustomization tasks
) else if "%1%" == "postcustomization" (
echo Do postcustomization tasks
) else (
echo Unknown command line
)

 

KB Article - Joining a VMware vCenter Lab Manager 3.0 template to a domain

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1007491

 

Has incorrect information, partly noted in post #4 in forum thread: http://communities.vmware.com/thread/165008

 

Option 1: Specifies to use SetupComplete.cmd in all version of Windows except 2000.  This is incorrect as SetupComplete.cmd is only available in Vista/2008 or newer OS's.

 

Option 2: Correct information to use the postcustomization option but gives no information on how.  References Customizing Guest Customization section in the User's Guide for Lab Manager 3.0 which has no additional information on the subject.

 

Option 3: Correct and most complete, yet still lacking, example given by VMware,

 

Forum Post - Customization Script...."examples"

http://communities.vmware.com/message/1232209

 

User suggests using 3rd party product, DeployNow! Guest Tools to handle the customization/domain join, but the product link is dead.

 

Lab Manager Users Guide - vCenter Lab Manger 4.0

http://www.vmware.com/pdf/lm40_users_guide.pdf

 

Referenced in a very recent post: Guest Customization for WINDOWS 7

The users's guide has no helpful information/examples on the guest customization process.  The "Customize Guest Customization" section is mentioned as being helpful, but here's all it adds:

 

Customize Guest Customization

Lab Manager allows you to add a customization script to a virtual machine template. The script runs before

and after the guest customization when you deploy a virtual machine based on the virtual machine template.

For example, the script could check for viruses or start and stop processes.

The script is called with the precustomization command line parameter before the guest customization

process starts and is called with the postcustomization command line after the guest customization process

has finished.

To add a customization script to a template

1 In the left pane of the console, click VM Templates.

2 Move the pointer over the virtual machine template name and select Customization Script.

3 Click Browse to locate an existing script or type the script.

Specify a batch script for Windows guests and a shell script for UNIX guests. The script can include text

and cannot include binary data.

4 Click OK.

 


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>