I have a new 6.7 deployment I am working with. I installed powerCLI 6.5 and I created a template and an OS Customization Spec. I am trying to deploy a VM from template and apply the customization spec. This works fine from the GUI. The deployed VM from template boots up and then runs sysprep, reboots, and applies the customization spec.
However when done from PowerCLI the VM creates based upon template but the VM never reboots again and doesn't sysprep or apply customization spec. There are no errors.
Any ideas?
$VMTemplate = Get-Template -Name 'Win10Ent1809'
$OSSpecs = Get-OSCustomizationSpec -Name 'Windows10Ent'
New-VM -Name 'db-test-ent' -Template $VMTemplate -OSCustomizationSpec $OSSpec –VMHost 'nbfesxi01.mosherco.biz' -Datastore 'PURE_VMFS_1'
First question, why PowerCLI 6.5?
Did you already try rebooting the VM manually?
Does the OS Customization kick in in that case?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Sorry actually i was mistaken about powercli 6.5. I am using windows 10 powershell and just install-module Vmware.powercli and it grabs it from the windows powershell gallery(most recent version I am assuming)
Reboot the VM manually does not do anything it sits at logon screen.
The customization spec should sysprep and logon 1 time with an admin account. It works when done via the gui but not powercli.
Can you check the logs mentioned in KB1026317?
You could also give the bypass mentioned in Re: VM fails to power up when using modified OSCustomizationSpec to create VM. a try.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference