I am using powershell and the VI-Toolkit to to deploy a XPSP3 template. I need to be able to detect programaticly when Sysprep and the VMware customizations that follow have completed, so that I can launch additional installations via the powershell script.
I am running VMware ESX Server 3i, 3.5.0, 153875, and I am using the VI Toolkit 1.5.
I started out polling the VM to see if the VM was powered on, this works great. Then I started trying to look into the VM using the Invoke-VMScript command to try and see what is going on, this hasn't worked so great, mostly because I'm not sure what I should be looking for. I also spent a significant amount of time trolling through the VI-Toolkit cmdlets, to see if there were any tools for detecting the staus, I am thinking that I overlooked somthing.
Any help with this would be appreciated.
I use the CloneVM_Task method from the SDK for deploying guests from templates.
Did you have a look at Rob's script in .
That script also uses the CloneVM_Task method and has an option for running post-install scripts.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Welcome to the club
There is no way, afaik, you can directly find the status of the sysprep process in the guest.
The only way that I was able to use is the following:
*) as part of your sysprep process place an eye-catcher (file or registry entry) on the guest
*) use Invoke-VMScript to check for the presence of this eye-catcher on the guest
But the method has flaws, the placement of the eye-catcher is not at the end of the sysprep (iow just before the final reboot).
So you could still try to access the guest too soon.
In the end I inserted a sleep cmdlet in the deployment script, but the duration of that sleep is based on what the average guests require.
It's not a fool-proof method but it works for now.
On my list of possible alternatives I also have monitoring snmp traps coming from the guest on a management server.
But that project is still in a very early stage.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I have attempted what you have outlined as well, and was hoping for more.:)
When implementing the process you outlined, I have run into issues with the RunOnce command. I have only attempted to congifured the RunOnce from withinCustomization Specification. I have found that it doesn't work, and if haven't delved into it sysprep enough, at this point, to come up with a work around.
Suggestions?
I use the CloneVM_Task method from the SDK for deploying guests from templates.
Did you have a look at Rob's script in .
That script also uses the CloneVM_Task method and has an option for running post-install scripts.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Not yet, but now I am going too.
Thanks!!!!
Joe