|
please read the following article first Explanation of Virtual Center's customization process
Continuing on my previous article regarding programming the Vmware SDK 1.x using vbscript, in most cases it's unlikely that you are going to build new virtual machines from scratch, you rather clone them to speed-up the process so let’s clone an existing Virtual Machine using vbscript.
By cloning a virtual machine you make an exact copy of it, with Virtual Center you can clone a virtual machine at two different ways:
- Cloning witput the customization
- Cloning with customization
As the first option explains itself, the second option uses Microsoft's sysprep utility. In the Virtual Center cloning wizard when you choose to customize your clone, it will guide you through a wizard requesting some basic information that will be used for the creation of the sysprep.inf file, which in turn will be copied along with the other sysprep files to cloned virtual machine at the of cloning process.
You can easily see what the customization part of the cloning process does if you specify NOT to autopoweron and attach the disk to a different Virtual Machine.
High level overview of the process:
After the cloning process is finished it will configure the new cloned virtual machine to boot the sysprep mini-wizard. It does this by editing the registry, it will copy the setupcl.exe to the %systemroot%\system32 directory and create the sysprep folder structure. The sysprep mini-wizard will be automated using the information specified in the sysprep.inf file.
The vmclone script:
Attached I have included a vbscript that automates the cloning process. As input it requires a xml file containing all the information (I have chosen for a xml file as otherwise the number of command line parameters can become quite large !!).
With the vmClone script you have three options of cloning:
- No customization
- Basic customization (same as the Virtual Center cloning process does)
- Advanced customization
This last option I have just included to show you how easy it is to extend your VM deployment by taken advantage of all the sysprep options you have. Consult your sysprep documentation and you will see that there are a lot more options available then provided by the Cloning wizard of Virtual Center, though I have to say that in most cases the basic options are sufficient, still its nice to see how you can extend it.
Next Page (2/2) 
|