Sysprep is a Microsoft tool prepares an installation of Windows for duplication, auditing, and customer delivery. Most of you are familiar with Sysprep and has use it lot of times. When you are setup a Windows VM you need to install softwares, drivers, maybe some configuration in firewall, enable Remote Desktop , install critical patches and who know's what else base on every IT requirements. All these takes lot of time every time tha you must insall a new VM.
If you don't use MDT (Microsoft Deployment Toolkit) which is very good tool for those that you don't have hear again you can use a sysyprep with a switch /mode:vm
The command-line option /mode:vm it's new command and can use it from Windows 8,Windows Server 2012. The command generalize VHD so you can deploy it as VHD or VHDX in the same HYPERV Host. With simple words you can use the same VHD or VHDX File for the first Boot for different VM's.
Today i will explain how can use Sysprep with the The command-line option /mode:vm and automate you Job.
So Let's start.
- Create new VM with Windows 8.1 or Windows Server 2012
- Install softwares that you want.
- Install Windows Updates .
- Do your configurations base on your requests like enable Remote Desktp Connectio, Configure Windows Firewall or any other configuration.
- Run As Administrator the cmd
- Run the following command
sysprep.exe /oobe /generalize /shutdown /mode:vm
- After finish and shutdown the PC backup the VHD file or copy to another location
- Create a new VM.
Create Virtual Machine in Windows 8.1 with HYPER-V
- Attach the VHD file in the new VM.
- As you can see it starts again the first startup configuration as new installation.
What exactly doing the /mode:VM? Boost the perfomance and time for the virtual machine for the first startup and installation.
The command-line option /mode:vm can use it only in Virtual Machines in different technologies of Virtualization like HYPERV,Xen,VMWARE.,ESX.
Can't use the VM after sysprep in differnt HYPERV Host with different hardware.
How usefull found this tip? Will be using this command? Let's share your opinion or experience in our commented system.