VMware Cloud Community
CaptainMatt
Contributor
Contributor

VM Customization Specifications Issues

We have a Windows Server 2022 Template that isn't applying the chosen customisation for changing the name or the VM, or adding it to the domain! It looks like this is possibly due to a delay in DHCP assigning an IP ?

I'd like to get this resolved but cant work out how unless we add a static IP in which case the result has more success,  the alternative is some sort of SYSPREP ??

 

 

7 Replies
HelloMats
Contributor
Contributor

Did you ever get this solved?
I have similar issue but I have always used a script. But if I update a template to latest patches and hardware compat the IP parameters wil not get populated to the new VM..

$IP_Params = @{
IpMode = 'UseStaticIp'
IpAddress = $IPAddress
SubnetMask = $SubnetMask
DefaultGateway = $DefaultGateway
DNS = $DNS01,$DNS02
}
Get-OSCustomizationSpec $OSCusSpec | New-OSCustomizationSpec -Name $OSTempSpec -Type NonPersistent | Out-Null
Get-OSCustomizationSpec $OSTempSpec | Get-OSCustomizationNicMapping | Set-OSCustomizationNicMapping @ip_Params | Out-Null

AreWeOnline
Contributor
Contributor

We also have had this problem and as far as i see this also applies to Windows 11 Templates.

Edit: So here is how we solved our problem:

  • Tried to run sysprep.exe under C:\Windows\System32\Sysprep
  • It failed with "Sysprep was not able to validate your Windows installation. Review the log file at %windir%System32\Sysprep\Panther\setupact.log for details."
  • In the log file where some errors about edge browser and that it was installed for a user but not provisioned for all users.
  • Opened Powershell and uninstalled the package with command Get-AppxPackage | Where Name -like *Edge* | Remove-AppxPackage
  • Now Sysprep accepted to run
  • i converted the vm back to a template and the customization of the vm was no problem.

 

-> In case of the Win 11 template the packages to uninstall where three others but after removing them it also worked.

 

XtravirtTech
Contributor
Contributor

Just to add for Windows 11, I had to issue the following commands

Get-AppxPackage Microsoft.OneDriveSync | Remove-AppxPackage
Get-AppxPackage MicrosoftWindows.Client.WebExperience | Remove-AppxPackage

CaptainMatt
Contributor
Contributor

We do need to create new templates so I will keep this in mind, I have been so busy lately so forgot my thread was here!

Definitely seen this issue across a few Windows 10 and Server 2016 Upward templates!

Reply
0 Kudos
CaptainMatt
Contributor
Contributor

I wonder if it's due to windows build changes as well as the sysprep weirdness

Reply
0 Kudos
minhajahmed
Contributor
Contributor

Did someone tried windows 2022 Core for VM customization process to work. I am not able to get it work for adding computer name / IP address and domain add.

I can deploy the VM 2022 Core with no issues but it does not accept any changes from VM customization.

Reply
0 Kudos
wcorwin67
Contributor
Contributor

Same issue.  We migrated from 6.5 to 8.0.   I moved the customization specification & the templates from the old environment to the new.  I tried deploying a new VM (Server 2022) using the migrated customization specification & the migrated Template.  They used to work perfect.  It acts like I never picked the customize option.  As I am going through the "Deploy from Template" options - customize guest OS portion, it takes the HW changes that I specify but just ignores the customization specification which should be changing the IP, join the domain, reboot 2x and change the SID.  It does none of that.  I went through the customization specification and rechecked the PW, all fine.  

I deleted and remade the customization specification on 8.0 hoping that was the issue.  Same.

I created a new Template (Server 2022) and tried deploying that with the new customization specification.  Same.

I manually rebooted the VM.  No affect (or is that effect?)

After the VM was deployed I powered it off, RC > Guest OS > customize Guest OS, picked my customization specification.  Same.

(Referencing the Win11 user above @AreWeOnline) I ran sysprep on the deployed VM.  Failed, same error as him.  Followed his fix.  Sysprep now worked and rebooted as it should have after it finished.

That trigged the still "attached" customization specification and it took off and started to do its thing.

It changed the IP but didn't join the Domain.  I rebooted it a few times hoping it would do it but no.

I did the Sysprep/Edge "fix" on the template & deployed a new VM.

It launched, stayed at the login screen for about a minute & rebooted (as expected), was at the "Getting ready" screen for a minute & rebooted (as expected).  It did all of its stuff properly.

YAY!!!!

So......I don't think it had anything to do with old/new environment or old/new customization specification or Template.  I think the timing had to do with some Edge updates - or so it seems.  Either way, it works now.

Hopefully this helps someone else.

Reply
0 Kudos