I have a PowerShell script that uses PowerCLI to clone new VMs from a template and apply a customization specification. I've recently started using non-persistent cust. specs in my script, so I don't have to manage and update external persistent specs.
The script works fine on VSphere 5.5 - VMTools gets installed and everything is happy.
In our environment running VSphere 5.1, there is a prompt in VI Events to install VMWare Tools after the guest OS customization finishes. VM Tools is already installed on the template VM. Why would it not be automatically installed on the cloned VM in the 5.1 environment, like it is in the 5.5 environment?
(FYI, no errors are logged in the guest cust. logs on the new VM, but the customization never finishes. The computer doesn't join the domain, for one.)
And the template you use on vSphere 5.1 was created in vSphere 5.1 ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I'll post the portion of the script that's doing the OS customization creation, calling New-VM and then (after some VM modifications), powering on the VM and waiting for customization to complete. (The entire script is 900+ lines)
NB: I just tested using a permanent customization spec, and I was that VM tool was present initially, but then got removed. VI Events tells me errors have been logged in the guest customization log, so I'm waiting for that VM to become available so I can see what they are.
In C:\Windows\Panther\UnattendGC\setuperr.log, I see:
Error [msoobe.exe] Failed to install product key [hr=0xC004F050]
I saw the thread about this error (Windows 2008R2 sysprep Error [msoobe.exe] Failed to install product key) so I'll try the F10 step when I get a chance and see if the customization is correctly picking up the product key.
I see the same "Failed to install product key" on a server cloned with VSphere 5.5, where the customization did finish successfully, for what it's worth.
For now, for my issues with the 5.1 instance, my work-around will be to check whether the host domain and IP addresses have the expected values and consider the configuration a success if they do.