Microsoft provides a system preparation tool, Sysprep, which helps in deploying Windows on multiple computers. It has many scenario usage, but we will be using it for duplicating our virtual machines images, so that we don’t have to install all things from scratch each time.
Microsoft TechNet has listed detailed requirements when this tool can be used for duplication purposes, and analyzing that I think our scenario fits in it perfectly. Our master and destination computers have compatible hardware, no extra drivers, and disk are exactly same.
How should we walk our walk for this work, lets list them down.
First we need to create a master image, which will be used for duplication.
- Install our operating system, we will be using Windows 2003 mostly.
- Install any required applications.
- Don’t join your system to any domain, it should be in workgroup. If you do, Sysprep will remove it from that domain.
- Copy Sysprep.exe and Setupcl.exe to %SYSTEMFOLDER%\Sysprep folder.
- We can also create Sysprep.inf file with some already populated information used during Mini setup.
- Run Sysprep, system will shutdown.
- Store this virtual machine as a backup master, from which other installation could be started.
Now we can start creating new virtual machines using this master image.
- Create a copy of this virtual machine.
- Add it to your virtual server, and boot it.
- A Mini setup would prompt up.
- Specifying relevant information on this setup.
- Sysprep.exe and Sysprep.inf files would be removed from %SYSTEMDRIVE%
- Machine would restarts and ready for further modification and use.
All folks would be wondering why I am doing all this hassle, why not just prepare a virtual machine, and use it as master. For new installation just copy from this image and add new machine to your network.
But folks there is a little problem when you join that machine to domain, it will not work. Because every instance of Window have some system information, like SID (Sysetm Identifier). When you join a machine to a domain, it identified that machine using that SID. But when you image copying method, and join your next copy, it will not throw and error and would not join the domain. Because another machine is already registered with that same SID. So I had to use Sysprep for new system preparation.
I know there are some other tools available which can generate new SID, like NewSID from SysInternals, but they have their own pros and cons. So I chose Sysprep, one more reason, I wanted to use whatever is available from Microsoft for all my experiments.
You can download these deployment tools from here.
Windows XP Service Pack 2 Deployment Tools
Windows XP Service Pack 3 Deployment Tools
System Preparation tool for Windows Server 2003 Service Pack 2 Deployment
Windows Server 2003 Service Pack 1 32-bit Deployment Tools