Share via


Domain Join on a Win2k3 VMWare VM from template does not work

The product team is still investigating this issue to come up with a viable solution. Its worth noting that this is a change in VMware's API behavior and not a directly VMM bug.

While helping CSS root cause this issue, I found this forum post:

https://communities.vmware.com/message/1505758 :

“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”

So I decided to look into VMM code to understand the interfaces VMM uses to generate the VMware answer file :

In the customization subtask use deploying a VM, the there is a method that calls calls VMware API “CustomizationSysprepText” to create the answer.

This all seems ok, so I looked at VMware’s VISDK 2.5 API reference doc:

  1. Data object – CustomizationSpec
    1. Has a property CustomizationIdentitySettings
  2. Data Object - CustomizationIdentitySettings
    1.  Is extended by CustomizationLinuxPrep, CustomizationSysprep, CustomizationSysprepText

Looking back at our code

  •  First we create CustomizationSysprepText sysprepText
  • Then CustomizationGlobalIPSettings globalIpsettings, and specify CustomizationAdapterMapping
  • Finally call CustomizationSpec, with the following input

1. CustomizationSpec.identity = sysprepText;

2. CustomizationSpec.globalIPSettings = globalIpsettings;

3. CustomizationSpec.nicSettingMap = nicSettings;

Since identity can take CustomizationSysprep and CustomizationSysprepText, I figured this something the vCenter UI mimics.

In vCenter, the Windows Guest Customization manager allow you to create a New Customization Spec in two modes:

1. vCenter managed properties in UI (no sysprep file)

2. Custom sysprep answer file

Even the left nav menu is different for each option.

Looking deeper into CustomizationSysprep, it allows you to explicitly specify CustomizationIdentification, which contains:

1. domainAdmin

2. domainAdminPassword

3.  joinDomain

4. joinWorkgroup