Hi,
There are two different option to automate VM ware
1. VI Toolkit (Powershell scripting)
2. SDK & API in .net application.
Can anyone describe the best practice?
R,
Mehul
OK, now I see what you mean.
That is in fact what you put in the \[GuiRunOnce\] section of the unattend.txt or sysprep.inf file.
You can check the MS documentation on what is possible here. See here and here for more info.
When you deploy a guest from a template with a customization specification, the mechanism will use the sysprep utility to prepare the new machine.
The Run Once option allows you to specify one or more commands that need to be run on the target guest.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
These are not really two different ways of automating your VI environment, I consider them as complimentary (from the VI Toolkit point of view).
With the VI Toolkit (soon to be called PowerCLI) you have a set of cmdlets that allow you to do most of your common automation tasks.
The SDK expose the (nearly) complete internal VI environment with objects and APIs.
For some tasks that are not (yet) exposed by the VITK cmdlets you can call the SDK APIs and use the SDK objects.
This is possible principally through the use of the Get-View cmdlet that opens the SDK to the PowerShell language.
Note1: you can of course automate entirely based on the SDK but that will be more cumbersome since you loose some of the abstractions and features that the VITK offers
Note2: you can also call the SDK APIs and use it's objects by means of other languages like Perl and Java.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks for your brief explanation. glad to here that.
As per my knowledge, .net can be the right platform to expose all the objects offered for vi environment. Is it correct?
and one more question.
How can we integrate customization script while creating vm environment? I have seen it but never tried it. any help?
Thanks.
It's not .Net that exposes the VI environment.
With PowerShell you can access the .Net functions and objects.
And since the VITK exposes the VI SDK, you can use the .Net functions on these VI objects.
Can you be a bit more specific on what exactly you are trying todo with your customisation script ?
Is it for customising your ESX server(s), your VMs... ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks for reverting back.
I want to costomize my VM image not the ESX Server. I have just seen that customization script option when I am creating the environment. By going through different books and articals I have tried finding the options that what are the customization script we can pass and how will it works. but none of the documents has describes it well. Hence I am asking.
Why that tab customizatoin script is for? and what are the script we can pass though it?
Please suggest any KB or document which can guide me though.
Regards
Are you by any chance talking about the VMware Lab Manager product ?
If not, can you tell me how and from where you reached that customisation script option.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Are you perhaps referring to "OS customization specs"? If so, you should see that term mentioned in the dialog boxes which are used to configure them. You can manipulate them with the VITK.
If not, then you are going to need to get specific for us to be able to help you out.
[vExpert|http://www.vmware.com/communities/vexpert/], PowerShell MVP, VI Toolkit forum moderator
Author of the book: Managing VMware Infrastructure with PowerShell
Co-Host, PowerScripting Podcast (http://powerscripting.net)
Need general, non-VMware-related PowerShell Help? Try the forums at PowerShellCommunity.org
OK, now I see what you mean.
That is in fact what you put in the \[GuiRunOnce\] section of the unattend.txt or sysprep.inf file.
You can check the MS documentation on what is possible here. See here and here for more info.
When you deploy a guest from a template with a customization specification, the mechanism will use the sysprep utility to prepare the new machine.
The Run Once option allows you to specify one or more commands that need to be run on the target guest.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
OK. that means sysprep which should run once when the machine is first time starting can be mentioned in customization wizard. Now I got the exact idea.
Thanks so much.
One more thing I would like to ask. Where can I get the good resource to learn the VI Toolkit? I have just started learning the VI Toolkit and same I would like to ask for Lab Manager Automation. Currently we have setup for ESX Servers as well as Lab Manager setup.
Thanks in advance.
Just to clarify, the sysprep is run by the VC as part of the clone process.
With the Customization Settings you can change certain settings of the sysprep process.
You can of course also provide your own sysprep.inf file, then you control the sysprep process completely.
A good source for learning the VITK (soon to be called PowerCLI) is Hal's book which was released recently.
And there are a number of blogs that provide script samples for numerous aspects of managing your VI environment with the VITK.
See the blogrol in Carter's VI Toolkit (for Windows) blog.
And there are the threads in this community.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference